LAPACK  3.6.1
LAPACK: Linear Algebra PACKage
void F77_dtrsm ( 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 284 of file c_dblas3.c.

286  {
287  int i,j,LDA,LDB;
288  double *A, *B;
289  CBLAS_SIDE side;
290  CBLAS_DIAG diag;
291  CBLAS_UPLO uplo;
292  CBLAS_TRANSPOSE trans;
293 
294  get_uplo_type(uplow,&uplo);
295  get_transpose_type(transp,&trans);
296  get_diag_type(diagn,&diag);
297  get_side_type(rtlf,&side);
298 
299  if (*layout == TEST_ROW_MJR) {
300  if (side == CblasLeft) {
301  LDA = *m+1;
302  A = ( double* )malloc( (*m)*LDA*sizeof( double ) );
303  for( i=0; i<*m; i++ )
304  for( j=0; j<*m; j++ )
305  A[i*LDA+j]=a[j*(*lda)+i];
306  }
307  else{
308  LDA = *n+1;
309  A = ( double* )malloc( (*n)*LDA*sizeof( double ) );
310  for( i=0; i<*n; i++ )
311  for( j=0; j<*n; j++ )
312  A[i*LDA+j]=a[j*(*lda)+i];
313  }
314  LDB = *n+1;
315  B = ( double* )malloc( (*m)*LDB*sizeof( double ) );
316  for( i=0; i<*m; i++ )
317  for( j=0; j<*n; j++ )
318  B[i*LDB+j]=b[j*(*ldb)+i];
319  cblas_dtrsm(CblasRowMajor, side, uplo, trans, diag, *m, *n, *alpha,
320  A, LDA, B, LDB );
321  for( j=0; j<*n; j++ )
322  for( i=0; i<*m; i++ )
323  b[j*(*ldb)+i]=B[i*LDB+j];
324  free(A);
325  free(B);
326  }
327  else if (*layout == TEST_COL_MJR)
328  cblas_dtrsm(CblasColMajor, side, uplo, trans, diag, *m, *n, *alpha,
329  a, *lda, b, *ldb);
330  else
331  cblas_dtrsm(UNDEFINED, side, uplo, trans, diag, *m, *n, *alpha,
332  a, *lda, b, *ldb);
333 }
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_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
void cblas_dtrsm(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_dtrsm.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
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: