LAPACK 3.12.1
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 557 of file c_cblas3.c.

563 {
564 CBLAS_INT i,j,LDA,LDB;
565 CBLAS_TEST_COMPLEX *A, *B;
566 CBLAS_SIDE side;
567 CBLAS_DIAG diag;
568 CBLAS_UPLO uplo;
569 CBLAS_TRANSPOSE trans;
570
571 get_uplo_type(uplow,&uplo);
572 get_transpose_type(transp,&trans);
573 get_diag_type(diagn,&diag);
574 get_side_type(rtlf,&side);
575
576 if (*layout == TEST_ROW_MJR) {
577 if (side == CblasLeft) {
578 LDA = *m+1;
579 A=(CBLAS_TEST_COMPLEX* )malloc((*m)*LDA*sizeof(CBLAS_TEST_COMPLEX));
580 for( i=0; i<*m; i++ )
581 for( j=0; j<*m; j++ ) {
582 A[i*LDA+j].real=a[j*(*lda)+i].real;
583 A[i*LDA+j].imag=a[j*(*lda)+i].imag;
584 }
585 }
586 else{
587 LDA = *n+1;
588 A=(CBLAS_TEST_COMPLEX* )malloc((*n)*LDA*sizeof(CBLAS_TEST_COMPLEX));
589 for( i=0; i<*n; i++ )
590 for( j=0; j<*n; j++ ) {
591 A[i*LDA+j].real=a[j*(*lda)+i].real;
592 A[i*LDA+j].imag=a[j*(*lda)+i].imag;
593 }
594 }
595 LDB = *n+1;
596 B=(CBLAS_TEST_COMPLEX* )malloc((*m)*LDB*sizeof(CBLAS_TEST_COMPLEX));
597 for( i=0; i<*m; i++ )
598 for( j=0; j<*n; j++ ) {
599 B[i*LDB+j].real=b[j*(*ldb)+i].real;
600 B[i*LDB+j].imag=b[j*(*ldb)+i].imag;
601 }
602 cblas_ctrmm(CblasRowMajor, side, uplo, trans, diag, *m, *n, alpha,
603 A, LDA, B, LDB );
604 for( j=0; j<*n; j++ )
605 for( i=0; i<*m; i++ ) {
606 b[j*(*ldb)+i].real=B[i*LDB+j].real;
607 b[j*(*ldb)+i].imag=B[i*LDB+j].imag;
608 }
609 free(A);
610 free(B);
611 }
612 else if (*layout == TEST_COL_MJR)
613 cblas_ctrmm(CblasColMajor, side, uplo, trans, diag, *m, *n, alpha,
614 a, *lda, b, *ldb);
615 else
616 cblas_ctrmm(UNDEFINED, side, uplo, trans, diag, *m, *n, alpha,
617 a, *lda, b, *ldb);
618}
#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: