LAPACK 3.12.0
LAPACK: Linear Algebra PACKage
Loading...
Searching...
No Matches

◆ F77_ctbmv()

void F77_ctbmv ( CBLAS_INT layout,
char *  uplow,
char *  transp,
char *  diagn,
CBLAS_INT n,
CBLAS_INT k,
CBLAS_TEST_COMPLEX a,
CBLAS_INT lda,
CBLAS_TEST_COMPLEX x,
CBLAS_INT incx 
)

Definition at line 295 of file c_cblas2.c.

297 {
299 CBLAS_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}
CBLAS_UPLO
Definition cblas.h:41
@ CblasLower
Definition cblas.h:41
@ CblasUpper
Definition cblas.h:41
CBLAS_TRANSPOSE
Definition cblas.h:40
void cblas_ctbmv(CBLAS_LAYOUT layout, CBLAS_UPLO Uplo, CBLAS_TRANSPOSE TransA, CBLAS_DIAG Diag, const CBLAS_INT N, const CBLAS_INT K, const void *A, const CBLAS_INT lda, void *X, const CBLAS_INT incX)
Definition cblas_ctbmv.c:10
@ CblasColMajor
Definition cblas.h:39
@ CblasRowMajor
Definition cblas.h:39
CBLAS_DIAG
Definition cblas.h:42
#define CBLAS_INT
Definition cblas.h:24
#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
Here is the call graph for this function: