LAPACK 3.12.0
LAPACK: Linear Algebra PACKage
Loading...
Searching...
No Matches

◆ F77_zhpmv()

void F77_zhpmv ( CBLAS_INT layout,
char *  uplow,
CBLAS_INT n,
CBLAS_TEST_ZOMPLEX alpha,
CBLAS_TEST_ZOMPLEX ap,
CBLAS_TEST_ZOMPLEX x,
CBLAS_INT incx,
CBLAS_TEST_ZOMPLEX beta,
CBLAS_TEST_ZOMPLEX y,
CBLAS_INT incy 
)

Definition at line 239 of file c_zblas2.c.

241 {
242
243 CBLAS_TEST_ZOMPLEX *A, *AP;
244 CBLAS_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}
CBLAS_UPLO
Definition cblas.h:41
@ CblasLower
Definition cblas.h:41
@ CblasUpper
Definition cblas.h:41
void cblas_zhpmv(CBLAS_LAYOUT layout, CBLAS_UPLO Uplo, const CBLAS_INT N, const void *alpha, const void *Ap, const void *X, const CBLAS_INT incX, const void *beta, void *Y, const CBLAS_INT incY)
Definition cblas_zhpmv.c:12
@ CblasColMajor
Definition cblas.h:39
@ CblasRowMajor
Definition cblas.h:39
#define CBLAS_INT
Definition cblas.h:24
#define UNDEFINED
Definition cblas_test.h:19
#define TEST_ROW_MJR
Definition cblas_test.h:12
#define TEST_COL_MJR
Definition cblas_test.h:16
void get_uplo_type(char *type, CBLAS_UPLO *uplo)
Definition auxiliary.c:18
Here is the call graph for this function: