LAPACK 3.12.0
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 233 of file c_dblas3.c.

235 {
236 CBLAS_INT i,j,LDA,LDB;
237 double *A, *B;
238 CBLAS_SIDE side;
239 CBLAS_DIAG diag;
240 CBLAS_UPLO uplo;
241 CBLAS_TRANSPOSE trans;
242
243 get_uplo_type(uplow,&uplo);
244 get_transpose_type(transp,&trans);
245 get_diag_type(diagn,&diag);
246 get_side_type(rtlf,&side);
247
248 if (*layout == TEST_ROW_MJR) {
249 if (side == CblasLeft) {
250 LDA = *m+1;
251 A = ( double* )malloc( (*m)*LDA*sizeof( double ) );
252 for( i=0; i<*m; i++ )
253 for( j=0; j<*m; j++ )
254 A[i*LDA+j]=a[j*(*lda)+i];
255 }
256 else{
257 LDA = *n+1;
258 A = ( double* )malloc( (*n)*LDA*sizeof( double ) );
259 for( i=0; i<*n; i++ )
260 for( j=0; j<*n; j++ )
261 A[i*LDA+j]=a[j*(*lda)+i];
262 }
263 LDB = *n+1;
264 B = ( double* )malloc( (*m)*LDB*sizeof( double ) );
265 for( i=0; i<*m; i++ )
266 for( j=0; j<*n; j++ )
267 B[i*LDB+j]=b[j*(*ldb)+i];
268 cblas_dtrmm(CblasRowMajor, side, uplo, trans, diag, *m, *n, *alpha,
269 A, LDA, B, LDB );
270 for( j=0; j<*n; j++ )
271 for( i=0; i<*m; i++ )
272 b[j*(*ldb)+i]=B[i*LDB+j];
273 free(A);
274 free(B);
275 }
276 else if (*layout == TEST_COL_MJR)
277 cblas_dtrmm(CblasColMajor, side, uplo, trans, diag, *m, *n, *alpha,
278 a, *lda, b, *ldb);
279 else
280 cblas_dtrmm(UNDEFINED, side, uplo, trans, diag, *m, *n, *alpha,
281 a, *lda, b, *ldb);
282}
#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: