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

◆ F77_ctrmm()

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

Definition at line 448 of file c_cblas3.c.

450 {
451 CBLAS_INT i,j,LDA,LDB;
452 CBLAS_TEST_COMPLEX *A, *B;
453 CBLAS_SIDE side;
454 CBLAS_DIAG diag;
455 CBLAS_UPLO uplo;
456 CBLAS_TRANSPOSE trans;
457
458 get_uplo_type(uplow,&uplo);
459 get_transpose_type(transp,&trans);
460 get_diag_type(diagn,&diag);
461 get_side_type(rtlf,&side);
462
463 if (*layout == TEST_ROW_MJR) {
464 if (side == CblasLeft) {
465 LDA = *m+1;
466 A=(CBLAS_TEST_COMPLEX* )malloc((*m)*LDA*sizeof(CBLAS_TEST_COMPLEX));
467 for( i=0; i<*m; i++ )
468 for( j=0; j<*m; j++ ) {
469 A[i*LDA+j].real=a[j*(*lda)+i].real;
470 A[i*LDA+j].imag=a[j*(*lda)+i].imag;
471 }
472 }
473 else{
474 LDA = *n+1;
475 A=(CBLAS_TEST_COMPLEX* )malloc((*n)*LDA*sizeof(CBLAS_TEST_COMPLEX));
476 for( i=0; i<*n; i++ )
477 for( j=0; j<*n; j++ ) {
478 A[i*LDA+j].real=a[j*(*lda)+i].real;
479 A[i*LDA+j].imag=a[j*(*lda)+i].imag;
480 }
481 }
482 LDB = *n+1;
483 B=(CBLAS_TEST_COMPLEX* )malloc((*m)*LDB*sizeof(CBLAS_TEST_COMPLEX));
484 for( i=0; i<*m; i++ )
485 for( j=0; j<*n; j++ ) {
486 B[i*LDB+j].real=b[j*(*ldb)+i].real;
487 B[i*LDB+j].imag=b[j*(*ldb)+i].imag;
488 }
489 cblas_ctrmm(CblasRowMajor, side, uplo, trans, diag, *m, *n, alpha,
490 A, LDA, B, LDB );
491 for( j=0; j<*n; j++ )
492 for( i=0; i<*m; i++ ) {
493 b[j*(*ldb)+i].real=B[i*LDB+j].real;
494 b[j*(*ldb)+i].imag=B[i*LDB+j].imag;
495 }
496 free(A);
497 free(B);
498 }
499 else if (*layout == TEST_COL_MJR)
500 cblas_ctrmm(CblasColMajor, side, uplo, trans, diag, *m, *n, alpha,
501 a, *lda, b, *ldb);
502 else
503 cblas_ctrmm(UNDEFINED, side, uplo, trans, diag, *m, *n, alpha,
504 a, *lda, b, *ldb);
505}
#define UNDEFINED
Definition c_cblas3.c:12
#define TEST_ROW_MJR
Definition c_cblas3.c:11
#define TEST_COL_MJR
Definition c_cblas3.c:10
CBLAS_UPLO
Definition cblas.h:41
CBLAS_TRANSPOSE
Definition cblas.h:40
CBLAS_SIDE
Definition cblas.h:43
@ CblasLeft
Definition cblas.h:43
void cblas_ctrmm(CBLAS_LAYOUT layout, CBLAS_SIDE Side, CBLAS_UPLO Uplo, CBLAS_TRANSPOSE TransA, CBLAS_DIAG Diag, const CBLAS_INT M, const CBLAS_INT N, const void *alpha, const void *A, const CBLAS_INT lda, void *B, const CBLAS_INT ldb)
Definition cblas_ctrmm.c:12
@ 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: