PaStiX Handbook  6.4.0
cpucblk_cinit.c
Go to the documentation of this file.
1 /**
2  *
3  * @file cpucblk_cinit.c
4  *
5  * Precision dependent coeficient array initialization routines.
6  *
7  * @copyright 2015-2024 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria,
8  * Univ. Bordeaux. All rights reserved.
9  *
10  * @version 6.4.0
11  * @author Xavier Lacoste
12  * @author Pierre Ramet
13  * @author Mathieu Faverge
14  * @author Esragul Korkmaz
15  * @author Tony Delarue
16  * @author Alycia Lisito
17  * @author Nolan Bredel
18  * @date 2024-07-05
19  *
20  * @generated from /builds/solverstack/pastix/kernels/cpucblk_zinit.c, normal z -> c, Tue Oct 8 14:17:23 2024
21  *
22  **/
23 #include "common/common.h"
24 #include "blend/solver.h"
25 #include "bcsc/bcsc.h"
26 #include "pastix_ccores.h"
27 #include "pastix_clrcores.h"
28 
29 /**
30  *******************************************************************************
31  *
32  * @brief Initialize a lrblock structure from a workspace from a specific block to the end of all
33  * blocks.
34  *
35  * The lrblock structure must be allocated before.
36  *
37  *******************************************************************************
38  *
39  * @param[inout] cblk
40  * The column block associated to the initialization.
41  *
42  * @param[in] blok
43  * The block representation associated to the initialization.
44  *
45  * @param[in] lrblok
46  * The structure blok to initialize. Must be allocated before.
47  *
48  * @param[in] ws
49  * The workspace associated with the data that will be used for initialize lrblok.
50  *
51  *******************************************************************************/
52 void
54  const SolverBlok *blok,
55  pastix_lrblock_t *lrblok,
56  pastix_complex32_t *ws )
57 {
58  SolverBlok *lblok = cblk[1].fblokptr;
59  pastix_int_t fcblknm = blok->fcblknm;
60  pastix_int_t ncols = cblk_colnbr( cblk );
61 
62  /* H then split */
63  assert( cblk->cblktype & CBLK_LAYOUT_2D );
64  assert( lrblok != NULL );
65 
66  for (; (blok < lblok) && (blok->fcblknm == fcblknm); blok++, lrblok++)
67  {
68  pastix_int_t nrows = blok_rownbr( blok );
69  lrblok->rk = -1;
70  lrblok->rkmax = nrows;
71  lrblok->u = ws;
72  lrblok->v = NULL;
73 
74  ws += nrows * ncols;
75  }
76 }
77 
78 /**
79  *******************************************************************************
80  *
81  * @brief Initialize lrblock structure from a workspace for all blocks of the cblk associated.
82  *
83  * The lrblock structure must be allocated before.
84  *
85  *******************************************************************************
86  *
87  * @param[inout] cblk
88  * The column block associated to the initialization.
89  *
90  * @param[in] lrblok
91  * The structure blok to initialize. Must be allocated before.
92  *
93  * @param[in] ws
94  * The workspace associated with the data that will be used for initialize lrblok.
95  *
96  *******************************************************************************/
97 void
99  pastix_lrblock_t *lrblok,
100  pastix_complex32_t *ws )
101 {
102  pastix_int_t ncols = cblk_colnbr( cblk );
103  const SolverBlok *blok = cblk[0].fblokptr;
104  const SolverBlok *lblok = cblk[1].fblokptr;
105 
106  /* H then split */
107  assert( cblk->cblktype & CBLK_LAYOUT_2D );
108  assert( lrblok != NULL );
109 
110  for (; blok<lblok; blok++, lrblok++)
111  {
112  pastix_int_t nrows = blok_rownbr( blok );
113  lrblok->rk = -1;
114  lrblok->rkmax = nrows;
115  lrblok->u = ws;
116  lrblok->v = NULL;
117 
118  ws += nrows * ncols;
119  }
120 }
121 
122 /**
123  *******************************************************************************
124  *
125  * @brief Allocate the cblk structure to store the coefficient
126  *
127  * When stored in low-rank format, the data pointer in the low-rank structure of
128  * each block must be initialized.
129  * This routines performs only the allocation and is thread-safe if called in
130  * parallel on the Lower and upper part.
131  *
132  *******************************************************************************
133  *
134  * @param[in] side
135  * Define which side of the matrix must be initialized.
136  * @arg PastixLCoef if lower part only
137  * @arg PastixUCoef if upper part only
138  * @arg PastixLUCoef if both sides.
139  *
140  * @param[inout] cblk
141  * The column block to allocate.
142  *
143  * @param[in] rkmax
144  * TODO
145  *
146  *******************************************************************************/
147 void
149  SolverCblk *cblk,
150  int rkmax )
151 {
152  pastix_int_t ncols = cblk_colnbr( cblk );
153  pastix_lrblock_t *LRblocks = NULL;
154  SolverBlok *blok = cblk[0].fblokptr;
155  SolverBlok *lblok = cblk[1].fblokptr;
156  size_t size = lblok - blok;
157 
158  /* H then split */
159  assert( cblk->cblktype & CBLK_LAYOUT_2D );
160 
161  LRblocks = blok->LRblock[0];
162 
163  if ( LRblocks == NULL ) {
164  /* One allocation per cblk */
165  LRblocks = malloc( 2 * size * sizeof(pastix_lrblock_t) );
166  memset( LRblocks, 0, 2 * size * sizeof(pastix_lrblock_t) );
167  if (!pastix_atomic_cas_xxb( &(blok->LRblock[0]), (uint64_t)NULL, (uint64_t)LRblocks, sizeof(void*) )) {
168  free( LRblocks );
169  LRblocks = blok->LRblock[0];
170  }
171  }
172  assert( LRblocks != NULL );
173 
174  for (; blok<lblok; blok++)
175  {
176  pastix_int_t nrows = blok_rownbr( blok );
177  blok->LRblock[0] = LRblocks;
178  blok->LRblock[1] = LRblocks + size;
179 
180  if ( side != PastixUCoef ) {
181  core_clralloc( nrows, ncols, rkmax, blok->LRblock[0] );
182  }
183 
184  if ( side != PastixLCoef ) {
185  core_clralloc( nrows, ncols, rkmax, blok->LRblock[1] );
186  }
187  LRblocks++;
188  }
189 
190  /* Backup the fact that the cblk has been initialized */
191  if ( side != PastixUCoef ) {
192  cblk->lcoeftab = (void*)-1;
193  }
194  if ( side != PastixLCoef ) {
195  cblk->ucoeftab = (void*)-1;
196  }
197 }
198 
199 /**
200  *******************************************************************************
201  *
202  * @brief Allocate the cblk structure to store the coefficient
203  *
204  * When stored in low-rank format, the data pointer in the low-rank structure of
205  * each block must be initialized.
206  * This routines performs only the allocation and is thread-safe if called in
207  * parallel on the Lower and upper part.
208  *
209  *******************************************************************************
210  *
211  * @param[in] side
212  * Define which side of the matrix must be initialized.
213  * @arg PastixLCoef if lower part only
214  * @arg PastixUCoef if upper part only
215  * @arg PastixLUCoef if both sides.
216  *
217  * @param[inout] cblk
218  * The column block to allocate.
219  *
220  *******************************************************************************/
221 void
223  SolverCblk *cblk )
224 {
225  size_t ncols = cblk_colnbr( cblk );
226  size_t coefnbr = cblk->stride * ncols;
227 
228  if ( side == PastixLCoef ) {
229  assert( cblk->lcoeftab == NULL );
230  MALLOC_INTERN( cblk->lcoeftab, coefnbr, pastix_complex32_t );
231  memset( cblk->lcoeftab, 0, coefnbr * sizeof(pastix_complex32_t) );
232  }
233  else {
234  assert( cblk->lcoeftab == NULL );
235  assert( cblk->ucoeftab == NULL );
236 
237  MALLOC_INTERN( cblk->lcoeftab, 2 * coefnbr, pastix_complex32_t );
238  memset( cblk->lcoeftab, 0, 2 * coefnbr * sizeof(pastix_complex32_t) );
239 
240  cblk->ucoeftab = (pastix_complex32_t *)cblk->lcoeftab + coefnbr;
241  assert( cblk->ucoeftab );
242  }
243  assert( cblk->lcoeftab );
244 }
245 
246 /**
247  *******************************************************************************
248  *
249  * @brief Allocate the cblk structure to store the coefficient
250  *
251  * When stored in low-rank format, the data pointer in the low-rank structure of
252  * each block must be initialized.
253  * This routines performs only the allocation and is thread-safe if called in
254  * parallel on the Lower and upper part.
255  *
256  *******************************************************************************
257  *
258  * @param[in] side
259  * Define which side of the matrix must be initialized.
260  * @arg PastixLCoef if lower part only
261  * @arg PastixUCoef if upper part only
262  * @arg PastixLUCoef if both sides.
263  *
264  * @param[inout] cblk
265  * The column block to allocate.
266  *
267  *******************************************************************************/
268 void
270  SolverCblk *cblk )
271 {
272  /* Make sure they have the correct values */
273  assert( PastixLCoef == 0 );
274  assert( PastixUCoef == 1 );
275 
276  pastix_cblk_lock( cblk );
277 
278  /* Shift to play with bitmasks */
279  side += 1;
280  if ( cblk->lcoeftab != NULL ) {
281  side &= ( ~(PastixLCoef+1) );
282  }
283  if ( cblk->ucoeftab != NULL ) {
284  side &= ( ~(PastixUCoef+1) );
285  }
286  if ( !side ) {
287  pastix_cblk_unlock( cblk );
288  return;
289  }
290  side -= 1;
291 
292  if ( cblk->cblktype & CBLK_COMPRESSED ) {
293  cpucblk_calloc_lr( side, cblk, cblk->cblktype & CBLK_FANIN ? 0 : -1 );
294  }
295  else {
296  cpucblk_calloc_fr( side, cblk );
297  }
298  pastix_cblk_unlock( cblk );
299 }
300 
301 /**
302  *******************************************************************************
303  *
304  * @brief Free the cblk structure that store the coefficient
305  *
306  * This routines performs the free and is thread-safe if called in
307  * parallel on the Lower and upper part.
308  *
309  *******************************************************************************
310  *
311  * @param[in] side
312  * Define which side of the matrix must be initialized.
313  * @arg PastixLCoef if lower part only
314  * @arg PastixUCoef if upper part only
315  * @arg PastixLUCoef if both sides.
316  *
317  * @param[inout] cblk
318  * The column block to free.
319  *
320  *******************************************************************************/
321 void
323  SolverCblk *cblk )
324 {
325  pastix_cblk_lock( cblk );
326  if ( (side != PastixUCoef) && (cblk->lcoeftab != NULL) ) {
327 
328  if ( cblk->cblktype & CBLK_COMPRESSED ) {
329  SolverBlok *blok = cblk[0].fblokptr;
330  SolverBlok *lblok = cblk[1].fblokptr;
331 
332  assert( blok->LRblock[0] != NULL );
333  for (; blok<lblok; blok++) {
334  core_clrfree(blok->LRblock[0]);
335  }
336 
337  if ( cblk->lcoeftab != (void*)-1 ) {
338  memFree_null( cblk->lcoeftab );
339  }
340  }
341  else {
342  memFree_null( cblk->lcoeftab );
343  }
344  cblk->lcoeftab = NULL;
345  }
346  if ( (side != PastixLCoef) && (cblk->ucoeftab != NULL) ) {
347 
348  if ( cblk->cblktype & CBLK_COMPRESSED ) {
349  SolverBlok *blok = cblk[0].fblokptr;
350  SolverBlok *lblok = cblk[1].fblokptr;
351 
352  assert( blok->LRblock[1] != NULL );
353  for (; blok<lblok; blok++) {
354  core_clrfree(blok->LRblock[1]);
355  }
356  }
357  cblk->ucoeftab = NULL;
358  }
359  if ( (cblk->cblktype & CBLK_COMPRESSED) &&
360  (cblk->lcoeftab == NULL) &&
361  (cblk->ucoeftab == NULL) )
362  {
363  free( cblk->fblokptr->LRblock[0] );
364  cblk->fblokptr->LRblock[0] = NULL;
365  cblk->fblokptr->LRblock[1] = NULL;
366  }
367  pastix_cblk_unlock( cblk );
368 }
369 
370 /**
371  *******************************************************************************
372  *
373  * @brief Initialize the full-rank coeftab structure from the internat bcsc.
374  *
375  *******************************************************************************
376  *
377  * @param[in] side
378  * Define which side of the matrix must be initialized.
379  * @arg PastixLCoef if lower part only
380  * @arg PastixUCoef if upper part only
381  * @arg PastixLUCoef if both sides.
382  *
383  * @param[in] solvmtx
384  * PaStiX structure to store numerical data and flags
385  *
386  * @param[in] bcsc
387  * The internal bcsc structure that hold the graph with permutation
388  * stored by cblk.
389  *
390  * @param[in] itercblk
391  * The index of the cblk to fill in both bcsc and solvmtx structures.
392  *
393  *******************************************************************************/
394 static inline void
396  const SolverMatrix *solvmtx,
397  const pastix_bcsc_t *bcsc,
398  pastix_int_t itercblk )
399 {
400  SolverCblk *solvcblk = solvmtx->cblktab + itercblk;
401  const bcsc_cblk_t *csccblk = bcsc->cscftab + solvcblk->bcscnum;
402  SolverBlok *solvblok;
403  SolverBlok *lsolvblok = (solvcblk+1)->fblokptr;
404  pastix_complex32_t *lcoeftab = solvcblk->lcoeftab;
405  pastix_complex32_t *ucoeftab = solvcblk->ucoeftab;
406  pastix_complex32_t *Lvalues = bcsc->Lvalues;
407  pastix_complex32_t *Uvalues = bcsc->Uvalues;
408  pastix_int_t ldd = solvcblk->stride;
409  pastix_int_t itercoltab, iterval, coefindx;
410  int is2d = solvcblk->cblktype & CBLK_LAYOUT_2D;
411 
412  assert( (side != PastixUCoef) || (ucoeftab != NULL) );
413 
414  for (itercoltab=0; itercoltab<csccblk->colnbr; itercoltab++)
415  {
416  pastix_int_t frow = csccblk->coltab[itercoltab];
417  pastix_int_t lrow = csccblk->coltab[itercoltab+1];
418  solvblok = solvcblk->fblokptr;
419  if ( is2d ) {
420  ldd = blok_rownbr( solvblok );
421  }
422 
423  for (iterval=frow; iterval<lrow; iterval++)
424  {
425  pastix_int_t rownum = bcsc->rowtab[iterval];
426 #if !defined(NDEBUG) && defined(PASTIX_DEBUG_DUMP_COEFTAB)
427  if ( isnan( (float)Lvalues[iterval] ) || isinf( (float)Lvalues[iterval] ) ) {
428  printf( "cpucblk_cfillin_fr: Lvalues not initialised correctly.\n" );
429  assert( 0 );
430  }
431  if ( isnan( (float)Uvalues[iterval] ) || isinf( (float)Uvalues[iterval] ) ) {
432  printf( "cpucblk_cfillin_fr: Uvalues not initialised correctly.\n" );
433  assert( 0 );
434  }
435 #endif
436  /* If values in the lower part of the matrix */
437  if (rownum >= (solvcblk->fcolnum+itercoltab))
438  {
439  while ((solvblok < lsolvblok) &&
440  ((solvblok->lrownum < rownum) ||
441  (solvblok->frownum > rownum)))
442  {
443  solvblok++;
444  if ( is2d ) {
445  ldd = blok_rownbr( solvblok );
446  }
447  }
448 
449  if ( solvblok < lsolvblok )
450  {
451  coefindx = solvblok->coefind;
452  coefindx += rownum - solvblok->frownum; /* Row shift */
453  coefindx += itercoltab * ldd; /* Column shift */
454  pastix_cblk_lock( solvcblk );
455  solvblok->iluklvl = 0;
456  pastix_cblk_unlock( solvcblk );
457 
458  if ( side != PastixUCoef ) {
459  lcoeftab[coefindx] = Lvalues[iterval];
460  }
461 
462  if ( (side != PastixLCoef) &&
463  (rownum > (solvcblk->fcolnum + itercoltab)) )
464  {
465 #if defined(PRECISION_z) || defined(PRECISION_c)
466  if (bcsc->mtxtype == PastixHermitian) {
467  ucoeftab[coefindx] = conjf(Uvalues[iterval]);
468  }
469  else
470 #endif
471  {
472  ucoeftab[coefindx] = Uvalues[iterval];
473  }
474  }
475  }
476  else {
477 #if defined(PASTIX_DEBUG_COEFTAB)
478  fprintf(stderr, "cpucblk_cfillin: drop coeff from CSC c=%ld(%ld) l=%ld(%ld) cblk=%ld fcol=%ld lcol=%ld\n",
479  (long)solvcblk->fcolnum + itercoltab, (long)itercoltab,
480  (long)rownum, (long)iterval, (long)itercblk,
481  (long)solvcblk->fcolnum, (long)solvcblk->lcolnum );
482 #endif
483  }
484  }
485  }
486  }
487 }
488 
489 /**
490  *******************************************************************************
491  *
492  * @brief Initialize the low-rank coeftab structure from the internal bcsc.
493  *
494  *******************************************************************************
495  *
496  * @param[in] side
497  * Define which side of the matrix must be initialized.
498  * @arg PastixLCoef if lower part only
499  * @arg PastixUCoef if upper part only
500  * @arg PastixLUCoef if both sides.
501  *
502  * @param[in] solvmtx
503  * PaStiX structure to store numerical data and flags
504  *
505  * @param[in] bcsc
506  * The internal bcsc structure that hold the graph with permutation
507  * stored by cblk.
508  *
509  * @param[in] itercblk
510  * The index of the cblk to fill in both bcsc and solvmtx structures.
511  *
512  *******************************************************************************/
513 static inline void
515  const SolverMatrix *solvmtx,
516  const pastix_bcsc_t *bcsc,
517  pastix_int_t itercblk )
518 {
519  SolverCblk *solvcblk = solvmtx->cblktab + itercblk;
520  const bcsc_cblk_t *csccblk = bcsc->cscftab + solvcblk->bcscnum;
521  SolverBlok *solvblok;
522  SolverBlok *lsolvblok = (solvcblk+1)->fblokptr;
523  pastix_complex32_t *lcoeftab, *ucoeftab;
524  pastix_complex32_t *Lvalues = bcsc->Lvalues;
525  pastix_complex32_t *Uvalues = bcsc->Uvalues;
526  pastix_int_t itercoltab, iterval, coefindx, ldd;
527 
528  assert( solvcblk->cblktype & CBLK_LAYOUT_2D );
529 
530  for (itercoltab=0; itercoltab<csccblk->colnbr; itercoltab++)
531  {
532  pastix_int_t frow = csccblk->coltab[itercoltab];
533  pastix_int_t lrow = csccblk->coltab[itercoltab+1];
534 
535  solvblok = solvcblk->fblokptr;
536  ldd = blok_rownbr( solvblok );
537  lcoeftab = (pastix_complex32_t*)(solvblok->LRblock[0]->u);
538  ucoeftab = (pastix_complex32_t*)(solvblok->LRblock[1]->u);
539 
540  for (iterval=frow; iterval<lrow; iterval++)
541  {
542  pastix_int_t rownum = bcsc->rowtab[iterval];
543 
544 #if !defined(NDEBUG)
545  if ( isnan( (float)Lvalues[iterval] ) || isinf( (float)Lvalues[iterval] ) ) {
546  printf( "cpucblk_cfillin_lr: Lvalues not initialised correctly.\n" );
547  assert( 0 );
548  }
549  if ( isnan( (float)Uvalues[iterval] ) || isinf( (float)Uvalues[iterval] ) ) {
550  printf( "cpucblk_cfillin_lr: Uvalues not initialised correctly.\n" );
551  assert( 0 );
552  }
553 #endif
554  /* If values in the lower part of the matrix */
555  if (rownum >= (solvcblk->fcolnum+itercoltab))
556  {
557  while ((solvblok < lsolvblok) &&
558  ((solvblok->lrownum < rownum) ||
559  (solvblok->frownum > rownum)))
560  {
561  solvblok++;
562  ldd = blok_rownbr( solvblok );
563  lcoeftab = (pastix_complex32_t*)(solvblok->LRblock[0]->u);
564  ucoeftab = (pastix_complex32_t*)(solvblok->LRblock[1]->u);
565  }
566 
567  if ( solvblok < lsolvblok )
568  {
569  coefindx = rownum - solvblok->frownum; /* Row shift */
570  coefindx += itercoltab * ldd; /* Column shift */
571  pastix_cblk_lock( solvcblk );
572  solvblok->iluklvl = 0;
573  pastix_cblk_unlock( solvcblk );
574 
575  if ( side != PastixUCoef ) {
576  lcoeftab[coefindx] = Lvalues[iterval];
577  }
578 
579  if ( (side != PastixLCoef) &&
580  (rownum > (solvcblk->fcolnum + itercoltab)) )
581  {
582 #if defined(PRECISION_z) || defined(PRECISION_c)
583  if (bcsc->mtxtype == PastixHermitian)
584  ucoeftab[coefindx] = conjf(Uvalues[iterval]);
585  else
586 #endif
587  ucoeftab[coefindx] = Uvalues[iterval];
588  }
589  }
590  else {
591 #if defined(PASTIX_DEBUG_COEFTAB)
592  fprintf(stderr, "cpucblk_cfillin: drop coeff from CSC c=%ld(%ld) l=%ld(%ld) cblk=%ld fcol=%ld lcol=%ld\n",
593  (long)solvcblk->fcolnum + itercoltab, (long)itercoltab,
594  (long)rownum, (long)iterval, (long)itercblk,
595  (long)solvcblk->fcolnum, (long)solvcblk->lcolnum );
596 #endif
597  }
598  }
599  }
600  }
601 }
602 
603 /**
604  *******************************************************************************
605  *
606  * @brief Initialize the coeftab structure from the internal bcsc.
607  *
608  *******************************************************************************
609  *
610  * @param[in] side
611  * Define which side of the matrix must be initialized.
612  * @arg PastixLCoef if lower part only
613  * @arg PastixUCoef if upper part only
614  * @arg PastixLUCoef if both sides.
615  *
616  * @param[in] solvmtx
617  * PaStiX structure to store numerical data and flags
618  *
619  * @param[in] bcsc
620  * The internal bcsc structure that hold the graph with permutation
621  * stored by cblk.
622  *
623  * @param[in] itercblk
624  * The index of the cblk to fill in both bcsc and solvmtx structures.
625  *
626  *******************************************************************************/
627 void
629  const SolverMatrix *solvmtx,
630  const pastix_bcsc_t *bcsc,
631  pastix_int_t itercblk )
632 {
633  if ( (solvmtx->cblktab + itercblk)->cblktype & CBLK_COMPRESSED ) {
634  cpucblk_cfillin_lr( side, solvmtx, bcsc, itercblk );
635  }
636  else {
637  cpucblk_cfillin_fr( side, solvmtx, bcsc, itercblk );
638  }
639 }
static void cpucblk_cfillin_fr(pastix_coefside_t side, const SolverMatrix *solvmtx, const pastix_bcsc_t *bcsc, pastix_int_t itercblk)
Initialize the full-rank coeftab structure from the internat bcsc.
void cpublok_calloc_lrws(const SolverCblk *cblk, const SolverBlok *blok, pastix_lrblock_t *lrblok, pastix_complex32_t *ws)
Initialize a lrblock structure from a workspace from a specific block to the end of all blocks.
Definition: cpucblk_cinit.c:53
static void cpucblk_cfillin_lr(pastix_coefside_t side, const SolverMatrix *solvmtx, const pastix_bcsc_t *bcsc, pastix_int_t itercblk)
Initialize the low-rank coeftab structure from the internal bcsc.
BEGIN_C_DECLS typedef int pastix_int_t
Definition: datatypes.h:51
float _Complex pastix_complex32_t
Definition: datatypes.h:76
pastix_int_t colnbr
Definition: bcsc.h:111
pastix_int_t * coltab
Definition: bcsc.h:113
Compressed colptr format for the bcsc.
Definition: bcsc.h:110
void cpucblk_cfillin(pastix_coefside_t side, const SolverMatrix *solvmtx, const pastix_bcsc_t *bcsc, pastix_int_t itercblk)
Initialize the coeftab structure from the internal bcsc.
void cpucblk_calloc_lr(pastix_coefside_t side, SolverCblk *cblk, int rkmax)
Allocate the cblk structure to store the coefficient.
void cpucblk_calloc_fr(pastix_coefside_t side, SolverCblk *cblk)
Allocate the cblk structure to store the coefficient.
void cpucblk_calloc_lrws(const SolverCblk *cblk, pastix_lrblock_t *lrblok, pastix_complex32_t *ws)
Initialize lrblock structure from a workspace for all blocks of the cblk associated.
Definition: cpucblk_cinit.c:98
void cpucblk_calloc(pastix_coefside_t side, SolverCblk *cblk)
Allocate the cblk structure to store the coefficient.
void cpucblk_cfree(pastix_coefside_t side, SolverCblk *cblk)
Free the cblk structure that store the coefficient.
The block low-rank structure to hold a matrix in low-rank form.
void core_clralloc(pastix_int_t M, pastix_int_t N, pastix_int_t rkmax, pastix_lrblock_t *A)
Allocate a low-rank matrix.
Definition: core_cgelrops.c:56
void core_clrfree(pastix_lrblock_t *A)
Free a low-rank matrix.
#define PastixHermitian
Definition: api.h:460
enum pastix_coefside_e pastix_coefside_t
Data blocks used in the kernel.
@ PastixLCoef
Definition: api.h:478
@ PastixUCoef
Definition: api.h:479
static pastix_int_t blok_rownbr(const SolverBlok *blok)
Compute the number of rows of a block.
Definition: solver.h:395
void * ucoeftab
Definition: solver.h:178
pastix_int_t lrownum
Definition: solver.h:148
static pastix_int_t cblk_colnbr(const SolverCblk *cblk)
Compute the number of columns in a column block.
Definition: solver.h:329
int iluklvl
Definition: solver.h:152
pastix_int_t fcblknm
Definition: solver.h:144
pastix_int_t frownum
Definition: solver.h:147
pastix_int_t coefind
Definition: solver.h:149
SolverBlok * fblokptr
Definition: solver.h:168
pastix_lrblock_t * LRblock[2]
Definition: solver.h:155
pastix_int_t bcscnum
Definition: solver.h:175
SolverCblk *restrict cblktab
Definition: solver.h:228
pastix_int_t stride
Definition: solver.h:169
int8_t cblktype
Definition: solver.h:164
pastix_int_t lcolnum
Definition: solver.h:167
void * lcoeftab
Definition: solver.h:177
pastix_int_t fcolnum
Definition: solver.h:166
Solver block structure.
Definition: solver.h:141
Solver column block structure.
Definition: solver.h:161
Solver column block structure.
Definition: solver.h:203