LAPACK  3.6.1
LAPACK: Linear Algebra PACKage
void F77_dtpsv ( int *  layout,
char *  uplow,
char *  transp,
char *  diagn,
int *  n,
double *  ap,
double *  x,
int *  incx 
)

Definition at line 440 of file c_dblas2.c.

441  {
442  double *A, *AP;
443  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 }
void get_transpose_type(char *type, CBLAS_TRANSPOSE *trans)
Definition: auxiliary.c:8
void cblas_dtpsv(CBLAS_LAYOUT layout, CBLAS_UPLO Uplo, CBLAS_TRANSPOSE TransA, CBLAS_DIAG Diag, const int N, const double *Ap, double *X, const int incX)
Definition: cblas_dtpsv.c:10
CBLAS_DIAG
Definition: cblas.h:22
CBLAS_TRANSPOSE
Definition: cblas.h:20
#define LDA
Definition: example_user.c:12
void get_diag_type(char *type, CBLAS_DIAG *diag)
Definition: auxiliary.c:25
CBLAS_UPLO
Definition: cblas.h:21
void get_uplo_type(char *type, CBLAS_UPLO *uplo)
Definition: auxiliary.c:18
#define TEST_ROW_MJR
Definition: cblas_test.h:12

Here is the call graph for this function: