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

◆ F77_dtrsm()

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

Definition at line 383 of file c_dblas3.c.

389 {
390 CBLAS_INT i,j,LDA,LDB;
391 double *A, *B;
392 CBLAS_SIDE side;
393 CBLAS_DIAG diag;
394 CBLAS_UPLO uplo;
395 CBLAS_TRANSPOSE trans;
396
397 get_uplo_type(uplow,&uplo);
398 get_transpose_type(transp,&trans);
399 get_diag_type(diagn,&diag);
400 get_side_type(rtlf,&side);
401
402 if (*layout == TEST_ROW_MJR) {
403 if (side == CblasLeft) {
404 LDA = *m+1;
405 A = ( double* )malloc( (*m)*LDA*sizeof( double ) );
406 for( i=0; i<*m; i++ )
407 for( j=0; j<*m; j++ )
408 A[i*LDA+j]=a[j*(*lda)+i];
409 }
410 else{
411 LDA = *n+1;
412 A = ( double* )malloc( (*n)*LDA*sizeof( double ) );
413 for( i=0; i<*n; i++ )
414 for( j=0; j<*n; j++ )
415 A[i*LDA+j]=a[j*(*lda)+i];
416 }
417 LDB = *n+1;
418 B = ( double* )malloc( (*m)*LDB*sizeof( double ) );
419 for( i=0; i<*m; i++ )
420 for( j=0; j<*n; j++ )
421 B[i*LDB+j]=b[j*(*ldb)+i];
422 cblas_dtrsm(CblasRowMajor, side, uplo, trans, diag, *m, *n, *alpha,
423 A, LDA, B, LDB );
424 for( j=0; j<*n; j++ )
425 for( i=0; i<*m; i++ )
426 b[j*(*ldb)+i]=B[i*LDB+j];
427 free(A);
428 free(B);
429 }
430 else if (*layout == TEST_COL_MJR)
431 cblas_dtrsm(CblasColMajor, side, uplo, trans, diag, *m, *n, *alpha,
432 a, *lda, b, *ldb);
433 else
434 cblas_dtrsm(UNDEFINED, side, uplo, trans, diag, *m, *n, *alpha,
435 a, *lda, b, *ldb);
436}
#define UNDEFINED
Definition c_dblas3.c:12
#define TEST_ROW_MJR
Definition c_dblas3.c:11
#define TEST_COL_MJR
Definition c_dblas3.c:10
void cblas_dtrsm(CBLAS_LAYOUT layout, CBLAS_SIDE Side, CBLAS_UPLO Uplo, CBLAS_TRANSPOSE TransA, CBLAS_DIAG Diag, const CBLAS_INT M, const CBLAS_INT N, const double alpha, const double *A, const CBLAS_INT lda, double *B, const CBLAS_INT ldb)
Definition cblas_dtrsm.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
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
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: