LAPACK  3.9.1
LAPACK: Linear Algebra PACKage

◆ LAPACKE_sstebz()

lapack_int LAPACKE_sstebz ( char  range,
char  order,
lapack_int  n,
float  vl,
float  vu,
lapack_int  il,
lapack_int  iu,
float  abstol,
const float *  d,
const float *  e,
lapack_int m,
lapack_int nsplit,
float *  w,
lapack_int iblock,
lapack_int isplit 
)

Definition at line 35 of file lapacke_sstebz.c.

40 {
41  lapack_int info = 0;
42  lapack_int* iwork = NULL;
43  float* work = NULL;
44 #ifndef LAPACK_DISABLE_NAN_CHECK
45  if( LAPACKE_get_nancheck() ) {
46  /* Optionally check input matrices for NaNs */
47  if( LAPACKE_s_nancheck( 1, &abstol, 1 ) ) {
48  return -8;
49  }
50  if( LAPACKE_s_nancheck( n, d, 1 ) ) {
51  return -9;
52  }
53  if( LAPACKE_s_nancheck( n-1, e, 1 ) ) {
54  return -10;
55  }
56  if( LAPACKE_lsame( range, 'v' ) ) {
57  if( LAPACKE_s_nancheck( 1, &vl, 1 ) ) {
58  return -4;
59  }
60  }
61  if( LAPACKE_lsame( range, 'v' ) ) {
62  if( LAPACKE_s_nancheck( 1, &vu, 1 ) ) {
63  return -5;
64  }
65  }
66  }
67 #endif
68  /* Allocate memory for working array(s) */
69  iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * MAX(1,3*n) );
70  if( iwork == NULL ) {
72  goto exit_level_0;
73  }
74  work = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,4*n) );
75  if( work == NULL ) {
77  goto exit_level_1;
78  }
79  /* Call middle-level interface */
80  info = LAPACKE_sstebz_work( range, order, n, vl, vu, il, iu, abstol, d, e,
81  m, nsplit, w, iblock, isplit, work, iwork );
82  /* Release memory and exit */
83  LAPACKE_free( work );
84 exit_level_1:
85  LAPACKE_free( iwork );
86 exit_level_0:
87  if( info == LAPACK_WORK_MEMORY_ERROR ) {
88  LAPACKE_xerbla( "LAPACKE_sstebz", info );
89  }
90  return info;
91 }
#define lapack_int
Definition: lapack.h:83
#define LAPACK_WORK_MEMORY_ERROR
Definition: lapacke.h:55
lapack_int LAPACKE_sstebz_work(char range, char order, lapack_int n, float vl, float vu, lapack_int il, lapack_int iu, float abstol, const float *d, const float *e, lapack_int *m, lapack_int *nsplit, float *w, lapack_int *iblock, lapack_int *isplit, float *work, lapack_int *iwork)
#define LAPACKE_free(p)
Definition: lapacke.h:46
int LAPACKE_get_nancheck(void)
#define LAPACKE_malloc(size)
Definition: lapacke.h:43
lapack_logical LAPACKE_lsame(char ca, char cb)
Definition: lapacke_lsame.c:35
void LAPACKE_xerbla(const char *name, lapack_int info)
lapack_logical LAPACKE_s_nancheck(lapack_int n, const float *x, lapack_int incx)
#define MAX(x, y)
Definition: lapacke_utils.h:46
Here is the call graph for this function: