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

◆ F77_ztpsv()

void F77_ztpsv ( CBLAS_INT layout,
char *  uplow,
char *  transp,
char *  diagn,
CBLAS_INT n,
CBLAS_TEST_ZOMPLEX ap,
CBLAS_TEST_ZOMPLEX x,
CBLAS_INT incx 
)

Definition at line 477 of file c_zblas2.c.

478 {
479 CBLAS_TEST_ZOMPLEX *A, *AP;
480 CBLAS_INT i, j, k, LDA;
481 CBLAS_TRANSPOSE trans;
482 CBLAS_UPLO uplo;
483 CBLAS_DIAG diag;
484
485 get_transpose_type(transp,&trans);
486 get_uplo_type(uplow,&uplo);
487 get_diag_type(diagn,&diag);
488
489 if (*layout == TEST_ROW_MJR) {
490 if (uplo != CblasUpper && uplo != CblasLower )
491 cblas_ztpsv( CblasRowMajor, UNDEFINED, trans, diag, *n, ap, x, *incx );
492 else {
493 LDA = *n;
494 A=(CBLAS_TEST_ZOMPLEX*)malloc(LDA*LDA*sizeof(CBLAS_TEST_ZOMPLEX));
495 AP=(CBLAS_TEST_ZOMPLEX*)malloc((((LDA+1)*LDA)/2)*
496 sizeof(CBLAS_TEST_ZOMPLEX));
497 if (uplo == CblasUpper) {
498 for( j=0, k=0; j<*n; j++ )
499 for( i=0; i<j+1; i++, k++ ) {
500 A[ LDA*i+j ].real=ap[ k ].real;
501 A[ LDA*i+j ].imag=ap[ k ].imag;
502 }
503 for( i=0, k=0; i<*n; i++ )
504 for( j=i; j<*n; j++, k++ ) {
505 AP[ k ].real=A[ LDA*i+j ].real;
506 AP[ k ].imag=A[ LDA*i+j ].imag;
507 }
508 }
509 else {
510 for( j=0, k=0; j<*n; j++ )
511 for( i=j; i<*n; i++, k++ ) {
512 A[ LDA*i+j ].real=ap[ k ].real;
513 A[ LDA*i+j ].imag=ap[ k ].imag;
514 }
515 for( i=0, k=0; i<*n; i++ )
516 for( j=0; j<i+1; j++, k++ ) {
517 AP[ k ].real=A[ LDA*i+j ].real;
518 AP[ k ].imag=A[ LDA*i+j ].imag;
519 }
520 }
521 cblas_ztpsv( CblasRowMajor, uplo, trans, diag, *n, AP, x, *incx );
522 free(A);
523 free(AP);
524 }
525 }
526 else if (*layout == TEST_COL_MJR)
527 cblas_ztpsv( CblasColMajor, uplo, trans, diag, *n, ap, x, *incx );
528 else
529 cblas_ztpsv( UNDEFINED, uplo, trans, diag, *n, ap, x, *incx );
530}
CBLAS_UPLO
Definition cblas.h:41
@ CblasLower
Definition cblas.h:41
@ CblasUpper
Definition cblas.h:41
void cblas_ztpsv(CBLAS_LAYOUT layout, CBLAS_UPLO Uplo, CBLAS_TRANSPOSE TransA, CBLAS_DIAG Diag, const CBLAS_INT N, const void *Ap, void *X, const CBLAS_INT incX)
Definition cblas_ztpsv.c:10
CBLAS_TRANSPOSE
Definition cblas.h:40
@ CblasColMajor
Definition cblas.h:39
@ CblasRowMajor
Definition cblas.h:39
CBLAS_DIAG
Definition cblas.h:42
#define CBLAS_INT
Definition cblas.h:24
#define UNDEFINED
Definition cblas_test.h:19
void get_diag_type(char *type, CBLAS_DIAG *diag)
Definition auxiliary.c:25
#define TEST_ROW_MJR
Definition cblas_test.h:12
#define TEST_COL_MJR
Definition cblas_test.h:16
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: