LAPACK 3.11.0
LAPACK: Linear Algebra PACKage
Loading...
Searching...
No Matches

◆ LAPACKE_chpevx()

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

Definition at line 35 of file lapacke_chpevx.c.

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