LAPACK  3.6.1
LAPACK: Linear Algebra PACKage
void F77_ctbmv ( int *  layout,
char *  uplow,
char *  transp,
char *  diagn,
int *  n,
int *  k,
CBLAS_TEST_COMPLEX a,
int *  lda,
CBLAS_TEST_COMPLEX x,
int *  incx 
)

Definition at line 295 of file c_cblas2.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_ctbmv(CblasRowMajor, UNDEFINED, trans, diag, *n, *k, a, *lda,
311  x, *incx);
312  else {
313  LDA = *k+2;
314  A=(CBLAS_TEST_COMPLEX *)malloc((*n+*k)*LDA*sizeof(CBLAS_TEST_COMPLEX));
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_ctbmv(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_ctbmv(CblasColMajor, uplo, trans, diag, *n, *k, a, *lda, x, *incx);
354  else
355  cblas_ctbmv(UNDEFINED, uplo, trans, diag, *n, *k, a, *lda, x, *incx);
356 }
void get_transpose_type(char *type, CBLAS_TRANSPOSE *trans)
Definition: auxiliary.c:8
void cblas_ctbmv(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_ctbmv.c:10
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 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: