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

Definition at line 400 of file c_dblas2.c.

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

Here is the call graph for this function: