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

◆ F77_dtpmv()

void F77_dtpmv ( CBLAS_INT layout,
char *  uplow,
char *  transp,
char *  diagn,
CBLAS_INT n,
double *  ap,
double *  x,
CBLAS_INT incx 
)

Definition at line 400 of file c_dblas2.c.

401 {
402 double *A, *AP;
403 CBLAS_INT i, j, k, LDA;
404 CBLAS_TRANSPOSE trans;
405 CBLAS_UPLO uplo;
406 CBLAS_DIAG diag;
407
408 get_transpose_type(transp,&trans);
409 get_uplo_type(uplow,&uplo);
410 get_diag_type(diagn,&diag);
411
412 if (*layout == TEST_ROW_MJR) {
413 LDA = *n;
414 A = ( double* )malloc( LDA*LDA*sizeof( double ) );
415 AP = ( double* )malloc( (((LDA+1)*LDA)/2)*sizeof( double ) );
416 if (uplo == CblasUpper) {
417 for( j=0, k=0; j<*n; j++ )
418 for( i=0; i<j+1; i++, k++ )
419 A[ LDA*i+j ]=ap[ k ];
420 for( i=0, k=0; i<*n; i++ )
421 for( j=i; j<*n; j++, k++ )
422 AP[ k ]=A[ LDA*i+j ];
423 }
424 else {
425 for( j=0, k=0; j<*n; j++ )
426 for( i=j; i<*n; i++, k++ )
427 A[ LDA*i+j ]=ap[ k ];
428 for( i=0, k=0; i<*n; i++ )
429 for( j=0; j<i+1; j++, k++ )
430 AP[ k ]=A[ LDA*i+j ];
431 }
432 cblas_dtpmv( CblasRowMajor, uplo, trans, diag, *n, AP, x, *incx );
433 free(A);
434 free(AP);
435 }
436 else
437 cblas_dtpmv( CblasColMajor, uplo, trans, diag, *n, ap, x, *incx );
438}
CBLAS_UPLO
Definition cblas.h:41
@ CblasUpper
Definition cblas.h:41
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
void cblas_dtpmv(CBLAS_LAYOUT layout, CBLAS_UPLO Uplo, CBLAS_TRANSPOSE TransA, CBLAS_DIAG Diag, const CBLAS_INT N, const double *Ap, double *X, const CBLAS_INT incX)
Definition cblas_dtpmv.c:10
void get_diag_type(char *type, CBLAS_DIAG *diag)
Definition auxiliary.c:25
#define TEST_ROW_MJR
Definition cblas_test.h:12
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: