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

◆ F77_dtpsv()

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

Definition at line 440 of file c_dblas2.c.

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