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

◆ F77_dspmv()

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

Definition at line 362 of file c_dblas2.c.

363 {
364 double *A,*AP;
365 CBLAS_INT i,j,k,LDA;
366 CBLAS_UPLO uplo;
367
368 get_uplo_type(uplow,&uplo);
369
370 if (*layout == TEST_ROW_MJR) {
371 LDA = *n;
372 A = ( double* )malloc( LDA*LDA*sizeof( double ) );
373 AP = ( double* )malloc( (((LDA+1)*LDA)/2)*sizeof( double ) );
374 if (uplo == CblasUpper) {
375 for( j=0, k=0; j<*n; j++ )
376 for( i=0; i<j+1; i++, k++ )
377 A[ LDA*i+j ]=ap[ k ];
378 for( i=0, k=0; i<*n; i++ )
379 for( j=i; j<*n; j++, k++ )
380 AP[ k ]=A[ LDA*i+j ];
381 }
382 else {
383 for( j=0, k=0; j<*n; j++ )
384 for( i=j; i<*n; i++, k++ )
385 A[ LDA*i+j ]=ap[ k ];
386 for( i=0, k=0; i<*n; i++ )
387 for( j=0; j<i+1; j++, k++ )
388 AP[ k ]=A[ LDA*i+j ];
389 }
390 cblas_dspmv( CblasRowMajor, uplo, *n, *alpha, AP, x, *incx, *beta, y,
391 *incy );
392 free(A);
393 free(AP);
394 }
395 else
396 cblas_dspmv( CblasColMajor, uplo, *n, *alpha, ap, x, *incx, *beta, y,
397 *incy );
398}
CBLAS_UPLO
Definition cblas.h:41
@ CblasUpper
Definition cblas.h:41
@ CblasColMajor
Definition cblas.h:39
@ CblasRowMajor
Definition cblas.h:39
void cblas_dspmv(CBLAS_LAYOUT layout, CBLAS_UPLO Uplo, const CBLAS_INT N, const double alpha, const double *Ap, const double *X, const CBLAS_INT incX, const double beta, double *Y, const CBLAS_INT incY)
Definition cblas_dspmv.c:13
#define CBLAS_INT
Definition cblas.h:24
#define TEST_ROW_MJR
Definition cblas_test.h:12
void get_uplo_type(char *type, CBLAS_UPLO *uplo)
Definition auxiliary.c:18
Here is the call graph for this function: