LAPACK 3.11.0 LAPACK: Linear Algebra PACKage
Searching...
No Matches

## ◆ F77_stpmv()

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

Definition at line 399 of file c_sblas2.c.

400 {
401 float *A, *AP;
402 int i, j, k, LDA;
403 CBLAS_TRANSPOSE trans;
404 CBLAS_UPLO uplo;
405 CBLAS_DIAG diag;
406
407 get_transpose_type(transp,&trans);
408 get_uplo_type(uplow,&uplo);
409 get_diag_type(diagn,&diag);
410
411 if (*layout == TEST_ROW_MJR) {
412 LDA = *n;
413 A = ( float* )malloc( LDA*LDA*sizeof( float ) );
414 AP = ( float* )malloc( (((LDA+1)*LDA)/2)*sizeof( float ) );
415 if (uplo == CblasUpper) {
416 for( j=0, k=0; j<*n; j++ )
417 for( i=0; i<j+1; i++, k++ )
418 A[ LDA*i+j ]=ap[ k ];
419 for( i=0, k=0; i<*n; i++ )
420 for( j=i; j<*n; j++, k++ )
421 AP[ k ]=A[ LDA*i+j ];
422 }
423 else {
424 for( j=0, k=0; j<*n; j++ )
425 for( i=j; i<*n; i++, k++ )
426 A[ LDA*i+j ]=ap[ k ];
427 for( i=0, k=0; i<*n; i++ )
428 for( j=0; j<i+1; j++, k++ )
429 AP[ k ]=A[ LDA*i+j ];
430 }
431 cblas_stpmv( CblasRowMajor, uplo, trans, diag, *n, AP, x, *incx );
432 free(A); free(AP);
433 }
434 else
435 cblas_stpmv( CblasColMajor, uplo, trans, diag, *n, ap, x, *incx );
436}
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
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: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
#define LDA
Definition: example_user.c:12
Here is the call graph for this function: