LAPACK  3.8.0
LAPACK: Linear Algebra PACKage

◆ F77_stbmv()

void F77_stbmv ( int *  layout,
char *  uplow,
char *  transp,
char *  diagn,
int *  n,
int *  k,
float *  a,
int *  lda,
float *  x,
int *  incx 
)

Definition at line 225 of file c_sblas2.c.

226  {
227  float *A;
228  int irow, jcol, i, j, LDA;
229  CBLAS_TRANSPOSE trans;
230  CBLAS_UPLO uplo;
231  CBLAS_DIAG diag;
232 
233  get_transpose_type(transp,&trans);
234  get_uplo_type(uplow,&uplo);
235  get_diag_type(diagn,&diag);
236 
237  if (*layout == TEST_ROW_MJR) {
238  LDA = *k+1;
239  A = ( float* )malloc( (*n+*k)*LDA*sizeof( float ) );
240  if (uplo == CblasUpper) {
241  for( i=0; i<*k; i++ ){
242  irow=*k-i;
243  jcol=(*k)-i;
244  for( j=jcol; j<*n; j++ )
245  A[ LDA*(j-jcol)+irow ]=a[ (*lda)*j+i ];
246  }
247  i=*k;
248  irow=*k-i;
249  for( j=0; j<*n; j++ )
250  A[ LDA*j+irow ]=a[ (*lda)*j+i ];
251  }
252  else {
253  i=0;
254  irow=*k-i;
255  for( j=0; j<*n; j++ )
256  A[ LDA*j+irow ]=a[ (*lda)*j+i ];
257  for( i=1; i<*k+1; i++ ){
258  irow=*k-i;
259  jcol=i;
260  for( j=jcol; j<(*n+*k); j++ )
261  A[ LDA*j+irow ]=a[ (*lda)*(j-jcol)+i ];
262  }
263  }
264  cblas_stbmv(CblasRowMajor, uplo, trans, diag, *n, *k, A, LDA, x, *incx);
265  free(A);
266  }
267  else
268  cblas_stbmv(CblasColMajor, uplo, trans, diag, *n, *k, a, *lda, x, *incx);
269 }
#define LDA
Definition: example_user.c:12
CBLAS_DIAG
Definition: cblas.h:22
void cblas_stbmv(CBLAS_LAYOUT layout, CBLAS_UPLO Uplo, CBLAS_TRANSPOSE TransA, CBLAS_DIAG Diag, const int N, const int K, const float *A, const int lda, float *X, const int incX)
Definition: cblas_stbmv.c:10
void get_diag_type(char *type, CBLAS_DIAG *diag)
Definition: auxiliary.c:25
void get_transpose_type(char *type, CBLAS_TRANSPOSE *trans)
Definition: auxiliary.c:8
#define TEST_ROW_MJR
Definition: cblas_test.h:12
CBLAS_TRANSPOSE
Definition: cblas.h:20
void get_uplo_type(char *type, CBLAS_UPLO *uplo)
Definition: auxiliary.c:18
CBLAS_UPLO
Definition: cblas.h:21
Here is the call graph for this function: