LAPACK  3.6.1
LAPACK: Linear Algebra PACKage
lapack_int LAPACKE_stprfb ( int  matrix_layout,
char  side,
char  trans,
char  direct,
char  storev,
lapack_int  m,
lapack_int  n,
lapack_int  k,
lapack_int  l,
const float *  v,
lapack_int  ldv,
const float *  t,
lapack_int  ldt,
float *  a,
lapack_int  lda,
float *  b,
lapack_int  ldb 
)

Definition at line 36 of file lapacke_stprfb.c.

41 {
42  lapack_int ncols_v, nrows_v;
43  lapack_int info = 0;
44  lapack_int ldwork;
45  lapack_int work_size;
46  float* work = NULL;
47  if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
48  LAPACKE_xerbla( "LAPACKE_stprfb", -1 );
49  return -1;
50  }
51 #ifndef LAPACK_DISABLE_NAN_CHECK
52  /* Optionally check input matrices for NaNs */
53  if( LAPACKE_lsame( storev, 'C' ) ) {
54  ncols_v = k;
55  nrows_v = LAPACKE_lsame( side, 'L' ) ? m :
56  ( LAPACKE_lsame( side, 'R' ) ? n : 0 );
57  } else if( LAPACKE_lsame( storev, 'R' ) ) {
58  ncols_v = LAPACKE_lsame( side, 'L' ) ? m :
59  ( LAPACKE_lsame( side, 'R' ) ? n : 0 );
60  nrows_v = k;
61  } else {
62  ncols_v = 0;
63  nrows_v = 0;
64  }
65  if( LAPACKE_sge_nancheck( matrix_layout, k, m, a, lda ) ) {
66  return -14;
67  }
68  if( LAPACKE_sge_nancheck( matrix_layout, m, n, b, ldb ) ) {
69  return -16;
70  }
71  if( LAPACKE_sge_nancheck( matrix_layout, k, k, t, ldt ) ) {
72  return -12;
73  }
74  if( LAPACKE_sge_nancheck( matrix_layout, nrows_v, ncols_v, v, ldv ) ) {
75  return -10;
76  }
77 #endif
78  if (side=='l' || side=='L') {
79  ldwork = k;
80  work_size = MAX(1,ldwork) * MAX(1,n);
81  }
82  else {
83  ldwork = m;
84  work_size = MAX(1,ldwork) * MAX(1,k);
85  }
86  /* Allocate memory for working array(s) */
87  work = (float*)
88  LAPACKE_malloc( sizeof(float) * work_size );
89  if( work == NULL ) {
91  goto exit_level_0;
92  }
93  /* Call middle-level interface */
94  info = LAPACKE_stprfb_work( matrix_layout, side, trans, direct, storev, m, n,
95  k, l, v, ldv, t, ldt, a, lda, b, ldb, work,
96  ldwork );
97  /* Release memory and exit */
98  LAPACKE_free( work );
99 exit_level_0:
100  if( info == LAPACK_WORK_MEMORY_ERROR ) {
101  LAPACKE_xerbla( "LAPACKE_stprfb", info );
102  }
103  return info;
104 }
#define LAPACK_ROW_MAJOR
Definition: lapacke.h:119
#define LAPACK_WORK_MEMORY_ERROR
Definition: lapacke.h:122
lapack_logical LAPACKE_sge_nancheck(int matrix_layout, lapack_int m, lapack_int n, const float *a, lapack_int lda)
#define MAX(x, y)
Definition: lapacke_utils.h:47
#define LAPACKE_free(p)
Definition: lapacke.h:113
#define LAPACKE_malloc(size)
Definition: lapacke.h:110
lapack_logical LAPACKE_lsame(char ca, char cb)
Definition: lapacke_lsame.c:36
#define LAPACK_COL_MAJOR
Definition: lapacke.h:120
void LAPACKE_xerbla(const char *name, lapack_int info)
#define lapack_int
Definition: lapacke.h:47
lapack_int LAPACKE_stprfb_work(int matrix_layout, char side, char trans, char direct, char storev, lapack_int m, lapack_int n, lapack_int k, lapack_int l, const float *v, lapack_int ldv, const float *t, lapack_int ldt, float *a, lapack_int lda, float *b, lapack_int ldb, float *work, lapack_int ldwork)

Here is the call graph for this function: