LAPACK  3.8.0
LAPACK: Linear Algebra PACKage

◆ F77_ztbmv()

void F77_ztbmv ( int *  layout,
char *  uplow,
char *  transp,
char *  diagn,
int *  n,
int *  k,
CBLAS_TEST_ZOMPLEX a,
int *  lda,
CBLAS_TEST_ZOMPLEX x,
int *  incx 
)

Definition at line 295 of file c_zblas2.c.

297  {
299  int irow, jcol, i, j, LDA;
300  CBLAS_TRANSPOSE trans;
301  CBLAS_UPLO uplo;
302  CBLAS_DIAG diag;
303 
304  get_transpose_type(transp,&trans);
305  get_uplo_type(uplow,&uplo);
306  get_diag_type(diagn,&diag);
307 
308  if (*layout == TEST_ROW_MJR) {
309  if (uplo != CblasUpper && uplo != CblasLower )
310  cblas_ztbmv(CblasRowMajor, UNDEFINED, trans, diag, *n, *k, a, *lda,
311  x, *incx);
312  else {
313  LDA = *k+2;
314  A=(CBLAS_TEST_ZOMPLEX *)malloc((*n+*k)*LDA*sizeof(CBLAS_TEST_ZOMPLEX));
315  if (uplo == CblasUpper) {
316  for( i=0; i<*k; i++ ){
317  irow=*k-i;
318  jcol=(*k)-i;
319  for( j=jcol; j<*n; j++ ) {
320  A[ LDA*(j-jcol)+irow ].real=a[ (*lda)*j+i ].real;
321  A[ LDA*(j-jcol)+irow ].imag=a[ (*lda)*j+i ].imag;
322  }
323  }
324  i=*k;
325  irow=*k-i;
326  for( j=0; j<*n; j++ ) {
327  A[ LDA*j+irow ].real=a[ (*lda)*j+i ].real;
328  A[ LDA*j+irow ].imag=a[ (*lda)*j+i ].imag;
329  }
330  }
331  else {
332  i=0;
333  irow=*k-i;
334  for( j=0; j<*n; j++ ) {
335  A[ LDA*j+irow ].real=a[ (*lda)*j+i ].real;
336  A[ LDA*j+irow ].imag=a[ (*lda)*j+i ].imag;
337  }
338  for( i=1; i<*k+1; i++ ){
339  irow=*k-i;
340  jcol=i;
341  for( j=jcol; j<(*n+*k); j++ ) {
342  A[ LDA*j+irow ].real=a[ (*lda)*(j-jcol)+i ].real;
343  A[ LDA*j+irow ].imag=a[ (*lda)*(j-jcol)+i ].imag;
344  }
345  }
346  }
347  cblas_ztbmv(CblasRowMajor, uplo, trans, diag, *n, *k, A, LDA, x,
348  *incx);
349  free(A);
350  }
351  }
352  else if (*layout == TEST_COL_MJR)
353  cblas_ztbmv(CblasColMajor, uplo, trans, diag, *n, *k, a, *lda, x, *incx);
354  else
355  cblas_ztbmv(UNDEFINED, uplo, trans, diag, *n, *k, a, *lda, x, *incx);
356 }
#define LDA
Definition: example_user.c:12
CBLAS_DIAG
Definition: cblas.h:22
#define UNDEFINED
Definition: cblas_test.h:19
void get_diag_type(char *type, CBLAS_DIAG *diag)
Definition: auxiliary.c:25
void cblas_ztbmv(CBLAS_LAYOUT layout, CBLAS_UPLO Uplo, CBLAS_TRANSPOSE TransA, CBLAS_DIAG Diag, const int N, const int K, const void *A, const int lda, void *X, const int incX)
Definition: cblas_ztbmv.c:10
void get_transpose_type(char *type, CBLAS_TRANSPOSE *trans)
Definition: auxiliary.c:8
#define TEST_ROW_MJR
Definition: cblas_test.h:12
CBLAS_TRANSPOSE
Definition: cblas.h:20
void get_uplo_type(char *type, CBLAS_UPLO *uplo)
Definition: auxiliary.c:18
CBLAS_UPLO
Definition: cblas.h:21
#define TEST_COL_MJR
Definition: cblas_test.h:16
Here is the call graph for this function: