LAPACK  3.10.0 LAPACK: Linear Algebra PACKage

## ◆ F77_dtpmv()

 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 }
CBLAS_UPLO
Definition: cblas.h:21
@ CblasUpper
Definition: cblas.h:21
CBLAS_TRANSPOSE
Definition: cblas.h:20
void cblas_dtpmv(CBLAS_LAYOUT layout, CBLAS_UPLO Uplo, CBLAS_TRANSPOSE TransA, CBLAS_DIAG Diag, const CBLAS_INDEX N, const double *Ap, double *X, const CBLAS_INDEX incX)
Definition: cblas_dtpmv.c:10
@ CblasColMajor
Definition: cblas.h:19
@ CblasRowMajor
Definition: cblas.h:19
CBLAS_DIAG
Definition: cblas.h:22
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:
Here is the caller graph for this function: