inline void tbsv( const Order, const UpLo, const Trans, const Diag, const int n, const int k, const std::complex<float>* a, const int lda, std::complex<float>* x, const int incx ) { cblas_ctbsv( cblas_option< Order >::value, cblas_option< UpLo >::value, cblas_option< Trans >::value, cblas_option< Diag >::value, n, k, a, lda, x, incx ); }
void F77_ctbsv(int *order, char *uplow, char *transp, char *diagn, int *n, int *k, CBLAS_TEST_COMPLEX *a, int *lda, CBLAS_TEST_COMPLEX *x, int *incx) { CBLAS_TEST_COMPLEX *A; int irow, jcol, i, j, LDA; enum CBLAS_TRANSPOSE trans; enum CBLAS_UPLO uplo; enum CBLAS_DIAG diag; get_transpose_type(transp,&trans); get_uplo_type(uplow,&uplo); get_diag_type(diagn,&diag); if (*order == TEST_ROW_MJR) { if (uplo != CblasUpper && uplo != CblasLower ) cblas_ctbsv(CblasRowMajor, UNDEFINED, trans, diag, *n, *k, a, *lda, x, *incx); else { LDA = *k+2; A=(CBLAS_TEST_COMPLEX*)malloc((*n+*k)*LDA*sizeof(CBLAS_TEST_COMPLEX )); if (uplo == CblasUpper) { for( i=0; i<*k; i++ ){ irow=*k-i; jcol=(*k)-i; for( j=jcol; j<*n; j++ ) { A[ LDA*(j-jcol)+irow ].real=a[ (*lda)*j+i ].real; A[ LDA*(j-jcol)+irow ].imag=a[ (*lda)*j+i ].imag; } } i=*k; irow=*k-i; for( j=0; j<*n; j++ ) { A[ LDA*j+irow ].real=a[ (*lda)*j+i ].real; A[ LDA*j+irow ].imag=a[ (*lda)*j+i ].imag; } } else { i=0; irow=*k-i; for( j=0; j<*n; j++ ) { A[ LDA*j+irow ].real=a[ (*lda)*j+i ].real; A[ LDA*j+irow ].imag=a[ (*lda)*j+i ].imag; } for( i=1; i<*k+1; i++ ){ irow=*k-i; jcol=i; for( j=jcol; j<(*n+*k); j++ ) { A[ LDA*j+irow ].real=a[ (*lda)*(j-jcol)+i ].real; A[ LDA*j+irow ].imag=a[ (*lda)*(j-jcol)+i ].imag; } } } cblas_ctbsv(CblasRowMajor, uplo, trans, diag, *n, *k, A, LDA, x, *incx); free(A); } } else if (*order == TEST_COL_MJR) cblas_ctbsv(CblasColMajor, uplo, trans, diag, *n, *k, a, *lda, x, *incx); else cblas_ctbsv(UNDEFINED, uplo, trans, diag, *n, *k, a, *lda, x, *incx); }