Blaze  3.6
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 #include <blaze/util/Types.h>
46 
47 
48 //=================================================================================================
49 //
50 // LAPACK FORWARD DECLARATIONS
51 //
52 //=================================================================================================
53 
54 //*************************************************************************************************
56 #if !defined(INTEL_MKL_VERSION)
57 extern "C" {
58 
59 void cheevx_( char* jobz, char* range, char* uplo, int* n, float* A, int* lda, float* vl,
60  float* vu, int* il, int* iu, float* abstol, int* m, float* w, float* Z, int* ldz,
61  float* work, int* lwork, float* rwork, int* iwork, int* ifail, int* info,
64 void zheevx_( char* jobz, char* range, char* uplo, int* n, double* A, int* lda, double* vl,
65  double* vu, int* il, int* iu, double* abstol, int* m, double* w, double* Z, int* ldz,
66  double* work, int* lwork, double* rwork, int* iwork, int* ifail, int* info,
69 
70 }
71 #endif
72 
73 //*************************************************************************************************
74 
75 
76 
77 
78 namespace blaze {
79 
80 //=================================================================================================
81 //
82 // LAPACK HERMITIAN MATRIX EIGENVALUE FUNCTIONS (HEEVX)
83 //
84 //=================================================================================================
85 
86 //*************************************************************************************************
89 void heevx( char jobz, char range, char uplo, int n, complex<float>* A, int lda,
90  float vl, float vu, int il, int iu, float abstol, int* m, float* w,
91  complex<float>* Z, int ldz, complex<float>* work, int lwork,
92  float* rwork, int* iwork, int* ifail, int* info );
93 
94 void heevx( char jobz, char range, char uplo, int n, complex<double>* A, int lda,
95  double vl, double vu, int il, int iu, double abstol, int* m, double* w,
96  complex<double>* Z, int ldz, complex<double>* work, int lwork,
97  double* rwork, int* iwork, int* ifail, int* info );
99 //*************************************************************************************************
100 
101 
102 //*************************************************************************************************
160 inline void heevx( char jobz, char range, char uplo, int n, complex<float>* A, int lda,
161  float vl, float vu, int il, int iu, float abstol, int* m, float* w,
162  complex<float>* Z, int ldz, complex<float>* work, int lwork,
163  float* rwork, int* iwork, int* ifail, int* info )
164 {
165  BLAZE_STATIC_ASSERT( sizeof( complex<float> ) == 2UL*sizeof( float ) );
166 
167 #if defined(INTEL_MKL_VERSION)
168  BLAZE_STATIC_ASSERT( sizeof( MKL_INT ) == sizeof( int ) );
169  using ET = MKL_Complex8;
170 #else
171  using ET = float;
172 #endif
173 
174  ++il;
175  ++iu;
176 
177  cheevx_( &jobz, &range, &uplo, &n, reinterpret_cast<ET*>( A ), &lda, &vl, &vu, &il, &iu,
178  &abstol, m, w, reinterpret_cast<ET*>( Z ), &ldz, reinterpret_cast<ET*>( work ),
179  &lwork, rwork, iwork, ifail, info, blaze::fortran_charlen_t(1),
181 }
182 //*************************************************************************************************
183 
184 
185 //*************************************************************************************************
243 inline void heevx( char jobz, char range, char uplo, int n, complex<double>* A, int lda,
244  double vl, double vu, int il, int iu, double abstol, int* m, double* w,
245  complex<double>* Z, int ldz, complex<double>* work, int lwork,
246  double* rwork, int* iwork, int* ifail, int* info )
247 {
248  BLAZE_STATIC_ASSERT( sizeof( complex<double> ) == 2UL*sizeof( double ) );
249 
250 #if defined(INTEL_MKL_VERSION)
251  BLAZE_STATIC_ASSERT( sizeof( MKL_INT ) == sizeof( int ) );
252  using ET = MKL_Complex16;
253 #else
254  using ET = double;
255 #endif
256 
257  ++il;
258  ++iu;
259 
260  zheevx_( &jobz, &range, &uplo, &n, reinterpret_cast<ET*>( A ), &lda, &vl, &vu, &il, &iu,
261  &abstol, m, w, reinterpret_cast<ET*>( Z ), &ldz, reinterpret_cast<ET*>( work ),
262  &lwork, rwork, iwork, ifail, info, blaze::fortran_charlen_t(1),
264 }
265 //*************************************************************************************************
266 
267 } // namespace blaze
268 
269 #endif
Header file for basic type definitions.
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:160
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
Size type of the Blaze library.