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

◆ F77_ztbmv()

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

Definition at line 315 of file c_zblas2.c.

321 {
323 CBLAS_INT irow, jcol, i, j, LDA;
324 CBLAS_TRANSPOSE trans;
325 CBLAS_UPLO uplo;
326 CBLAS_DIAG diag;
327
328 get_transpose_type(transp,&trans);
329 get_uplo_type(uplow,&uplo);
330 get_diag_type(diagn,&diag);
331
332 if (*layout == TEST_ROW_MJR) {
333 if (uplo != CblasUpper && uplo != CblasLower )
334 cblas_ztbmv(CblasRowMajor, UNDEFINED, trans, diag, *n, *k, a, *lda,
335 x, *incx);
336 else {
337 LDA = *k+2;
338 A=(CBLAS_TEST_ZOMPLEX *)malloc((*n+*k)*LDA*sizeof(CBLAS_TEST_ZOMPLEX));
339 if (uplo == CblasUpper) {
340 for( i=0; i<*k; i++ ){
341 irow=*k-i;
342 jcol=(*k)-i;
343 for( j=jcol; j<*n; j++ ) {
344 A[ LDA*(j-jcol)+irow ].real=a[ (*lda)*j+i ].real;
345 A[ LDA*(j-jcol)+irow ].imag=a[ (*lda)*j+i ].imag;
346 }
347 }
348 i=*k;
349 irow=*k-i;
350 for( j=0; j<*n; j++ ) {
351 A[ LDA*j+irow ].real=a[ (*lda)*j+i ].real;
352 A[ LDA*j+irow ].imag=a[ (*lda)*j+i ].imag;
353 }
354 }
355 else {
356 i=0;
357 irow=*k-i;
358 for( j=0; j<*n; j++ ) {
359 A[ LDA*j+irow ].real=a[ (*lda)*j+i ].real;
360 A[ LDA*j+irow ].imag=a[ (*lda)*j+i ].imag;
361 }
362 for( i=1; i<*k+1; i++ ){
363 irow=*k-i;
364 jcol=i;
365 for( j=jcol; j<(*n+*k); j++ ) {
366 A[ LDA*j+irow ].real=a[ (*lda)*(j-jcol)+i ].real;
367 A[ LDA*j+irow ].imag=a[ (*lda)*(j-jcol)+i ].imag;
368 }
369 }
370 }
371 cblas_ztbmv(CblasRowMajor, uplo, trans, diag, *n, *k, A, LDA, x,
372 *incx);
373 free(A);
374 }
375 }
376 else if (*layout == TEST_COL_MJR)
377 cblas_ztbmv(CblasColMajor, uplo, trans, diag, *n, *k, a, *lda, x, *incx);
378 else
379 cblas_ztbmv(UNDEFINED, uplo, trans, diag, *n, *k, a, *lda, x, *incx);
380}
void cblas_ztbmv(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_ztbmv.c:10
CBLAS_UPLO
Definition cblas.h:41
@ CblasLower
Definition cblas.h:41
@ CblasUpper
Definition cblas.h:41
CBLAS_TRANSPOSE
Definition cblas.h:40
@ 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:28
void get_diag_type(char *type, CBLAS_DIAG *diag)
Definition auxiliary.c:25
#define TEST_ROW_MJR
Definition cblas_test.h:21
#define TEST_COL_MJR
Definition cblas_test.h:25
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: