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

◆ F77_stpsv()

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

Definition at line 486 of file c_sblas2.c.

491 {
492 float *A, *AP;
493 CBLAS_INT i, j, k, LDA;
494 CBLAS_TRANSPOSE trans;
495 CBLAS_UPLO uplo;
496 CBLAS_DIAG diag;
497
498 get_transpose_type(transp,&trans);
499 get_uplo_type(uplow,&uplo);
500 get_diag_type(diagn,&diag);
501
502 if (*layout == TEST_ROW_MJR) {
503 LDA = *n;
504 A = ( float* )malloc( LDA*LDA*sizeof( float ) );
505 AP = ( float* )malloc( (((LDA+1)*LDA)/2)*sizeof( float ) );
506 if (uplo == CblasUpper) {
507 for( j=0, k=0; j<*n; j++ )
508 for( i=0; i<j+1; i++, k++ )
509 A[ LDA*i+j ]=ap[ k ];
510 for( i=0, k=0; i<*n; i++ )
511 for( j=i; j<*n; j++, k++ )
512 AP[ k ]=A[ LDA*i+j ];
513
514 }
515 else {
516 for( j=0, k=0; j<*n; j++ )
517 for( i=j; i<*n; i++, k++ )
518 A[ LDA*i+j ]=ap[ k ];
519 for( i=0, k=0; i<*n; i++ )
520 for( j=0; j<i+1; j++, k++ )
521 AP[ k ]=A[ LDA*i+j ];
522 }
523 cblas_stpsv( CblasRowMajor, uplo, trans, diag, *n, AP, x, *incx );
524 free(A); free(AP);
525 }
526 else
527 cblas_stpsv( CblasColMajor, uplo, trans, diag, *n, ap, x, *incx );
528}
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_stpsv(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_stpsv.c:10
#define CBLAS_INT
Definition cblas.h:24
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: