OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
lapacke_dspevx.c File Reference
#include "lapacke_utils.h"

Go to the source code of this file.

Functions

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

Function Documentation

◆ LAPACKE_dspevx()

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

Definition at line 35 of file lapacke_dspevx.c.

40{
41 lapack_int info = 0;
42 lapack_int* iwork = NULL;
43 double* work = NULL;
44 if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
45 LAPACKE_xerbla( "LAPACKE_dspevx", -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_d_nancheck( 1, &abstol, 1 ) ) {
52 return -11;
53 }
54 if( LAPACKE_dsp_nancheck( n, ap ) ) {
55 return -6;
56 }
57 if( LAPACKE_lsame( range, 'v' ) ) {
58 if( LAPACKE_d_nancheck( 1, &vl, 1 ) ) {
59 return -7;
60 }
61 }
62 if( LAPACKE_lsame( range, 'v' ) ) {
63 if( LAPACKE_d_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 = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,8*n) );
76 if( work == NULL ) {
78 goto exit_level_1;
79 }
80 /* Call middle-level interface */
81 info = LAPACKE_dspevx_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 );
86exit_level_1:
87 LAPACKE_free( iwork );
88exit_level_0:
89 if( info == LAPACK_WORK_MEMORY_ERROR ) {
90 LAPACKE_xerbla( "LAPACKE_dspevx", 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
lapack_int LAPACKE_dspevx_work(int matrix_layout, char jobz, char range, char uplo, lapack_int n, double *ap, double vl, double vu, lapack_int il, lapack_int iu, double abstol, lapack_int *m, double *w, double *z, lapack_int ldz, double *work, lapack_int *iwork, lapack_int *ifail)
int LAPACKE_get_nancheck(void)
#define LAPACKE_malloc(size)
Definition lapacke.h:43
lapack_logical LAPACKE_lsame(char ca, char cb)
void LAPACKE_xerbla(const char *name, lapack_int info)
lapack_logical LAPACKE_d_nancheck(lapack_int n, const double *x, lapack_int incx)
#define MAX(x, y)
lapack_logical LAPACKE_dsp_nancheck(lapack_int n, const double *ap)
n