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

◆ F77_ctpmv()

void F77_ctpmv ( CBLAS_INT layout,
char *  uplow,
char *  transp,
char *  diagn,
CBLAS_INT n,
CBLAS_TEST_COMPLEX ap,
CBLAS_TEST_COMPLEX x,
CBLAS_INT incx 
)

Definition at line 422 of file c_cblas2.c.

423 {
424 CBLAS_TEST_COMPLEX *A, *AP;
425 CBLAS_INT i, j, k, LDA;
426 CBLAS_TRANSPOSE trans;
427 CBLAS_UPLO uplo;
428 CBLAS_DIAG diag;
429
430 get_transpose_type(transp,&trans);
431 get_uplo_type(uplow,&uplo);
432 get_diag_type(diagn,&diag);
433
434 if (*layout == TEST_ROW_MJR) {
435 if (uplo != CblasUpper && uplo != CblasLower )
436 cblas_ctpmv( CblasRowMajor, UNDEFINED, trans, diag, *n, ap, x, *incx );
437 else {
438 LDA = *n;
439 A=(CBLAS_TEST_COMPLEX*)malloc(LDA*LDA*sizeof(CBLAS_TEST_COMPLEX));
440 AP=(CBLAS_TEST_COMPLEX*)malloc((((LDA+1)*LDA)/2)*
441 sizeof(CBLAS_TEST_COMPLEX));
442 if (uplo == CblasUpper) {
443 for( j=0, k=0; j<*n; j++ )
444 for( i=0; i<j+1; i++, k++ ) {
445 A[ LDA*i+j ].real=ap[ k ].real;
446 A[ LDA*i+j ].imag=ap[ k ].imag;
447 }
448 for( i=0, k=0; i<*n; i++ )
449 for( j=i; j<*n; j++, k++ ) {
450 AP[ k ].real=A[ LDA*i+j ].real;
451 AP[ k ].imag=A[ LDA*i+j ].imag;
452 }
453 }
454 else {
455 for( j=0, k=0; j<*n; j++ )
456 for( i=j; i<*n; i++, k++ ) {
457 A[ LDA*i+j ].real=ap[ k ].real;
458 A[ LDA*i+j ].imag=ap[ k ].imag;
459 }
460 for( i=0, k=0; i<*n; i++ )
461 for( j=0; j<i+1; j++, k++ ) {
462 AP[ k ].real=A[ LDA*i+j ].real;
463 AP[ k ].imag=A[ LDA*i+j ].imag;
464 }
465 }
466 cblas_ctpmv( CblasRowMajor, uplo, trans, diag, *n, AP, x, *incx );
467 free(A);
468 free(AP);
469 }
470 }
471 else if (*layout == TEST_COL_MJR)
472 cblas_ctpmv( CblasColMajor, uplo, trans, diag, *n, ap, x, *incx );
473 else
474 cblas_ctpmv( UNDEFINED, uplo, trans, diag, *n, ap, x, *incx );
475}
CBLAS_UPLO
Definition cblas.h:41
@ CblasLower
Definition cblas.h:41
@ CblasUpper
Definition cblas.h:41
void cblas_ctpmv(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_ctpmv.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: