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

◆ F77_ztpmv()

void F77_ztpmv ( 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 450 of file c_zblas2.c.

455 {
456 CBLAS_TEST_ZOMPLEX *A, *AP;
457 CBLAS_INT i, j, k, LDA;
458 CBLAS_TRANSPOSE trans;
459 CBLAS_UPLO uplo;
460 CBLAS_DIAG diag;
461
462 get_transpose_type(transp,&trans);
463 get_uplo_type(uplow,&uplo);
464 get_diag_type(diagn,&diag);
465
466 if (*layout == TEST_ROW_MJR) {
467 if (uplo != CblasUpper && uplo != CblasLower )
468 cblas_ztpmv( CblasRowMajor, UNDEFINED, trans, diag, *n, ap, x, *incx );
469 else {
470 LDA = *n;
471 A=(CBLAS_TEST_ZOMPLEX*)malloc(LDA*LDA*sizeof(CBLAS_TEST_ZOMPLEX));
472 AP=(CBLAS_TEST_ZOMPLEX*)malloc((((LDA+1)*LDA)/2)*
473 sizeof(CBLAS_TEST_ZOMPLEX));
474 if (uplo == CblasUpper) {
475 for( j=0, k=0; j<*n; j++ )
476 for( i=0; i<j+1; i++, k++ ) {
477 A[ LDA*i+j ].real=ap[ k ].real;
478 A[ LDA*i+j ].imag=ap[ k ].imag;
479 }
480 for( i=0, k=0; i<*n; i++ )
481 for( j=i; j<*n; j++, k++ ) {
482 AP[ k ].real=A[ LDA*i+j ].real;
483 AP[ k ].imag=A[ LDA*i+j ].imag;
484 }
485 }
486 else {
487 for( j=0, k=0; j<*n; j++ )
488 for( i=j; i<*n; i++, k++ ) {
489 A[ LDA*i+j ].real=ap[ k ].real;
490 A[ LDA*i+j ].imag=ap[ k ].imag;
491 }
492 for( i=0, k=0; i<*n; i++ )
493 for( j=0; j<i+1; j++, k++ ) {
494 AP[ k ].real=A[ LDA*i+j ].real;
495 AP[ k ].imag=A[ LDA*i+j ].imag;
496 }
497 }
498 cblas_ztpmv( CblasRowMajor, uplo, trans, diag, *n, AP, x, *incx );
499 free(A);
500 free(AP);
501 }
502 }
503 else if (*layout == TEST_COL_MJR)
504 cblas_ztpmv( CblasColMajor, uplo, trans, diag, *n, ap, x, *incx );
505 else
506 cblas_ztpmv( UNDEFINED, uplo, trans, diag, *n, ap, x, *incx );
507}
CBLAS_UPLO
Definition cblas.h:41
@ CblasLower
Definition cblas.h:41
@ CblasUpper
Definition cblas.h:41
void cblas_ztpmv(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_ztpmv.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: