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

286 {
287 CBLAS_INT i,j,LDA,LDB;
288 double *A, *B;
289 CBLAS_SIDE side;
290 CBLAS_DIAG diag;
291 CBLAS_UPLO uplo;
292 CBLAS_TRANSPOSE trans;
293
294 get_uplo_type(uplow,&uplo);
295 get_transpose_type(transp,&trans);
296 get_diag_type(diagn,&diag);
297 get_side_type(rtlf,&side);
298
299 if (*layout == TEST_ROW_MJR) {
300 if (side == CblasLeft) {
301 LDA = *m+1;
302 A = ( double* )malloc( (*m)*LDA*sizeof( double ) );
303 for( i=0; i<*m; i++ )
304 for( j=0; j<*m; j++ )
305 A[i*LDA+j]=a[j*(*lda)+i];
306 }
307 else{
308 LDA = *n+1;
309 A = ( double* )malloc( (*n)*LDA*sizeof( double ) );
310 for( i=0; i<*n; i++ )
311 for( j=0; j<*n; j++ )
312 A[i*LDA+j]=a[j*(*lda)+i];
313 }
314 LDB = *n+1;
315 B = ( double* )malloc( (*m)*LDB*sizeof( double ) );
316 for( i=0; i<*m; i++ )
317 for( j=0; j<*n; j++ )
318 B[i*LDB+j]=b[j*(*ldb)+i];
319 cblas_dtrsm(CblasRowMajor, side, uplo, trans, diag, *m, *n, *alpha,
320 A, LDA, B, LDB );
321 for( j=0; j<*n; j++ )
322 for( i=0; i<*m; i++ )
323 b[j*(*ldb)+i]=B[i*LDB+j];
324 free(A);
325 free(B);
326 }
327 else if (*layout == TEST_COL_MJR)
328 cblas_dtrsm(CblasColMajor, side, uplo, trans, diag, *m, *n, *alpha,
329 a, *lda, b, *ldb);
330 else
331 cblas_dtrsm(UNDEFINED, side, uplo, trans, diag, *m, *n, *alpha,
332 a, *lda, b, *ldb);
333}
#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: