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

◆ F77_ztrsm()

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

Definition at line 507 of file c_zblas3.c.

509 {
510 CBLAS_INT i,j,LDA,LDB;
511 CBLAS_TEST_ZOMPLEX *A, *B;
512 CBLAS_SIDE side;
513 CBLAS_DIAG diag;
514 CBLAS_UPLO uplo;
515 CBLAS_TRANSPOSE trans;
516
517 get_uplo_type(uplow,&uplo);
518 get_transpose_type(transp,&trans);
519 get_diag_type(diagn,&diag);
520 get_side_type(rtlf,&side);
521
522 if (*layout == TEST_ROW_MJR) {
523 if (side == CblasLeft) {
524 LDA = *m+1;
525 A=(CBLAS_TEST_ZOMPLEX* )malloc( (*m)*LDA*sizeof(CBLAS_TEST_ZOMPLEX ) );
526 for( i=0; i<*m; i++ )
527 for( j=0; j<*m; j++ ) {
528 A[i*LDA+j].real=a[j*(*lda)+i].real;
529 A[i*LDA+j].imag=a[j*(*lda)+i].imag;
530 }
531 }
532 else{
533 LDA = *n+1;
534 A=(CBLAS_TEST_ZOMPLEX* )malloc((*n)*LDA*sizeof(CBLAS_TEST_ZOMPLEX));
535 for( i=0; i<*n; i++ )
536 for( j=0; j<*n; j++ ) {
537 A[i*LDA+j].real=a[j*(*lda)+i].real;
538 A[i*LDA+j].imag=a[j*(*lda)+i].imag;
539 }
540 }
541 LDB = *n+1;
542 B=(CBLAS_TEST_ZOMPLEX* )malloc((*m)*LDB*sizeof(CBLAS_TEST_ZOMPLEX));
543 for( i=0; i<*m; i++ )
544 for( j=0; j<*n; j++ ) {
545 B[i*LDB+j].real=b[j*(*ldb)+i].real;
546 B[i*LDB+j].imag=b[j*(*ldb)+i].imag;
547 }
548 cblas_ztrsm(CblasRowMajor, side, uplo, trans, diag, *m, *n, alpha,
549 A, LDA, B, LDB );
550 for( j=0; j<*n; j++ )
551 for( i=0; i<*m; i++ ) {
552 b[j*(*ldb)+i].real=B[i*LDB+j].real;
553 b[j*(*ldb)+i].imag=B[i*LDB+j].imag;
554 }
555 free(A);
556 free(B);
557 }
558 else if (*layout == TEST_COL_MJR)
559 cblas_ztrsm(CblasColMajor, side, uplo, trans, diag, *m, *n, alpha,
560 a, *lda, b, *ldb);
561 else
562 cblas_ztrsm(UNDEFINED, side, uplo, trans, diag, *m, *n, alpha,
563 a, *lda, b, *ldb);
564}
#define UNDEFINED
Definition c_zblas3.c:12
#define TEST_ROW_MJR
Definition c_zblas3.c:11
#define TEST_COL_MJR
Definition c_zblas3.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
#define CBLAS_INT
Definition cblas.h:24
void cblas_ztrsm(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_ztrsm.c:12
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: