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

◆ F77_stpsv()

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

Definition at line 438 of file c_sblas2.c.

439 {
440 float *A, *AP;
441 int i, j, k, LDA;
442 CBLAS_TRANSPOSE trans;
443 CBLAS_UPLO uplo;
444 CBLAS_DIAG diag;
445
446 get_transpose_type(transp,&trans);
447 get_uplo_type(uplow,&uplo);
448 get_diag_type(diagn,&diag);
449
450 if (*layout == TEST_ROW_MJR) {
451 LDA = *n;
452 A = ( float* )malloc( LDA*LDA*sizeof( float ) );
453 AP = ( float* )malloc( (((LDA+1)*LDA)/2)*sizeof( float ) );
454 if (uplo == CblasUpper) {
455 for( j=0, k=0; j<*n; j++ )
456 for( i=0; i<j+1; i++, k++ )
457 A[ LDA*i+j ]=ap[ k ];
458 for( i=0, k=0; i<*n; i++ )
459 for( j=i; j<*n; j++, k++ )
460 AP[ k ]=A[ LDA*i+j ];
461
462 }
463 else {
464 for( j=0, k=0; j<*n; j++ )
465 for( i=j; i<*n; i++, k++ )
466 A[ LDA*i+j ]=ap[ k ];
467 for( i=0, k=0; i<*n; i++ )
468 for( j=0; j<i+1; j++, k++ )
469 AP[ k ]=A[ LDA*i+j ];
470 }
471 cblas_stpsv( CblasRowMajor, uplo, trans, diag, *n, AP, x, *incx );
472 free(A); free(AP);
473 }
474 else
475 cblas_stpsv( CblasColMajor, uplo, trans, diag, *n, ap, x, *incx );
476}
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
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: