LAPACK  3.10.0
LAPACK: Linear Algebra PACKage

◆ F77_ztpmv()

void F77_ztpmv ( int *  layout,
char *  uplow,
char *  transp,
char *  diagn,
int *  n,
CBLAS_TEST_ZOMPLEX ap,
CBLAS_TEST_ZOMPLEX x,
int *  incx 
)

Definition at line 422 of file c_zblas2.c.

423  {
424  CBLAS_TEST_ZOMPLEX *A, *AP;
425  int i, j, k, LDA;
426  CBLAS_TRANSPOSE trans;
427  CBLAS_UPLO uplo;
428  CBLAS_DIAG diag;
429 
430  get_transpose_type(transp,&trans);
431  get_uplo_type(uplow,&uplo);
432  get_diag_type(diagn,&diag);
433 
434  if (*layout == TEST_ROW_MJR) {
435  if (uplo != CblasUpper && uplo != CblasLower )
436  cblas_ztpmv( CblasRowMajor, UNDEFINED, trans, diag, *n, ap, x, *incx );
437  else {
438  LDA = *n;
439  A=(CBLAS_TEST_ZOMPLEX*)malloc(LDA*LDA*sizeof(CBLAS_TEST_ZOMPLEX));
440  AP=(CBLAS_TEST_ZOMPLEX*)malloc((((LDA+1)*LDA)/2)*
441  sizeof(CBLAS_TEST_ZOMPLEX));
442  if (uplo == CblasUpper) {
443  for( j=0, k=0; j<*n; j++ )
444  for( i=0; i<j+1; i++, k++ ) {
445  A[ LDA*i+j ].real=ap[ k ].real;
446  A[ LDA*i+j ].imag=ap[ k ].imag;
447  }
448  for( i=0, k=0; i<*n; i++ )
449  for( j=i; j<*n; j++, k++ ) {
450  AP[ k ].real=A[ LDA*i+j ].real;
451  AP[ k ].imag=A[ LDA*i+j ].imag;
452  }
453  }
454  else {
455  for( j=0, k=0; j<*n; j++ )
456  for( i=j; i<*n; i++, k++ ) {
457  A[ LDA*i+j ].real=ap[ k ].real;
458  A[ LDA*i+j ].imag=ap[ k ].imag;
459  }
460  for( i=0, k=0; i<*n; i++ )
461  for( j=0; j<i+1; j++, k++ ) {
462  AP[ k ].real=A[ LDA*i+j ].real;
463  AP[ k ].imag=A[ LDA*i+j ].imag;
464  }
465  }
466  cblas_ztpmv( CblasRowMajor, uplo, trans, diag, *n, AP, x, *incx );
467  free(A);
468  free(AP);
469  }
470  }
471  else if (*layout == TEST_COL_MJR)
472  cblas_ztpmv( CblasColMajor, uplo, trans, diag, *n, ap, x, *incx );
473  else
474  cblas_ztpmv( UNDEFINED, uplo, trans, diag, *n, ap, x, *incx );
475 }
CBLAS_UPLO
Definition: cblas.h:21
@ CblasLower
Definition: cblas.h:21
@ CblasUpper
Definition: cblas.h:21
CBLAS_TRANSPOSE
Definition: cblas.h:20
@ CblasColMajor
Definition: cblas.h:19
@ CblasRowMajor
Definition: cblas.h:19
CBLAS_DIAG
Definition: cblas.h:22
void cblas_ztpmv(CBLAS_LAYOUT layout, CBLAS_UPLO Uplo, CBLAS_TRANSPOSE TransA, CBLAS_DIAG Diag, const CBLAS_INDEX N, const void *Ap, void *X, const CBLAS_INDEX incX)
Definition: cblas_ztpmv.c:10
#define UNDEFINED
Definition: cblas_test.h:19
void get_diag_type(char *type, CBLAS_DIAG *diag)
Definition: auxiliary.c:25
#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
void get_transpose_type(char *type, CBLAS_TRANSPOSE *trans)
Definition: auxiliary.c:8
#define LDA
Definition: example_user.c:12
Here is the call graph for this function:
Here is the caller graph for this function: