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

◆ F77_chpmv()

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

Definition at line 255 of file c_cblas2.c.

261 {
262
263 CBLAS_TEST_COMPLEX *A, *AP;
264 CBLAS_INT i,j,k,LDA;
265 CBLAS_UPLO uplo;
266
267 get_uplo_type(uplow,&uplo);
268 if (*layout == TEST_ROW_MJR) {
269 if (uplo != CblasUpper && uplo != CblasLower )
270 cblas_chpmv(CblasRowMajor, UNDEFINED, *n, alpha, ap, x, *incx,
271 beta, y, *incy);
272 else {
273 LDA = *n;
274 A = (CBLAS_TEST_COMPLEX* )malloc(LDA*LDA*sizeof(CBLAS_TEST_COMPLEX ));
275 AP = (CBLAS_TEST_COMPLEX* )malloc( (((LDA+1)*LDA)/2)*
276 sizeof( CBLAS_TEST_COMPLEX ));
277 if (uplo == CblasUpper) {
278 for( j=0, k=0; j<*n; j++ )
279 for( i=0; i<j+1; i++, k++ ) {
280 A[ LDA*i+j ].real=ap[ k ].real;
281 A[ LDA*i+j ].imag=ap[ k ].imag;
282 }
283 for( i=0, k=0; i<*n; i++ )
284 for( j=i; j<*n; j++, k++ ) {
285 AP[ k ].real=A[ LDA*i+j ].real;
286 AP[ k ].imag=A[ LDA*i+j ].imag;
287 }
288 }
289 else {
290 for( j=0, k=0; j<*n; j++ )
291 for( i=j; i<*n; i++, k++ ) {
292 A[ LDA*i+j ].real=ap[ k ].real;
293 A[ LDA*i+j ].imag=ap[ k ].imag;
294 }
295 for( i=0, k=0; i<*n; i++ )
296 for( j=0; j<i+1; j++, k++ ) {
297 AP[ k ].real=A[ LDA*i+j ].real;
298 AP[ k ].imag=A[ LDA*i+j ].imag;
299 }
300 }
301 cblas_chpmv( CblasRowMajor, uplo, *n, alpha, AP, x, *incx, beta, y,
302 *incy );
303 free(A);
304 free(AP);
305 }
306 }
307 else if (*layout == TEST_COL_MJR)
308 cblas_chpmv( CblasColMajor, uplo, *n, alpha, ap, x, *incx, beta, y,
309 *incy );
310 else
311 cblas_chpmv( UNDEFINED, uplo, *n, alpha, ap, x, *incx, beta, y,
312 *incy );
313}
CBLAS_UPLO
Definition cblas.h:41
@ CblasLower
Definition cblas.h:41
@ CblasUpper
Definition cblas.h:41
void cblas_chpmv(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_chpmv.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:28
#define TEST_ROW_MJR
Definition cblas_test.h:21
#define TEST_COL_MJR
Definition cblas_test.h:25
void get_uplo_type(char *type, CBLAS_UPLO *uplo)
Definition auxiliary.c:18
Here is the call graph for this function: