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

◆ F77_stpmv()

void F77_stpmv ( CBLAS_INT * layout,
char * uplow,
char * transp,
char * diagn,
CBLAS_INT * n,
float * ap,
float * x,
CBLAS_INT * incx )

Definition at line 443 of file c_sblas2.c.

448 {
449 float *A, *AP;
450 CBLAS_INT i, j, k, LDA;
451 CBLAS_TRANSPOSE trans;
452 CBLAS_UPLO uplo;
453 CBLAS_DIAG diag;
454
455 get_transpose_type(transp,&trans);
456 get_uplo_type(uplow,&uplo);
457 get_diag_type(diagn,&diag);
458
459 if (*layout == TEST_ROW_MJR) {
460 LDA = *n;
461 A = ( float* )malloc( LDA*LDA*sizeof( float ) );
462 AP = ( float* )malloc( (((LDA+1)*LDA)/2)*sizeof( float ) );
463 if (uplo == CblasUpper) {
464 for( j=0, k=0; j<*n; j++ )
465 for( i=0; i<j+1; i++, k++ )
466 A[ LDA*i+j ]=ap[ k ];
467 for( i=0, k=0; i<*n; i++ )
468 for( j=i; j<*n; j++, k++ )
469 AP[ k ]=A[ LDA*i+j ];
470 }
471 else {
472 for( j=0, k=0; j<*n; j++ )
473 for( i=j; i<*n; i++, k++ )
474 A[ LDA*i+j ]=ap[ k ];
475 for( i=0, k=0; i<*n; i++ )
476 for( j=0; j<i+1; j++, k++ )
477 AP[ k ]=A[ LDA*i+j ];
478 }
479 cblas_stpmv( CblasRowMajor, uplo, trans, diag, *n, AP, x, *incx );
480 free(A); free(AP);
481 }
482 else
483 cblas_stpmv( CblasColMajor, uplo, trans, diag, *n, ap, x, *incx );
484}
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_stpmv(CBLAS_LAYOUT layout, CBLAS_UPLO Uplo, CBLAS_TRANSPOSE TransA, CBLAS_DIAG Diag, const CBLAS_INT N, const float *Ap, float *X, const CBLAS_INT incX)
Definition cblas_stpmv.c:11
void get_diag_type(char *type, CBLAS_DIAG *diag)
Definition auxiliary.c:25
#define TEST_ROW_MJR
Definition cblas_test.h:21
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: