LAPACK 3.12.1
LAPACK: Linear Algebra PACKage
Loading...
Searching...
No Matches

◆ F77_strsm()

void F77_strsm ( CBLAS_INT * layout,
char * rtlf,
char * uplow,
char * transp,
char * diagn,
CBLAS_INT * m,
CBLAS_INT * n,
float * alpha,
float * a,
CBLAS_INT * lda,
float * b,
CBLAS_INT * ldb )

Definition at line 377 of file c_sblas3.c.

383 {
384 CBLAS_INT i,j,LDA,LDB;
385 float *A, *B;
386 CBLAS_SIDE side;
387 CBLAS_DIAG diag;
388 CBLAS_UPLO uplo;
389 CBLAS_TRANSPOSE trans;
390
391 get_uplo_type(uplow,&uplo);
392 get_transpose_type(transp,&trans);
393 get_diag_type(diagn,&diag);
394 get_side_type(rtlf,&side);
395
396 if (*layout == TEST_ROW_MJR) {
397 if (side == CblasLeft) {
398 LDA = *m+1;
399 A = ( float* )malloc( (*m)*LDA*sizeof( float ) );
400 for( i=0; i<*m; i++ )
401 for( j=0; j<*m; j++ )
402 A[i*LDA+j]=a[j*(*lda)+i];
403 }
404 else{
405 LDA = *n+1;
406 A = ( float* )malloc( (*n)*LDA*sizeof( float ) );
407 for( i=0; i<*n; i++ )
408 for( j=0; j<*n; j++ )
409 A[i*LDA+j]=a[j*(*lda)+i];
410 }
411 LDB = *n+1;
412 B = ( float* )malloc( (*m)*LDB*sizeof( float ) );
413 for( i=0; i<*m; i++ )
414 for( j=0; j<*n; j++ )
415 B[i*LDB+j]=b[j*(*ldb)+i];
416 cblas_strsm(CblasRowMajor, side, uplo, trans, diag, *m, *n, *alpha,
417 A, LDA, B, LDB );
418 for( j=0; j<*n; j++ )
419 for( i=0; i<*m; i++ )
420 b[j*(*ldb)+i]=B[i*LDB+j];
421 free(A);
422 free(B);
423 }
424 else if (*layout == TEST_COL_MJR)
425 cblas_strsm(CblasColMajor, side, uplo, trans, diag, *m, *n, *alpha,
426 a, *lda, b, *ldb);
427 else
428 cblas_strsm(UNDEFINED, side, uplo, trans, diag, *m, *n, *alpha,
429 a, *lda, b, *ldb);
430}
void cblas_strsm(CBLAS_LAYOUT layout, CBLAS_SIDE Side, CBLAS_UPLO Uplo, CBLAS_TRANSPOSE TransA, CBLAS_DIAG Diag, const CBLAS_INT M, const CBLAS_INT N, const float alpha, const float *A, const CBLAS_INT lda, float *B, const CBLAS_INT ldb)
Definition cblas_strsm.c:12
CBLAS_UPLO
Definition cblas.h:41
CBLAS_TRANSPOSE
Definition cblas.h:40
CBLAS_SIDE
Definition cblas.h:43
@ CblasLeft
Definition cblas.h:43
@ CblasColMajor
Definition cblas.h:39
@ CblasRowMajor
Definition cblas.h:39
CBLAS_DIAG
Definition cblas.h:42
#define CBLAS_INT
Definition cblas.h:24
#define UNDEFINED
Definition cblas_test.h:28
void get_diag_type(char *type, CBLAS_DIAG *diag)
Definition auxiliary.c:25
void get_side_type(char *type, CBLAS_SIDE *side)
Definition auxiliary.c:32
#define TEST_ROW_MJR
Definition cblas_test.h:21
#define TEST_COL_MJR
Definition cblas_test.h:25
void get_uplo_type(char *type, CBLAS_UPLO *uplo)
Definition auxiliary.c:18
void get_transpose_type(char *type, CBLAS_TRANSPOSE *trans)
Definition auxiliary.c:8
Here is the call graph for this function: