LAPACK  3.6.1
LAPACK: Linear Algebra PACKage
void F77_ctrsm ( int *  layout,
char *  rtlf,
char *  uplow,
char *  transp,
char *  diagn,
int *  m,
int *  n,
CBLAS_TEST_COMPLEX alpha,
CBLAS_TEST_COMPLEX a,
int *  lda,
CBLAS_TEST_COMPLEX b,
int *  ldb 
)

Definition at line 507 of file c_cblas3.c.

509  {
510  int i,j,LDA,LDB;
511  CBLAS_TEST_COMPLEX *A, *B;
512  CBLAS_SIDE side;
513  CBLAS_DIAG diag;
514  CBLAS_UPLO uplo;
515  CBLAS_TRANSPOSE trans;
516 
517  get_uplo_type(uplow,&uplo);
518  get_transpose_type(transp,&trans);
519  get_diag_type(diagn,&diag);
520  get_side_type(rtlf,&side);
521 
522  if (*layout == TEST_ROW_MJR) {
523  if (side == CblasLeft) {
524  LDA = *m+1;
525  A=(CBLAS_TEST_COMPLEX* )malloc( (*m)*LDA*sizeof(CBLAS_TEST_COMPLEX ) );
526  for( i=0; i<*m; i++ )
527  for( j=0; j<*m; j++ ) {
528  A[i*LDA+j].real=a[j*(*lda)+i].real;
529  A[i*LDA+j].imag=a[j*(*lda)+i].imag;
530  }
531  }
532  else{
533  LDA = *n+1;
534  A=(CBLAS_TEST_COMPLEX* )malloc((*n)*LDA*sizeof(CBLAS_TEST_COMPLEX));
535  for( i=0; i<*n; i++ )
536  for( j=0; j<*n; j++ ) {
537  A[i*LDA+j].real=a[j*(*lda)+i].real;
538  A[i*LDA+j].imag=a[j*(*lda)+i].imag;
539  }
540  }
541  LDB = *n+1;
542  B=(CBLAS_TEST_COMPLEX* )malloc((*m)*LDB*sizeof(CBLAS_TEST_COMPLEX));
543  for( i=0; i<*m; i++ )
544  for( j=0; j<*n; j++ ) {
545  B[i*LDB+j].real=b[j*(*ldb)+i].real;
546  B[i*LDB+j].imag=b[j*(*ldb)+i].imag;
547  }
548  cblas_ctrsm(CblasRowMajor, side, uplo, trans, diag, *m, *n, alpha,
549  A, LDA, B, LDB );
550  for( j=0; j<*n; j++ )
551  for( i=0; i<*m; i++ ) {
552  b[j*(*ldb)+i].real=B[i*LDB+j].real;
553  b[j*(*ldb)+i].imag=B[i*LDB+j].imag;
554  }
555  free(A);
556  free(B);
557  }
558  else if (*layout == TEST_COL_MJR)
559  cblas_ctrsm(CblasColMajor, side, uplo, trans, diag, *m, *n, alpha,
560  a, *lda, b, *ldb);
561  else
562  cblas_ctrsm(UNDEFINED, side, uplo, trans, diag, *m, *n, alpha,
563  a, *lda, b, *ldb);
564 }
void get_transpose_type(char *type, CBLAS_TRANSPOSE *trans)
Definition: auxiliary.c:8
void get_side_type(char *type, CBLAS_SIDE *side)
Definition: auxiliary.c:32
#define UNDEFINED
Definition: c_cblas3.c:12
#define TEST_COL_MJR
Definition: c_cblas3.c:10
#define LDB
Definition: example_user.c:13
CBLAS_SIDE
Definition: cblas.h:23
CBLAS_DIAG
Definition: cblas.h:22
void cblas_ctrsm(CBLAS_LAYOUT layout, CBLAS_SIDE Side, CBLAS_UPLO Uplo, CBLAS_TRANSPOSE TransA, CBLAS_DIAG Diag, const int M, const int N, const void *alpha, const void *A, const int lda, void *B, const int ldb)
Definition: cblas_ctrsm.c:12
CBLAS_TRANSPOSE
Definition: cblas.h:20
#define LDA
Definition: example_user.c:12
void get_diag_type(char *type, CBLAS_DIAG *diag)
Definition: auxiliary.c:25
#define TEST_ROW_MJR
Definition: c_cblas3.c:11
CBLAS_UPLO
Definition: cblas.h:21
void get_uplo_type(char *type, CBLAS_UPLO *uplo)
Definition: auxiliary.c:18

Here is the call graph for this function: