LAPACK  3.10.1
LAPACK: Linear Algebra PACKage

◆ LAPACKE_sspevx()

lapack_int LAPACKE_sspevx ( int  matrix_layout,
char  jobz,
char  range,
char  uplo,
lapack_int  n,
float *  ap,
float  vl,
float  vu,
lapack_int  il,
lapack_int  iu,
float  abstol,
lapack_int m,
float *  w,
float *  z,
lapack_int  ldz,
lapack_int ifail 
)

Definition at line 35 of file lapacke_sspevx.c.

40 {
41  lapack_int info = 0;
42  lapack_int* iwork = NULL;
43  float* work = NULL;
44  if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
45  LAPACKE_xerbla( "LAPACKE_sspevx", -1 );
46  return -1;
47  }
48 #ifndef LAPACK_DISABLE_NAN_CHECK
49  if( LAPACKE_get_nancheck() ) {
50  /* Optionally check input matrices for NaNs */
51  if( LAPACKE_s_nancheck( 1, &abstol, 1 ) ) {
52  return -11;
53  }
54  if( LAPACKE_ssp_nancheck( n, ap ) ) {
55  return -6;
56  }
57  if( LAPACKE_lsame( range, 'v' ) ) {
58  if( LAPACKE_s_nancheck( 1, &vl, 1 ) ) {
59  return -7;
60  }
61  }
62  if( LAPACKE_lsame( range, 'v' ) ) {
63  if( LAPACKE_s_nancheck( 1, &vu, 1 ) ) {
64  return -8;
65  }
66  }
67  }
68 #endif
69  /* Allocate memory for working array(s) */
70  iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) * MAX(1,5*n) );
71  if( iwork == NULL ) {
73  goto exit_level_0;
74  }
75  work = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,8*n) );
76  if( work == NULL ) {
78  goto exit_level_1;
79  }
80  /* Call middle-level interface */
81  info = LAPACKE_sspevx_work( matrix_layout, jobz, range, uplo, n, ap, vl, vu,
82  il, iu, abstol, m, w, z, ldz, work, iwork,
83  ifail );
84  /* Release memory and exit */
85  LAPACKE_free( work );
86 exit_level_1:
87  LAPACKE_free( iwork );
88 exit_level_0:
89  if( info == LAPACK_WORK_MEMORY_ERROR ) {
90  LAPACKE_xerbla( "LAPACKE_sspevx", info );
91  }
92  return info;
93 }
#define lapack_int
Definition: lapack.h:83
#define LAPACK_WORK_MEMORY_ERROR
Definition: lapacke.h:55
#define LAPACK_COL_MAJOR
Definition: lapacke.h:53
#define LAPACKE_free(p)
Definition: lapacke.h:46
#define LAPACK_ROW_MAJOR
Definition: lapacke.h:52
int LAPACKE_get_nancheck(void)
#define LAPACKE_malloc(size)
Definition: lapacke.h:43
lapack_int LAPACKE_sspevx_work(int matrix_layout, char jobz, char range, char uplo, lapack_int n, float *ap, float vl, float vu, lapack_int il, lapack_int iu, float abstol, lapack_int *m, float *w, float *z, lapack_int ldz, float *work, lapack_int *iwork, lapack_int *ifail)
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
lapack_logical LAPACKE_ssp_nancheck(lapack_int n, const float *ap)
Here is the call graph for this function: