LAPACK  3.6.1
LAPACK: Linear Algebra PACKage
void F77_zhpmv ( int *  layout,
char *  uplow,
int *  n,
CBLAS_TEST_ZOMPLEX alpha,
CBLAS_TEST_ZOMPLEX ap,
CBLAS_TEST_ZOMPLEX x,
int *  incx,
CBLAS_TEST_ZOMPLEX beta,
CBLAS_TEST_ZOMPLEX y,
int *  incy 
)

Definition at line 239 of file c_zblas2.c.

241  {
242 
243  CBLAS_TEST_ZOMPLEX *A, *AP;
244  int i,j,k,LDA;
245  CBLAS_UPLO uplo;
246 
247  get_uplo_type(uplow,&uplo);
248  if (*layout == TEST_ROW_MJR) {
249  if (uplo != CblasUpper && uplo != CblasLower )
250  cblas_zhpmv(CblasRowMajor, UNDEFINED, *n, alpha, ap, x, *incx,
251  beta, y, *incy);
252  else {
253  LDA = *n;
254  A = (CBLAS_TEST_ZOMPLEX* )malloc(LDA*LDA*sizeof(CBLAS_TEST_ZOMPLEX ));
255  AP = (CBLAS_TEST_ZOMPLEX* )malloc( (((LDA+1)*LDA)/2)*
256  sizeof( CBLAS_TEST_ZOMPLEX ));
257  if (uplo == CblasUpper) {
258  for( j=0, k=0; j<*n; j++ )
259  for( i=0; i<j+1; i++, k++ ) {
260  A[ LDA*i+j ].real=ap[ k ].real;
261  A[ LDA*i+j ].imag=ap[ k ].imag;
262  }
263  for( i=0, k=0; i<*n; i++ )
264  for( j=i; j<*n; j++, k++ ) {
265  AP[ k ].real=A[ LDA*i+j ].real;
266  AP[ k ].imag=A[ LDA*i+j ].imag;
267  }
268  }
269  else {
270  for( j=0, k=0; j<*n; j++ )
271  for( i=j; i<*n; i++, k++ ) {
272  A[ LDA*i+j ].real=ap[ k ].real;
273  A[ LDA*i+j ].imag=ap[ k ].imag;
274  }
275  for( i=0, k=0; i<*n; i++ )
276  for( j=0; j<i+1; j++, k++ ) {
277  AP[ k ].real=A[ LDA*i+j ].real;
278  AP[ k ].imag=A[ LDA*i+j ].imag;
279  }
280  }
281  cblas_zhpmv( CblasRowMajor, uplo, *n, alpha, AP, x, *incx, beta, y,
282  *incy );
283  free(A);
284  free(AP);
285  }
286  }
287  else if (*layout == TEST_COL_MJR)
288  cblas_zhpmv( CblasColMajor, uplo, *n, alpha, ap, x, *incx, beta, y,
289  *incy );
290  else
291  cblas_zhpmv( UNDEFINED, uplo, *n, alpha, ap, x, *incx, beta, y,
292  *incy );
293 }
#define LDA
Definition: example_user.c:12
#define UNDEFINED
Definition: cblas_test.h:19
#define TEST_COL_MJR
Definition: cblas_test.h:16
void cblas_zhpmv(CBLAS_LAYOUT layout, CBLAS_UPLO Uplo, const int N, const void *alpha, const void *Ap, const void *X, const int incX, const void *beta, void *Y, const int incY)
Definition: cblas_zhpmv.c:12
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: