void F77_chpmv(int *order, char *uplow, int *n, CBLAS_TEST_COMPLEX *alpha, CBLAS_TEST_COMPLEX *ap, CBLAS_TEST_COMPLEX *x, int *incx, CBLAS_TEST_COMPLEX *beta, CBLAS_TEST_COMPLEX *y, int *incy){ CBLAS_TEST_COMPLEX *A, *AP; int i,j,k,LDA; enum CBLAS_UPLO uplo; get_uplo_type(uplow,&uplo); if (*order == TEST_ROW_MJR) { if (uplo != CblasUpper && uplo != CblasLower ) cblas_chpmv(CblasRowMajor, UNDEFINED, *n, alpha, ap, x, *incx, beta, y, *incy); else { LDA = *n; A = (CBLAS_TEST_COMPLEX* )malloc(LDA*LDA*sizeof(CBLAS_TEST_COMPLEX )); AP = (CBLAS_TEST_COMPLEX* )malloc( (((LDA+1)*LDA)/2)* sizeof( CBLAS_TEST_COMPLEX )); if (uplo == CblasUpper) { for( j=0, k=0; j<*n; j++ ) for( i=0; i<j+1; i++, k++ ) { A[ LDA*i+j ].real=ap[ k ].real; A[ LDA*i+j ].imag=ap[ k ].imag; } for( i=0, k=0; i<*n; i++ ) for( j=i; j<*n; j++, k++ ) { AP[ k ].real=A[ LDA*i+j ].real; AP[ k ].imag=A[ LDA*i+j ].imag; } } else { for( j=0, k=0; j<*n; j++ ) for( i=j; i<*n; i++, k++ ) { A[ LDA*i+j ].real=ap[ k ].real; A[ LDA*i+j ].imag=ap[ k ].imag; } for( i=0, k=0; i<*n; i++ ) for( j=0; j<i+1; j++, k++ ) { AP[ k ].real=A[ LDA*i+j ].real; AP[ k ].imag=A[ LDA*i+j ].imag; } } cblas_chpmv( CblasRowMajor, uplo, *n, alpha, AP, x, *incx, beta, y, *incy ); free(A); free(AP); } } else if (*order == TEST_COL_MJR) cblas_chpmv( CblasColMajor, uplo, *n, alpha, ap, x, *incx, beta, y, *incy ); else cblas_chpmv( UNDEFINED, uplo, *n, alpha, ap, x, *incx, beta, y, *incy ); }
inline void hpmv (CBLAS_ORDER const Order, CBLAS_UPLO const Uplo, int const N, traits::complex_f const& alpha, traits::complex_f const* Ap, traits::complex_f const* X, int const incX, traits::complex_f const& beta, traits::complex_f* Y, int const incY) { cblas_chpmv (Order, Uplo, N, static_cast<void const*> (&alpha), static_cast<void const*> (Ap), static_cast<void const*> (X), incX, static_cast<void const*> (&beta), static_cast<void*> (Y), incY); }