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

◆ F77_dtrmm()

void F77_dtrmm ( 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 328 of file c_dblas3.c.

334 {
335 CBLAS_INT i,j,LDA,LDB;
336 double *A, *B;
337 CBLAS_SIDE side;
338 CBLAS_DIAG diag;
339 CBLAS_UPLO uplo;
340 CBLAS_TRANSPOSE trans;
341
342 get_uplo_type(uplow,&uplo);
343 get_transpose_type(transp,&trans);
344 get_diag_type(diagn,&diag);
345 get_side_type(rtlf,&side);
346
347 if (*layout == TEST_ROW_MJR) {
348 if (side == CblasLeft) {
349 LDA = *m+1;
350 A = ( double* )malloc( (*m)*LDA*sizeof( double ) );
351 for( i=0; i<*m; i++ )
352 for( j=0; j<*m; j++ )
353 A[i*LDA+j]=a[j*(*lda)+i];
354 }
355 else{
356 LDA = *n+1;
357 A = ( double* )malloc( (*n)*LDA*sizeof( double ) );
358 for( i=0; i<*n; i++ )
359 for( j=0; j<*n; j++ )
360 A[i*LDA+j]=a[j*(*lda)+i];
361 }
362 LDB = *n+1;
363 B = ( double* )malloc( (*m)*LDB*sizeof( double ) );
364 for( i=0; i<*m; i++ )
365 for( j=0; j<*n; j++ )
366 B[i*LDB+j]=b[j*(*ldb)+i];
367 cblas_dtrmm(CblasRowMajor, side, uplo, trans, diag, *m, *n, *alpha,
368 A, LDA, B, LDB );
369 for( j=0; j<*n; j++ )
370 for( i=0; i<*m; i++ )
371 b[j*(*ldb)+i]=B[i*LDB+j];
372 free(A);
373 free(B);
374 }
375 else if (*layout == TEST_COL_MJR)
376 cblas_dtrmm(CblasColMajor, side, uplo, trans, diag, *m, *n, *alpha,
377 a, *lda, b, *ldb);
378 else
379 cblas_dtrmm(UNDEFINED, side, uplo, trans, diag, *m, *n, *alpha,
380 a, *lda, b, *ldb);
381}
#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
CBLAS_UPLO
Definition cblas.h:41
void cblas_dtrmm(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_dtrmm.c:12
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: