LAPACK 3.12.1
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 509 of file c_zblas2.c.

514 {
515 CBLAS_TEST_ZOMPLEX *A, *AP;
516 CBLAS_INT i, j, k, LDA;
517 CBLAS_TRANSPOSE trans;
518 CBLAS_UPLO uplo;
519 CBLAS_DIAG diag;
520
521 get_transpose_type(transp,&trans);
522 get_uplo_type(uplow,&uplo);
523 get_diag_type(diagn,&diag);
524
525 if (*layout == TEST_ROW_MJR) {
526 if (uplo != CblasUpper && uplo != CblasLower )
527 cblas_ztpsv( CblasRowMajor, UNDEFINED, trans, diag, *n, ap, x, *incx );
528 else {
529 LDA = *n;
530 A=(CBLAS_TEST_ZOMPLEX*)malloc(LDA*LDA*sizeof(CBLAS_TEST_ZOMPLEX));
531 AP=(CBLAS_TEST_ZOMPLEX*)malloc((((LDA+1)*LDA)/2)*
532 sizeof(CBLAS_TEST_ZOMPLEX));
533 if (uplo == CblasUpper) {
534 for( j=0, k=0; j<*n; j++ )
535 for( i=0; i<j+1; i++, k++ ) {
536 A[ LDA*i+j ].real=ap[ k ].real;
537 A[ LDA*i+j ].imag=ap[ k ].imag;
538 }
539 for( i=0, k=0; i<*n; i++ )
540 for( j=i; j<*n; j++, k++ ) {
541 AP[ k ].real=A[ LDA*i+j ].real;
542 AP[ k ].imag=A[ LDA*i+j ].imag;
543 }
544 }
545 else {
546 for( j=0, k=0; j<*n; j++ )
547 for( i=j; i<*n; i++, k++ ) {
548 A[ LDA*i+j ].real=ap[ k ].real;
549 A[ LDA*i+j ].imag=ap[ k ].imag;
550 }
551 for( i=0, k=0; i<*n; i++ )
552 for( j=0; j<i+1; j++, k++ ) {
553 AP[ k ].real=A[ LDA*i+j ].real;
554 AP[ k ].imag=A[ LDA*i+j ].imag;
555 }
556 }
557 cblas_ztpsv( CblasRowMajor, uplo, trans, diag, *n, AP, x, *incx );
558 free(A);
559 free(AP);
560 }
561 }
562 else if (*layout == TEST_COL_MJR)
563 cblas_ztpsv( CblasColMajor, uplo, trans, diag, *n, ap, x, *incx );
564 else
565 cblas_ztpsv( UNDEFINED, uplo, trans, diag, *n, ap, x, *incx );
566}
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:28
void get_diag_type(char *type, CBLAS_DIAG *diag)
Definition auxiliary.c:25
#define TEST_ROW_MJR
Definition cblas_test.h:21
#define TEST_COL_MJR
Definition cblas_test.h:25
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: