LAPACK  3.5.0
LAPACK: Linear Algebra PACKage
 All Files Functions Typedefs Macros
lapacke_stprfb.c File Reference
#include "lapacke_utils.h"
Include dependency graph for lapacke_stprfb.c:

Go to the source code of this file.

Functions

lapack_int LAPACKE_stprfb (int matrix_order, 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)
 

Function Documentation

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

Here is the call graph for this function: