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

◆ F77_ctrsm()

void F77_ctrsm ( 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 620 of file c_cblas3.c.

626 {
627 CBLAS_INT i,j,LDA,LDB;
628 CBLAS_TEST_COMPLEX *A, *B;
629 CBLAS_SIDE side;
630 CBLAS_DIAG diag;
631 CBLAS_UPLO uplo;
632 CBLAS_TRANSPOSE trans;
633
634 get_uplo_type(uplow,&uplo);
635 get_transpose_type(transp,&trans);
636 get_diag_type(diagn,&diag);
637 get_side_type(rtlf,&side);
638
639 if (*layout == TEST_ROW_MJR) {
640 if (side == CblasLeft) {
641 LDA = *m+1;
642 A=(CBLAS_TEST_COMPLEX* )malloc( (*m)*LDA*sizeof(CBLAS_TEST_COMPLEX ) );
643 for( i=0; i<*m; i++ )
644 for( j=0; j<*m; j++ ) {
645 A[i*LDA+j].real=a[j*(*lda)+i].real;
646 A[i*LDA+j].imag=a[j*(*lda)+i].imag;
647 }
648 }
649 else{
650 LDA = *n+1;
651 A=(CBLAS_TEST_COMPLEX* )malloc((*n)*LDA*sizeof(CBLAS_TEST_COMPLEX));
652 for( i=0; i<*n; i++ )
653 for( j=0; j<*n; j++ ) {
654 A[i*LDA+j].real=a[j*(*lda)+i].real;
655 A[i*LDA+j].imag=a[j*(*lda)+i].imag;
656 }
657 }
658 LDB = *n+1;
659 B=(CBLAS_TEST_COMPLEX* )malloc((*m)*LDB*sizeof(CBLAS_TEST_COMPLEX));
660 for( i=0; i<*m; i++ )
661 for( j=0; j<*n; j++ ) {
662 B[i*LDB+j].real=b[j*(*ldb)+i].real;
663 B[i*LDB+j].imag=b[j*(*ldb)+i].imag;
664 }
665 cblas_ctrsm(CblasRowMajor, side, uplo, trans, diag, *m, *n, alpha,
666 A, LDA, B, LDB );
667 for( j=0; j<*n; j++ )
668 for( i=0; i<*m; i++ ) {
669 b[j*(*ldb)+i].real=B[i*LDB+j].real;
670 b[j*(*ldb)+i].imag=B[i*LDB+j].imag;
671 }
672 free(A);
673 free(B);
674 }
675 else if (*layout == TEST_COL_MJR)
676 cblas_ctrsm(CblasColMajor, side, uplo, trans, diag, *m, *n, alpha,
677 a, *lda, b, *ldb);
678 else
679 cblas_ctrsm(UNDEFINED, side, uplo, trans, diag, *m, *n, alpha,
680 a, *lda, b, *ldb);
681}
#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
@ CblasColMajor
Definition cblas.h:39
@ CblasRowMajor
Definition cblas.h:39
CBLAS_DIAG
Definition cblas.h:42
void cblas_ctrsm(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_ctrsm.c:12
#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: