heevx.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_MATH_LAPACK_CLAPACK_HEEVX_H_
36 #define _BLAZE_MATH_LAPACK_CLAPACK_HEEVX_H_
37 
38 
39 //*************************************************************************************************
40 // Includes
41 //*************************************************************************************************
42 
43 #include <blaze/util/Complex.h>
45 
46 
47 //=================================================================================================
48 //
49 // LAPACK FORWARD DECLARATIONS
50 //
51 //=================================================================================================
52 
53 //*************************************************************************************************
55 #if !defined(INTEL_MKL_VERSION)
56 extern "C" {
57 
58 void cheevx_( char* jobz, char* range, char* uplo, int* n, float* A, int* lda, float* vl, float* vu, int* il, int* iu, float* abstol, int* m, float* w, float* Z, int* ldz, float* work, int* lwork, float* rwork, int* iwork, int* ifail, int* info );
59 void zheevx_( char* jobz, char* range, char* uplo, int* n, double* A, int* lda, double* vl, double* vu, int* il, int* iu, double* abstol, int* m, double* w, double* Z, int* ldz, double* work, int* lwork, double* rwork, int* iwork, int* ifail, int* info );
60 
61 }
62 #endif
63 
64 //*************************************************************************************************
65 
66 
67 
68 
69 namespace blaze {
70 
71 //=================================================================================================
72 //
73 // LAPACK HERMITIAN MATRIX EIGENVALUE FUNCTIONS (HEEVX)
74 //
75 //=================================================================================================
76 
77 //*************************************************************************************************
80 inline void heevx( char jobz, char range, char uplo, int n, complex<float>* A, int lda,
81  float vl, float vu, int il, int iu, float abstol, int* m, float* w,
82  complex<float>* Z, int ldz, complex<float>* work, int lwork,
83  float* rwork, int* iwork, int* ifail, int* info );
84 
85 inline void heevx( char jobz, char range, char uplo, int n, complex<double>* A, int lda,
86  double vl, double vu, int il, int iu, double abstol, int* m, double* w,
87  complex<double>* Z, int ldz, complex<double>* work, int lwork,
88  double* rwork, int* iwork, int* ifail, int* info );
90 //*************************************************************************************************
91 
92 
93 //*************************************************************************************************
151 inline void heevx( char jobz, char range, char uplo, int n, complex<float>* A, int lda,
152  float vl, float vu, int il, int iu, float abstol, int* m, float* w,
153  complex<float>* Z, int ldz, complex<float>* work, int lwork,
154  float* rwork, int* iwork, int* ifail, int* info )
155 {
156  BLAZE_STATIC_ASSERT( sizeof( complex<float> ) == 2UL*sizeof( float ) );
157 
158 #if defined(INTEL_MKL_VERSION)
159  BLAZE_STATIC_ASSERT( sizeof( MKL_INT ) == sizeof( int ) );
160  using ET = MKL_Complex8;
161 #else
162  using ET = float;
163 #endif
164 
165  ++il;
166  ++iu;
167 
168  cheevx_( &jobz, &range, &uplo, &n, reinterpret_cast<ET*>( A ), &lda, &vl, &vu, &il, &iu,
169  &abstol, m, w, reinterpret_cast<ET*>( Z ), &ldz, reinterpret_cast<ET*>( work ),
170  &lwork, rwork, iwork, ifail, info );
171 }
172 //*************************************************************************************************
173 
174 
175 //*************************************************************************************************
233 inline void heevx( char jobz, char range, char uplo, int n, complex<double>* A, int lda,
234  double vl, double vu, int il, int iu, double abstol, int* m, double* w,
235  complex<double>* Z, int ldz, complex<double>* work, int lwork,
236  double* rwork, int* iwork, int* ifail, int* info )
237 {
238  BLAZE_STATIC_ASSERT( sizeof( complex<double> ) == 2UL*sizeof( double ) );
239 
240 #if defined(INTEL_MKL_VERSION)
241  BLAZE_STATIC_ASSERT( sizeof( MKL_INT ) == sizeof( int ) );
242  using ET = MKL_Complex16;
243 #else
244  using ET = double;
245 #endif
246 
247  ++il;
248  ++iu;
249 
250  zheevx_( &jobz, &range, &uplo, &n, reinterpret_cast<ET*>( A ), &lda, &vl, &vu, &il, &iu,
251  &abstol, m, w, reinterpret_cast<ET*>( Z ), &ldz, reinterpret_cast<ET*>( work ),
252  &lwork, rwork, iwork, ifail, info );
253 }
254 //*************************************************************************************************
255 
256 } // namespace blaze
257 
258 #endif
void heevx(char jobz, char range, char uplo, int n, complex< float > *A, int lda, float vl, float vu, int il, int iu, float abstol, int *m, float *w, complex< float > *Z, int ldz, complex< float > *work, int lwork, float *rwork, int *iwork, int *ifail, int *info)
LAPACK kernel for computing the eigenvalues of the given dense Hermitian single precision complex col...
Definition: heevx.h:151
Namespace of the Blaze C++ math library.
Definition: Blaze.h:58
Compile time assertion.
Header file for the complex data type.
#define BLAZE_STATIC_ASSERT(expr)
Compile time assertion macro.In case of an invalid compile time expression, a compilation error is cr...
Definition: StaticAssert.h:112