PaStiX Handbook  6.2.1
solve_ctrsmsp.c
Go to the documentation of this file.
1 /**
2  *
3  * @file solve_ctrsmsp.c
4  *
5  * PaStiX solve kernels routines
6  *
7  * @copyright 2012-2021 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria,
8  * Univ. Bordeaux. All rights reserved.
9  *
10  * @version 6.2.0
11  * @author Mathieu Faverge
12  * @author Pierre Ramet
13  * @author Xavier Lacoste
14  * @author Tony Delarue
15  * @author Vincent Bridonneau
16  * @date 2021-03-05
17  * @generated from /builds/solverstack/pastix/kernels/solve_ztrsmsp.c, normal z -> c, Tue Apr 12 09:38:34 2022
18  *
19  **/
20 #include "common.h"
21 #include "cblas.h"
22 #include "blend/solver.h"
23 #include "kernels_trace.h"
24 #include "pastix_ccores.h"
25 #include "pastix_clrcores.h"
26 
27 #ifndef DOXYGEN_SHOULD_SKIP_THIS
28 static pastix_complex32_t czero = 0.0;
29 static pastix_complex32_t cone = 1.0;
30 static pastix_complex32_t mcone = -1.0;
31 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
32 
33 /**
34  *******************************************************************************
35  *
36  * @brief Apply a solve trsm update related to a diagonal block of the matrix A.
37  *
38  *******************************************************************************
39  *
40  * @param[in] side
41  * Specify the side parameter of the TRSM.
42  *
43  * @param[in] uplo
44  * Specify the uplo parameter of the TRSM.
45  *
46  * @param[in] trans
47  * Specify the transposition used for the matrix A in the
48  * computation. It has to be either PastixTrans or PastixConjTrans.
49  *
50  * @param[in] nrhs
51  * The number of right hand side.
52  *
53  * @param[in] cblk
54  * The cblk structure that corresponds to the A and B matrix.
55  *
56  * @param[in] dataA
57  * The pointer to the correct representation of the data of A.
58  * - coeftab if the block is in full rank. Must be of size cblk.stride -by- cblk.width.
59  * - pastix_lr_block if the block is compressed.
60  *
61  * @param[inout] B
62  * The pointer to the matrix B, that is a portion of the right hand
63  * side to solve.
64  *
65  * @param[in] ldb
66  * The leading dimension of B.
67  *
68  *******************************************************************************/
69 void
71  pastix_uplo_t uplo,
72  pastix_trans_t trans,
73  pastix_diag_t diag,
74  const SolverCblk *cblk,
75  int nrhs,
76  const void *dataA,
77  pastix_complex32_t *b,
78  int ldb )
79 {
80  pastix_int_t n, lda;
81  pastix_lrblock_t *lrA;
82  pastix_complex32_t *A;
83 
84  n = cblk_colnbr( cblk );
85 
86  if ( cblk->cblktype & CBLK_COMPRESSED ) {
87  lrA = (pastix_lrblock_t *)dataA;
88  assert( lrA->rk == -1 );
89  A = lrA->u;
90  lda = n;
91  }
92  else {
93  A = (pastix_complex32_t *)dataA;
94  lda = (cblk->cblktype & CBLK_LAYOUT_2D) ? n : cblk->stride;
95  }
96 
97  cblas_ctrsm(
98  CblasColMajor, (CBLAS_SIDE)side, (CBLAS_UPLO)uplo,
99  (CBLAS_TRANSPOSE)trans, (CBLAS_DIAG)diag,
100  n, nrhs,
101  CBLAS_SADDR(cone), A, lda,
102  b, ldb );
103 }
104 
105 /**
106  *******************************************************************************
107  *
108  * @brief Apply a solve gemm update related to a single block of the matrix A.
109  *
110  *******************************************************************************
111  *
112  * @param[in] side
113  * Specify whether the blok parameter belongs to cblk (PastixLeft), or
114  * to fcbk (PastixRight).
115  *
116  * @param[in] trans
117  * Specify the transposition used for the matrix A in the
118  * computation. It has to be either PastixTrans or PastixConjTrans.
119  *
120  * @param[in] diag
121  * Specify if the off-diagonal blocks are unit triangular. It has to be
122  * either PastixUnit or PastixNonUnit.
123  *
124  * @param[in] nrhs
125  * The number of right hand side.
126  *
127  * @param[in] cblk
128  * The cblk structure that corresponds to the B matrix.
129  *
130  * @param[in] blok
131  * The blok structure that corresponds to the A matrix, and that
132  * belongs either to cblk or fcbk depending on the side parameter.
133  *
134  * @param[inout] fcbk
135  * The cblk structure that corresponds to the C matrix.
136  *
137  * @param[in] dataA
138  * The pointer to the correct representation of the data of A.
139  * - coeftab if the block is in full rank. Must be of size cblk.stride -by- cblk.width.
140  * - pastix_lr_block if the block is compressed.
141  *
142  * @param[in] B
143  * The pointer to the matrix B, that is a portion of the right hand
144  * side.
145  *
146  * @param[in] ldb
147  * The leading dimension of B.
148  *
149  * @param[inout] C
150  * The pointer to the matrix C, that is the updated portion of the
151  * right hand side.
152  *
153  * @param[in] ldb
154  * The leading dimension of C.
155  *
156  *******************************************************************************/
157 void
159  pastix_trans_t trans,
160  pastix_int_t nrhs,
161  const SolverCblk *cblk,
162  const SolverBlok *blok,
163  SolverCblk *fcbk,
164  const void *dataA,
165  const pastix_complex32_t *B,
166  pastix_int_t ldb,
167  pastix_complex32_t *C,
168  pastix_int_t ldc )
169 {
170  pastix_int_t m, n, lda;
171  pastix_int_t offB, offC;
172  const SolverCblk *bowner;
173 
174  if ( side == PastixLeft ) {
175  /*
176  * Blok should belong to cblk
177  */
178  bowner = cblk;
179 
180  m = blok_rownbr( blok );
181  n = cblk_colnbr( cblk );
182  lda = m;
183 
184  offB = 0;
185  offC = blok->frownum - fcbk->fcolnum;
186  }
187  else {
188  /*
189  * Blok should belong to fcbk
190  */
191  bowner = fcbk;
192 
193  m = cblk_colnbr( fcbk );
194  n = blok_rownbr( blok );
195  lda = n;
196 
197  offB = blok->frownum - cblk->fcolnum;
198  offC = 0;
199  }
200 
201  assert( (blok > bowner[0].fblokptr) &&
202  (blok < bowner[1].fblokptr) );
203 
204  if ( bowner->cblktype & CBLK_COMPRESSED ) {
205  const pastix_lrblock_t *lrA = dataA;
206  pastix_complex32_t *tmp;
207 
208  switch (lrA->rk){
209  case 0:
210  break;
211  case -1:
212  pastix_cblk_lock( fcbk );
213  cblas_cgemm(
214  CblasColMajor, (CBLAS_TRANSPOSE)trans, CblasNoTrans,
215  m, nrhs, n,
216  CBLAS_SADDR(mcone), lrA->u, lda,
217  B + offB, ldb,
218  CBLAS_SADDR(cone), C + offC, ldc );
219  pastix_cblk_unlock( fcbk );
220  break;
221  default:
222  MALLOC_INTERN( tmp, lrA->rk * nrhs, pastix_complex32_t);
223  if (trans == PastixNoTrans) {
224  cblas_cgemm(
225  CblasColMajor, (CBLAS_TRANSPOSE)trans, CblasNoTrans,
226  lrA->rk, nrhs, n,
227  CBLAS_SADDR(cone), lrA->v, lrA->rkmax,
228  B + offB, ldb,
229  CBLAS_SADDR(czero), tmp, lrA->rk );
230 
231  pastix_cblk_lock( fcbk );
232  cblas_cgemm(
233  CblasColMajor, (CBLAS_TRANSPOSE)trans, CblasNoTrans,
234  m, nrhs, lrA->rk,
235  CBLAS_SADDR(mcone), lrA->u, lda,
236  tmp, lrA->rk,
237  CBLAS_SADDR(cone), C + offC, ldc );
238  pastix_cblk_unlock( fcbk );
239  }
240  else {
241  cblas_cgemm(
242  CblasColMajor, (CBLAS_TRANSPOSE)trans, CblasNoTrans,
243  lrA->rk, nrhs, n,
244  CBLAS_SADDR(cone), lrA->u, lda,
245  B + offB, ldb,
246  CBLAS_SADDR(czero), tmp, lrA->rk );
247 
248  pastix_cblk_lock( fcbk );
249  cblas_cgemm(
250  CblasColMajor, (CBLAS_TRANSPOSE)trans, CblasNoTrans,
251  m, nrhs, lrA->rk,
252  CBLAS_SADDR(mcone), lrA->v, lrA->rkmax,
253  tmp, lrA->rk,
254  CBLAS_SADDR(cone), C + offC, ldc );
255  pastix_cblk_unlock( fcbk );
256  }
257  memFree_null(tmp);
258  break;
259  }
260  }
261  else{
262  const pastix_complex32_t *A = dataA;
263  lda = (bowner->cblktype & CBLK_LAYOUT_2D) ? lda : bowner->stride;
264 
265  pastix_cblk_lock( fcbk );
266  cblas_cgemm(
267  CblasColMajor, (CBLAS_TRANSPOSE)trans, CblasNoTrans,
268  m, nrhs, n,
269  CBLAS_SADDR(mcone), A, lda,
270  B + offB, ldb,
271  CBLAS_SADDR(cone), C + offC, ldc );
272  pastix_cblk_unlock( fcbk );
273  }
274 }
275 
276 /**
277  *******************************************************************************
278  *
279  * @brief Apply a forward solve related to one cblk to all the right hand side.
280  *
281  *******************************************************************************
282  *
283  * @param[in] mode
284  * Specify whether the schur complement and interface are applied to
285  * the right-hand-side. It has to be either PastixSolvModeLocal,
286  * PastixSolvModeInterface or PastixSolvModeSchur.
287  *
288  * @param[in] side
289  * Specify whether the off-diagonal blocks appear on the left or right
290  * in the equation. It has to be either PastixLeft or PastixRight.
291  *
292  * @param[in] uplo
293  * Specify whether the off-diagonal blocks are upper or lower
294  * triangular. It has to be either PastixUpper or PastixLower.
295  *
296  * @param[in] trans
297  * Specify the transposition used for the off-diagonal blocks. It has
298  * to be either PastixTrans or PastixConjTrans.
299  *
300  * @param[in] diag
301  * Specify if the off-diagonal blocks are unit triangular. It has to be
302  * either PastixUnit or PastixNonUnit.
303  *
304  * @param[in] datacode
305  * The SolverMatrix structure from PaStiX.
306  *
307  * @param[in] cblk
308  * The cblk structure to which block belongs to. The A and B pointers
309  * must be the coeftab of this column block.
310  * Next column blok must be accessible through cblk[1].
311  *
312  * @param[in] nrhs
313  * The number of right hand side.
314  *
315  * @param[inout] b
316  * The pointer to vectors of the right hand side.
317  *
318  * @param[in] ldb
319  * The leading dimension of b.
320  *
321  *******************************************************************************/
322 void
324  pastix_side_t side,
325  pastix_uplo_t uplo,
326  pastix_trans_t trans,
327  pastix_diag_t diag,
328  const SolverMatrix *datacode,
329  const SolverCblk *cblk,
330  int nrhs,
331  pastix_complex32_t *b,
332  int ldb )
333 {
334  SolverCblk *fcbk;
335  const SolverBlok *blok;
336  pastix_trans_t tA;
338  const void *dataA = NULL;
339  const pastix_lrblock_t *lrA;
340  const pastix_complex32_t *A;
341 
342  if ( (side == PastixRight) && (uplo == PastixUpper) && (trans == PastixNoTrans) ) {
343  /* We store U^t, so we swap uplo and trans */
344  tA = PastixTrans;
345  cs = PastixUCoef;
346 
347  /* Right is not handled yet */
348  assert( 0 );
349  }
350  else if ( (side == PastixRight) && (uplo == PastixLower) && (trans != PastixNoTrans) ) {
351  tA = trans;
352  cs = PastixLCoef;
353 
354  /* Right is not handled yet */
355  assert( 0 );
356  }
357  else if ( (side == PastixLeft) && (uplo == PastixUpper) && (trans != PastixNoTrans) ) {
358  /* We store U^t, so we swap uplo and trans */
359  tA = PastixNoTrans;
360  cs = PastixUCoef;
361 
362  /* We do not handle conjtrans in complex as we store U^t */
363 #if defined(PRECISION_z) || defined(PRECISION_c)
364  assert( trans != PastixConjTrans );
365 #endif
366  }
367  else if ( (side == PastixLeft) && (uplo == PastixLower) && (trans == PastixNoTrans) ) {
368  tA = trans;
369  cs = PastixLCoef;
370  }
371  else {
372  /* This correspond to case treated in backward trsm */
373  assert(0);
374  return;
375  }
376 
377  assert( !( cblk->cblktype & (CBLK_FANIN|CBLK_RECV) ) );
378 
379  if ( (cblk->cblktype & CBLK_IN_SCHUR) && (mode != PastixSolvModeSchur) ) {
380  return;
381  }
382 
383  /* In sequential */
384  assert( cblk->fcolnum == cblk->lcolidx );
385 
386  /* Solve the diagonal block */
388  tA, diag, cblk, nrhs,
389  cblk_getdata( cblk, cs ),
390  b + cblk->lcolidx, ldb );
391 
392  /* Apply the update */
393  for (blok = cblk[0].fblokptr+1; blok < cblk[1].fblokptr; blok++ ) {
394  fcbk = datacode->cblktab + blok->fcblknm;
395 
396  if ( (fcbk->cblktype & CBLK_IN_SCHUR) && (mode == PastixSolvModeLocal) ) {
397  return;
398  }
399 
400  /*
401  * Make sure we get the correct pointer to the lrA, or to the right position in [lu]coeftab
402  */
403  dataA = cblk_getdata( cblk, cs );
404  if ( cblk->cblktype & CBLK_COMPRESSED ) {
405  lrA = dataA;
406  lrA += (blok - cblk->fblokptr);
407  dataA = lrA;
408  }
409  else {
410  A = dataA;
411  A += blok->coefind;
412  dataA = A;
413  }
414 
415  solve_blok_cgemm( PastixLeft, tA, nrhs,
416  cblk, blok, fcbk,
417  dataA,
418  b + cblk->lcolidx, ldb,
419  b + fcbk->lcolidx, ldb );
420  pastix_atomic_dec_32b( &(fcbk->ctrbcnt) );
421  }
422 }
423 
424 /**
425  *******************************************************************************
426  *
427  * @brief Apply a backward solve related to one cblk to all the right hand side.
428  *
429  *******************************************************************************
430  *
431  * @param[in] mode
432  * Specify whether the schur complement and interface are applied to
433  * the right-hand-side. It has to be either PastixSolvModeLocal,
434  * PastixSolvModeInterface or PastixSolvModeSchur.
435  *
436  * @param[in] side
437  * Specify whether the off-diagonal blocks appear on the left or right
438  * in the equation. It has to be either PastixLeft or PastixRight.
439  *
440  * @param[in] uplo
441  * Specify whether the off-diagonal blocks are upper or lower
442  * triangular. It has to be either PastixUpper or PastixLower.
443  *
444  * @param[in] trans
445  * Specify the transposition used for the off-diagonal blocks. It has
446  * to be either PastixTrans or PastixConjTrans.
447  *
448  * @param[in] diag
449  * Specify if the off-diagonal blocks are unit triangular. It has to be
450  * either PastixUnit or PastixNonUnit.
451  *
452  * @param[in] datacode
453  * The SolverMatrix structure from PaStiX.
454  *
455  * @param[in] cblk
456  * The cblk structure to which block belongs to. The A and B pointers
457  * must be the coeftab of this column block.
458  * Next column blok must be accessible through cblk[1].
459  *
460  * @param[in] nrhs
461  * The number of right hand side.
462  *
463  * @param[inout] b
464  * The pointer to vectors of the right hand side
465  *
466  * @param[in] ldb
467  * The leading dimension of b
468  *
469  *******************************************************************************/
470 void
472  pastix_side_t side,
473  pastix_uplo_t uplo,
474  pastix_trans_t trans,
475  pastix_diag_t diag,
476  const SolverMatrix *datacode,
477  SolverCblk *cblk,
478  int nrhs,
479  pastix_complex32_t *b,
480  int ldb )
481 {
482  SolverCblk *fcbk;
483  const SolverBlok *blok;
484  pastix_int_t j;
485  pastix_trans_t tA;
487  const void *dataA = NULL;
488  const pastix_lrblock_t *lrA;
489  const pastix_complex32_t *A;
490 
491  /*
492  * Left / Upper / NoTrans (Backward)
493  */
494  if ( (side == PastixLeft) && (uplo == PastixUpper) && (trans == PastixNoTrans) ) {
495  /* We store U^t, so we swap uplo and trans */
496  tA = PastixTrans;
497  cs = PastixUCoef;
498  }
499  else if ( (side == PastixLeft) && (uplo == PastixLower) && (trans != PastixNoTrans) ) {
500  tA = trans;
501  cs = PastixLCoef;
502  }
503  else if ( (side == PastixRight) && (uplo == PastixUpper) && (trans != PastixNoTrans) ) {
504  /* We store U^t, so we swap uplo and trans */
505  tA = PastixNoTrans;
506  cs = PastixUCoef;
507 
508  /* Right is not handled yet */
509  assert( 0 );
510 
511  /* We do not handle conjtrans in complex as we store U^t */
512  assert( trans != PastixConjTrans );
513  }
514  else if ( (side == PastixRight) && (uplo == PastixLower) && (trans == PastixNoTrans) ) {
515  tA = trans;
516  cs = PastixLCoef;
517 
518  /* Right is not handled yet */
519  assert( 0 );
520  }
521  else {
522  /* This correspond to case treated in forward trsm */
523  assert(0);
524  return;
525  }
526 
527  /*
528  * If cblk is in the schur complement, all brow blocks are in
529  * the interface. Thus, it doesn't generate any update in local
530  * mode, and we know that we are at least in interface mode
531  * after this test.
532  */
533  if ( (cblk->cblktype & CBLK_IN_SCHUR) && (mode == PastixSolvModeLocal) ) {
534  for (j = cblk[0].brownum; j < cblk[1].brownum; j++ ) {
535  blok = datacode->bloktab + datacode->browtab[j];
536  fcbk = datacode->cblktab + blok->lcblknm;
537 
538  if ( fcbk->cblktype & CBLK_IN_SCHUR ) {
539  break;
540  }
541  pastix_atomic_dec_32b( &(fcbk->ctrbcnt) );
542  }
543  return;
544  }
545 
546  if ( !(cblk->cblktype & (CBLK_FANIN|CBLK_RECV) ) &&
547  (!(cblk->cblktype & CBLK_IN_SCHUR) || (mode == PastixSolvModeSchur)) )
548  {
549  /* Solve the diagonal block */
550  solve_blok_ctrsm( side, PastixLower, tA, diag,
551  cblk, nrhs,
552  cblk_getdata( cblk, cs ),
553  b + cblk->lcolidx, ldb );
554 
555  }
556 
557  /* Apply the update */
558  for (j = cblk[1].brownum-1; j>=cblk[0].brownum; j-- ) {
559  blok = datacode->bloktab + datacode->browtab[j];
560  fcbk = datacode->cblktab + blok->lcblknm;
561 
562  if ( ((fcbk->cblktype & CBLK_IN_SCHUR) && (mode == PastixSolvModeInterface))
563  || (fcbk->cblktype & CBLK_RECV) ) {
564  continue;
565  }
566 
567  /*
568  * Make sure we get the correct pointer to the lrA, or to the right position in [lu]coeftab
569  */
570  dataA = cblk_getdata( fcbk, cs );
571  if ( fcbk->cblktype & CBLK_COMPRESSED ) {
572  lrA = dataA;
573  lrA += (blok - fcbk->fblokptr);
574  dataA = lrA;
575  }
576  else {
577  A = dataA;
578  A += blok->coefind;
579  dataA = A;
580  }
581 
582  solve_blok_cgemm( PastixRight, tA, nrhs,
583  cblk, blok, fcbk,
584  dataA,
585  b + cblk->lcolidx, ldb,
586  b + fcbk->lcolidx, ldb );
587  pastix_atomic_dec_32b( &(fcbk->ctrbcnt) );
588  }
589 }
590 
591 /**
592  *******************************************************************************
593  *
594  * @brief Apply the diagonal solve related to one cblk to all the right hand side.
595  *
596  *******************************************************************************
597  *
598  * @param[in] cblk
599  * The cblk structure to which diagonal block belongs to.
600  *
601  * @param[in] nrhs
602  * The number of right hand side
603  *
604  * @param[inout] b
605  * The pointer to vectors of the right hand side
606  *
607  * @param[in] ldb
608  * The leading dimension of b
609  *
610  * @param[inout] work
611  * Workspace to temporarily store the diagonal when multiple RHS are
612  * involved. Might be set to NULL for internal allocation on need.
613  *
614  *******************************************************************************/
615 void
617  int nrhs,
618  pastix_complex32_t *b,
619  int ldb,
620  pastix_complex32_t *work )
621 {
622  pastix_complex32_t *A, *tmp;
623  pastix_int_t k, j, tempn, lda;
624 
625  tempn = cblk->lcolnum - cblk->fcolnum + 1;
626  lda = (cblk->cblktype & CBLK_LAYOUT_2D) ? tempn : cblk->stride;
627  assert( blok_rownbr( cblk->fblokptr ) == tempn );
628 
629  if ( cblk->cblktype & CBLK_COMPRESSED ) {
630  A = (pastix_complex32_t*)(cblk->fblokptr->LRblock[0]->u);
631  assert( cblk->fblokptr->LRblock[0]->rkmax == lda );
632  }
633  else {
634  A = (pastix_complex32_t*)(cblk->lcoeftab);
635  }
636 
637  /* Add shift for diagonal elements */
638  lda++;
639 
640  if( nrhs == 1 ) {
641  for (j=0; j<tempn; j++, b++, A+=lda) {
642  *b = (*b) / (*A);
643  }
644  }
645  else {
646  /* Copy the diagonal to a temporary buffer */
647  tmp = work;
648  if ( work == NULL ) {
649  MALLOC_INTERN( tmp, tempn, pastix_complex32_t );
650  }
651  cblas_ccopy( tempn, A, lda, tmp, 1 );
652 
653  /* Compute */
654  for (k=0; k<nrhs; k++, b+=ldb)
655  {
656  for (j=0; j<tempn; j++) {
657  b[j] /= tmp[j];
658  }
659  }
660 
661  if ( work == NULL ) {
662  memFree_null(tmp);
663  }
664  }
665 }
solver_blok_s::frownum
pastix_int_t frownum
Definition: solver.h:112
solver.h
blok_rownbr
static pastix_int_t blok_rownbr(const SolverBlok *blok)
Compute the number of rows of a block.
Definition: solver.h:313
cblk_colnbr
static pastix_int_t cblk_colnbr(const SolverCblk *cblk)
Compute the number of columns in a column block.
Definition: solver.h:247
PastixTrans
@ PastixTrans
Definition: api.h:425
pastix_uplo_t
enum pastix_uplo_e pastix_uplo_t
Upper/Lower part.
solver_cblk_s::fblokptr
SolverBlok * fblokptr
Definition: solver.h:134
pastix_lrblock_s::v
void * v
Definition: pastix_lowrank.h:116
solver_blok_s::lcblknm
pastix_int_t lcblknm
Definition: solver.h:109
solver_cblk_s::stride
pastix_int_t stride
Definition: solver.h:135
pastix_lrblock_s::u
void * u
Definition: pastix_lowrank.h:115
pastix_solv_mode_t
enum pastix_solv_mode_e pastix_solv_mode_t
Solve Schur modes.
solver_cblk_s
Solver column block structure.
Definition: solver.h:127
pastix_coefside_t
enum pastix_coefside_e pastix_coefside_t
Data blocks used in the kernel.
pastix_trans_t
enum pastix_trans_e pastix_trans_t
Transpostion.
solver_blok_s
Solver block structure.
Definition: solver.h:107
PastixLower
@ PastixLower
Definition: api.h:445
pastix_lrblock_s
The block low-rank structure to hold a matrix in low-rank form.
Definition: pastix_lowrank.h:112
PastixNoTrans
@ PastixNoTrans
Definition: api.h:424
PastixUpper
@ PastixUpper
Definition: api.h:444
PastixConjTrans
@ PastixConjTrans
Definition: api.h:426
solver_cblk_s::lcolnum
pastix_int_t lcolnum
Definition: solver.h:133
solve_cblk_cdiag
void solve_cblk_cdiag(const SolverCblk *cblk, int nrhs, pastix_complex32_t *b, int ldb, pastix_complex32_t *work)
Apply the diagonal solve related to one cblk to all the right hand side.
Definition: solve_ctrsmsp.c:616
solver_cblk_s::lcoeftab
void * lcoeftab
Definition: solver.h:142
pastix_ccores.h
PastixUCoef
@ PastixUCoef
Definition: api.h:457
solver_cblk_s::brownum
pastix_int_t brownum
Definition: solver.h:137
PastixLCoef
@ PastixLCoef
Definition: api.h:456
solve_cblk_ctrsmsp_backward
void solve_cblk_ctrsmsp_backward(pastix_solv_mode_t mode, pastix_side_t side, pastix_uplo_t uplo, pastix_trans_t trans, pastix_diag_t diag, const SolverMatrix *datacode, SolverCblk *cblk, int nrhs, pastix_complex32_t *b, int ldb)
Apply a backward solve related to one cblk to all the right hand side.
Definition: solve_ctrsmsp.c:471
solver_cblk_s::ctrbcnt
volatile int32_t ctrbcnt
Definition: solver.h:129
solver_blok_s::coefind
pastix_int_t coefind
Definition: solver.h:114
cblk_getdata
static void * cblk_getdata(const SolverCblk *cblk, pastix_coefside_t side)
Get the pointer to the data associated to the side part of the cblk.
Definition: solver.h:287
pastix_lrblock_s::rk
int rk
Definition: pastix_lowrank.h:113
pastix_diag_t
enum pastix_diag_e pastix_diag_t
Diagonal.
solver_cblk_s::cblktype
int8_t cblktype
Definition: solver.h:130
solver_cblk_s::lcolidx
pastix_int_t lcolidx
Definition: solver.h:136
solve_blok_cgemm
void solve_blok_cgemm(pastix_side_t side, pastix_trans_t trans, pastix_int_t nrhs, const SolverCblk *cblk, const SolverBlok *blok, SolverCblk *fcbk, const void *dataA, const pastix_complex32_t *B, pastix_int_t ldb, pastix_complex32_t *C, pastix_int_t ldc)
Apply a solve gemm update related to a single block of the matrix A.
Definition: solve_ctrsmsp.c:158
solver_cblk_s::fcolnum
pastix_int_t fcolnum
Definition: solver.h:132
solver_blok_s::LRblock
pastix_lrblock_t * LRblock[2]
Definition: solver.h:121
pastix_lrblock_s::rkmax
int rkmax
Definition: pastix_lowrank.h:114
pastix_clrcores.h
solve_cblk_ctrsmsp_forward
void solve_cblk_ctrsmsp_forward(pastix_solv_mode_t mode, pastix_side_t side, pastix_uplo_t uplo, pastix_trans_t trans, pastix_diag_t diag, const SolverMatrix *datacode, const SolverCblk *cblk, int nrhs, pastix_complex32_t *b, int ldb)
Apply a forward solve related to one cblk to all the right hand side.
Definition: solve_ctrsmsp.c:323
PastixLeft
@ PastixLeft
Definition: api.h:473
pastix_side_t
enum pastix_side_e pastix_side_t
Side of the operation.
solve_blok_ctrsm
void solve_blok_ctrsm(pastix_side_t side, pastix_uplo_t uplo, pastix_trans_t trans, pastix_diag_t diag, const SolverCblk *cblk, int nrhs, const void *dataA, pastix_complex32_t *b, int ldb)
Apply a solve trsm update related to a diagonal block of the matrix A.
Definition: solve_ctrsmsp.c:70
solver_blok_s::fcblknm
pastix_int_t fcblknm
Definition: solver.h:110
PastixRight
@ PastixRight
Definition: api.h:474