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

Definition at line 281 of file c_sblas3.c.

283  {
284  int i,j,LDA,LDB;
285  float *A, *B;
286  CBLAS_SIDE side;
287  CBLAS_DIAG diag;
288  CBLAS_UPLO uplo;
289  CBLAS_TRANSPOSE trans;
290 
291  get_uplo_type(uplow,&uplo);
292  get_transpose_type(transp,&trans);
293  get_diag_type(diagn,&diag);
294  get_side_type(rtlf,&side);
295 
296  if (*layout == TEST_ROW_MJR) {
297  if (side == CblasLeft) {
298  LDA = *m+1;
299  A = ( float* )malloc( (*m)*LDA*sizeof( float ) );
300  for( i=0; i<*m; i++ )
301  for( j=0; j<*m; j++ )
302  A[i*LDA+j]=a[j*(*lda)+i];
303  }
304  else{
305  LDA = *n+1;
306  A = ( float* )malloc( (*n)*LDA*sizeof( float ) );
307  for( i=0; i<*n; i++ )
308  for( j=0; j<*n; j++ )
309  A[i*LDA+j]=a[j*(*lda)+i];
310  }
311  LDB = *n+1;
312  B = ( float* )malloc( (*m)*LDB*sizeof( float ) );
313  for( i=0; i<*m; i++ )
314  for( j=0; j<*n; j++ )
315  B[i*LDB+j]=b[j*(*ldb)+i];
316  cblas_strsm(CblasRowMajor, side, uplo, trans, diag, *m, *n, *alpha,
317  A, LDA, B, LDB );
318  for( j=0; j<*n; j++ )
319  for( i=0; i<*m; i++ )
320  b[j*(*ldb)+i]=B[i*LDB+j];
321  free(A);
322  free(B);
323  }
324  else if (*layout == TEST_COL_MJR)
325  cblas_strsm(CblasColMajor, side, uplo, trans, diag, *m, *n, *alpha,
326  a, *lda, b, *ldb);
327  else
328  cblas_strsm(UNDEFINED, side, uplo, trans, diag, *m, *n, *alpha,
329  a, *lda, b, *ldb);
330 }
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 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 cblas_strsm(CBLAS_LAYOUT layout, CBLAS_SIDE Side, CBLAS_UPLO Uplo, CBLAS_TRANSPOSE TransA, CBLAS_DIAG Diag, const int M, const int N, const float alpha, const float *A, const int lda, float *B, const int ldb)
Definition: cblas_strsm.c:12
void get_diag_type(char *type, CBLAS_DIAG *diag)
Definition: auxiliary.c:25
#define UNDEFINED
Definition: cblas_test.h:19
#define TEST_COL_MJR
Definition: cblas_test.h:16
CBLAS_UPLO
Definition: cblas.h:21
void get_uplo_type(char *type, CBLAS_UPLO *uplo)
Definition: auxiliary.c:18
#define TEST_ROW_MJR
Definition: cblas_test.h:12

Here is the call graph for this function: