LAPACK  3.6.1
LAPACK: Linear Algebra PACKage
void F77_ctpsv ( int *  layout,
char *  uplow,
char *  transp,
char *  diagn,
int *  n,
CBLAS_TEST_COMPLEX ap,
CBLAS_TEST_COMPLEX x,
int *  incx 
)

Definition at line 477 of file c_cblas2.c.

478  {
479  CBLAS_TEST_COMPLEX *A, *AP;
480  int i, j, k, LDA;
481  CBLAS_TRANSPOSE trans;
482  CBLAS_UPLO uplo;
483  CBLAS_DIAG diag;
484 
485  get_transpose_type(transp,&trans);
486  get_uplo_type(uplow,&uplo);
487  get_diag_type(diagn,&diag);
488 
489  if (*layout == TEST_ROW_MJR) {
490  if (uplo != CblasUpper && uplo != CblasLower )
491  cblas_ctpsv( CblasRowMajor, UNDEFINED, trans, diag, *n, ap, x, *incx );
492  else {
493  LDA = *n;
494  A=(CBLAS_TEST_COMPLEX*)malloc(LDA*LDA*sizeof(CBLAS_TEST_COMPLEX));
495  AP=(CBLAS_TEST_COMPLEX*)malloc((((LDA+1)*LDA)/2)*
496  sizeof(CBLAS_TEST_COMPLEX));
497  if (uplo == CblasUpper) {
498  for( j=0, k=0; j<*n; j++ )
499  for( i=0; i<j+1; i++, k++ ) {
500  A[ LDA*i+j ].real=ap[ k ].real;
501  A[ LDA*i+j ].imag=ap[ k ].imag;
502  }
503  for( i=0, k=0; i<*n; i++ )
504  for( j=i; j<*n; j++, k++ ) {
505  AP[ k ].real=A[ LDA*i+j ].real;
506  AP[ k ].imag=A[ LDA*i+j ].imag;
507  }
508  }
509  else {
510  for( j=0, k=0; j<*n; j++ )
511  for( i=j; i<*n; i++, k++ ) {
512  A[ LDA*i+j ].real=ap[ k ].real;
513  A[ LDA*i+j ].imag=ap[ k ].imag;
514  }
515  for( i=0, k=0; i<*n; i++ )
516  for( j=0; j<i+1; j++, k++ ) {
517  AP[ k ].real=A[ LDA*i+j ].real;
518  AP[ k ].imag=A[ LDA*i+j ].imag;
519  }
520  }
521  cblas_ctpsv( CblasRowMajor, uplo, trans, diag, *n, AP, x, *incx );
522  free(A);
523  free(AP);
524  }
525  }
526  else if (*layout == TEST_COL_MJR)
527  cblas_ctpsv( CblasColMajor, uplo, trans, diag, *n, ap, x, *incx );
528  else
529  cblas_ctpsv( UNDEFINED, uplo, trans, diag, *n, ap, x, *incx );
530 }
void get_transpose_type(char *type, CBLAS_TRANSPOSE *trans)
Definition: auxiliary.c:8
CBLAS_DIAG
Definition: cblas.h:22
CBLAS_TRANSPOSE
Definition: cblas.h:20
#define LDA
Definition: example_user.c:12
void get_diag_type(char *type, CBLAS_DIAG *diag)
Definition: auxiliary.c:25
#define UNDEFINED
Definition: cblas_test.h:19
#define TEST_COL_MJR
Definition: cblas_test.h:16
CBLAS_UPLO
Definition: cblas.h:21
void cblas_ctpsv(CBLAS_LAYOUT layout, CBLAS_UPLO Uplo, CBLAS_TRANSPOSE TransA, CBLAS_DIAG Diag, const int N, const void *Ap, void *X, const int incX)
Definition: cblas_ctpsv.c:10
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: