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

Definition at line 233 of file c_dblas3.c.

235  {
236  int i,j,LDA,LDB;
237  double *A, *B;
238  CBLAS_SIDE side;
239  CBLAS_DIAG diag;
240  CBLAS_UPLO uplo;
241  CBLAS_TRANSPOSE trans;
242 
243  get_uplo_type(uplow,&uplo);
244  get_transpose_type(transp,&trans);
245  get_diag_type(diagn,&diag);
246  get_side_type(rtlf,&side);
247 
248  if (*layout == TEST_ROW_MJR) {
249  if (side == CblasLeft) {
250  LDA = *m+1;
251  A = ( double* )malloc( (*m)*LDA*sizeof( double ) );
252  for( i=0; i<*m; i++ )
253  for( j=0; j<*m; j++ )
254  A[i*LDA+j]=a[j*(*lda)+i];
255  }
256  else{
257  LDA = *n+1;
258  A = ( double* )malloc( (*n)*LDA*sizeof( double ) );
259  for( i=0; i<*n; i++ )
260  for( j=0; j<*n; j++ )
261  A[i*LDA+j]=a[j*(*lda)+i];
262  }
263  LDB = *n+1;
264  B = ( double* )malloc( (*m)*LDB*sizeof( double ) );
265  for( i=0; i<*m; i++ )
266  for( j=0; j<*n; j++ )
267  B[i*LDB+j]=b[j*(*ldb)+i];
268  cblas_dtrmm(CblasRowMajor, side, uplo, trans, diag, *m, *n, *alpha,
269  A, LDA, B, LDB );
270  for( j=0; j<*n; j++ )
271  for( i=0; i<*m; i++ )
272  b[j*(*ldb)+i]=B[i*LDB+j];
273  free(A);
274  free(B);
275  }
276  else if (*layout == TEST_COL_MJR)
277  cblas_dtrmm(CblasColMajor, side, uplo, trans, diag, *m, *n, *alpha,
278  a, *lda, b, *ldb);
279  else
280  cblas_dtrmm(UNDEFINED, side, uplo, trans, diag, *m, *n, *alpha,
281  a, *lda, b, *ldb);
282 }
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_dtrmm(CBLAS_LAYOUT layout, CBLAS_SIDE Side, CBLAS_UPLO Uplo, CBLAS_TRANSPOSE TransA, CBLAS_DIAG Diag, const int M, const int N, const double alpha, const double *A, const int lda, double *B, const int ldb)
Definition: cblas_dtrmm.c:12
#define UNDEFINED
Definition: c_dblas3.c:12
#define TEST_COL_MJR
Definition: c_dblas3.c:10
#define TEST_ROW_MJR
Definition: c_dblas3.c:11
#define LDB
Definition: example_user.c:13
CBLAS_SIDE
Definition: cblas.h:23
CBLAS_DIAG
Definition: cblas.h:22
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

Here is the call graph for this function: