LAPACK  3.6.1
LAPACK: Linear Algebra PACKage
void F77_ctbsv ( 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 358 of file c_cblas2.c.

360  {
361 
363  int irow, jcol, i, j, LDA;
364  CBLAS_TRANSPOSE trans;
365  CBLAS_UPLO uplo;
366  CBLAS_DIAG diag;
367 
368  get_transpose_type(transp,&trans);
369  get_uplo_type(uplow,&uplo);
370  get_diag_type(diagn,&diag);
371 
372  if (*layout == TEST_ROW_MJR) {
373  if (uplo != CblasUpper && uplo != CblasLower )
374  cblas_ctbsv(CblasRowMajor, UNDEFINED, trans, diag, *n, *k, a, *lda, x,
375  *incx);
376  else {
377  LDA = *k+2;
378  A=(CBLAS_TEST_COMPLEX*)malloc((*n+*k)*LDA*sizeof(CBLAS_TEST_COMPLEX ));
379  if (uplo == CblasUpper) {
380  for( i=0; i<*k; i++ ){
381  irow=*k-i;
382  jcol=(*k)-i;
383  for( j=jcol; j<*n; j++ ) {
384  A[ LDA*(j-jcol)+irow ].real=a[ (*lda)*j+i ].real;
385  A[ LDA*(j-jcol)+irow ].imag=a[ (*lda)*j+i ].imag;
386  }
387  }
388  i=*k;
389  irow=*k-i;
390  for( j=0; j<*n; j++ ) {
391  A[ LDA*j+irow ].real=a[ (*lda)*j+i ].real;
392  A[ LDA*j+irow ].imag=a[ (*lda)*j+i ].imag;
393  }
394  }
395  else {
396  i=0;
397  irow=*k-i;
398  for( j=0; j<*n; j++ ) {
399  A[ LDA*j+irow ].real=a[ (*lda)*j+i ].real;
400  A[ LDA*j+irow ].imag=a[ (*lda)*j+i ].imag;
401  }
402  for( i=1; i<*k+1; i++ ){
403  irow=*k-i;
404  jcol=i;
405  for( j=jcol; j<(*n+*k); j++ ) {
406  A[ LDA*j+irow ].real=a[ (*lda)*(j-jcol)+i ].real;
407  A[ LDA*j+irow ].imag=a[ (*lda)*(j-jcol)+i ].imag;
408  }
409  }
410  }
411  cblas_ctbsv(CblasRowMajor, uplo, trans, diag, *n, *k, A, LDA,
412  x, *incx);
413  free(A);
414  }
415  }
416  else if (*layout == TEST_COL_MJR)
417  cblas_ctbsv(CblasColMajor, uplo, trans, diag, *n, *k, a, *lda, x, *incx);
418  else
419  cblas_ctbsv(UNDEFINED, uplo, trans, diag, *n, *k, a, *lda, x, *incx);
420 }
void get_transpose_type(char *type, CBLAS_TRANSPOSE *trans)
Definition: auxiliary.c:8
void cblas_ctbsv(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_ctbsv.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: