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

Definition at line 448 of file c_zblas3.c.

450  {
451  int i,j,LDA,LDB;
452  CBLAS_TEST_ZOMPLEX *A, *B;
453  CBLAS_SIDE side;
454  CBLAS_DIAG diag;
455  CBLAS_UPLO uplo;
456  CBLAS_TRANSPOSE trans;
457 
458  get_uplo_type(uplow,&uplo);
459  get_transpose_type(transp,&trans);
460  get_diag_type(diagn,&diag);
461  get_side_type(rtlf,&side);
462 
463  if (*layout == TEST_ROW_MJR) {
464  if (side == CblasLeft) {
465  LDA = *m+1;
466  A=(CBLAS_TEST_ZOMPLEX* )malloc((*m)*LDA*sizeof(CBLAS_TEST_ZOMPLEX));
467  for( i=0; i<*m; i++ )
468  for( j=0; j<*m; j++ ) {
469  A[i*LDA+j].real=a[j*(*lda)+i].real;
470  A[i*LDA+j].imag=a[j*(*lda)+i].imag;
471  }
472  }
473  else{
474  LDA = *n+1;
475  A=(CBLAS_TEST_ZOMPLEX* )malloc((*n)*LDA*sizeof(CBLAS_TEST_ZOMPLEX));
476  for( i=0; i<*n; i++ )
477  for( j=0; j<*n; j++ ) {
478  A[i*LDA+j].real=a[j*(*lda)+i].real;
479  A[i*LDA+j].imag=a[j*(*lda)+i].imag;
480  }
481  }
482  LDB = *n+1;
483  B=(CBLAS_TEST_ZOMPLEX* )malloc((*m)*LDB*sizeof(CBLAS_TEST_ZOMPLEX));
484  for( i=0; i<*m; i++ )
485  for( j=0; j<*n; j++ ) {
486  B[i*LDB+j].real=b[j*(*ldb)+i].real;
487  B[i*LDB+j].imag=b[j*(*ldb)+i].imag;
488  }
489  cblas_ztrmm(CblasRowMajor, side, uplo, trans, diag, *m, *n, alpha,
490  A, LDA, B, LDB );
491  for( j=0; j<*n; j++ )
492  for( i=0; i<*m; i++ ) {
493  b[j*(*ldb)+i].real=B[i*LDB+j].real;
494  b[j*(*ldb)+i].imag=B[i*LDB+j].imag;
495  }
496  free(A);
497  free(B);
498  }
499  else if (*layout == TEST_COL_MJR)
500  cblas_ztrmm(CblasColMajor, side, uplo, trans, diag, *m, *n, alpha,
501  a, *lda, b, *ldb);
502  else
503  cblas_ztrmm(UNDEFINED, side, uplo, trans, diag, *m, *n, alpha,
504  a, *lda, b, *ldb);
505 }
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
void cblas_ztrmm(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_ztrmm.c:12
#define LDB
Definition: example_user.c:13
CBLAS_SIDE
Definition: cblas.h:23
CBLAS_DIAG
Definition: cblas.h:22
#define UNDEFINED
Definition: c_zblas3.c:12
#define TEST_COL_MJR
Definition: c_zblas3.c:10
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
CBLAS_UPLO
Definition: cblas.h:21
void get_uplo_type(char *type, CBLAS_UPLO *uplo)
Definition: auxiliary.c:18
#define TEST_ROW_MJR
Definition: c_zblas3.c:11

Here is the call graph for this function: