geev.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_MATH_LAPACK_CLAPACK_GEEV_H_
36 #define _BLAZE_MATH_LAPACK_CLAPACK_GEEV_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 extern "C" {
56 
57 void sgeev_( char* jobvl, char* jobvr, int* n, float* A, int* lda, float* wr, float* wi, float* VL, int* ldvl, float* VR, int* ldvr, float* work, int* lwork, int* info );
58 void dgeev_( char* jobvl, char* jobvr, int* n, double* A, int* lda, double* wr, double* wi, double* VL, int* ldvl, double* VR, int* ldvr, double* work, int* lwork, int* info );
59 void cgeev_( char* jobvl, char* jobvr, int* n, float* A, int* lda, float* w, float* VL, int* ldvl, float* VR, int* ldvr, float* work, int* lwork, float* rwork, int* info );
60 void zgeev_( char* jobvl, char* jobvr, int* n, double* A, int* lda, double* w, double* VL, int* ldvl, double* VR, int* ldvr, double* work, int* lwork, double* rwork, int* info );
61 
62 }
64 //*************************************************************************************************
65 
66 
67 
68 
69 namespace blaze {
70 
71 //=================================================================================================
72 //
73 // LAPACK GENERAL MATRIX EIGENVALUE FUNCTIONS (GEEV)
74 //
75 //=================================================================================================
76 
77 //*************************************************************************************************
80 inline void geev( char jobvl, char jobvr, int n, float* A, int lda,
81  float* wr, float* wi, float* VL, int ldvl, float* VR, int ldvr,
82  float* work, int lwork, int* info );
83 
84 inline void geev( char jobvl, char jobvr, int n, double* A, int lda,
85  double* wr, double* wi, double* VL, int ldvl, double* VR, int ldvr,
86  double* work, int lwork, int* info );
87 
88 inline void geev( char jobvl, char jobvr, int n, complex<float>* A, int lda,
89  complex<float>* w, complex<float>* VL, int ldvl, complex<float>* VR, int ldvr,
90  complex<float>* work, int lwork, float* rwork, int* info );
91 
92 inline void geev( char jobvl, char jobvr, int n, complex<double>* A, int lda,
93  complex<double>* w, complex<double>* VL, int ldvl, complex<double>* VR, int ldvr,
94  complex<double>* work, int lwork, double* rwork, int* info );
96 //*************************************************************************************************
97 
98 
99 //*************************************************************************************************
161 inline void geev( char jobvl, char jobvr, int n, float* A, int lda,
162  float* wr, float* wi, float* VL, int ldvl, float* VR, int ldvr,
163  float* work, int lwork, int* info )
164 {
165  sgeev_( &jobvl, &jobvr, &n, A, &lda, wr, wi, VL, &ldvl, VR, &ldvr, work, &lwork, info );
166 }
167 //*************************************************************************************************
168 
169 
170 //*************************************************************************************************
232 inline void geev( char jobvl, char jobvr, int n, double* A, int lda,
233  double* wr, double* wi, double* VL, int ldvl, double* VR, int ldvr,
234  double* work, int lwork, int* info )
235 {
236  dgeev_( &jobvl, &jobvr, &n, A, &lda, wr, wi, VL, &ldvl, VR, &ldvr, work, &lwork, info );
237 }
238 //*************************************************************************************************
239 
240 
241 //*************************************************************************************************
303 inline void geev( char jobvl, char jobvr, int n, complex<float>* A, int lda,
304  complex<float>* w, complex<float>* VL, int ldvl, complex<float>* VR, int ldvr,
305  complex<float>* work, int lwork, float* rwork, int* info )
306 {
307  BLAZE_STATIC_ASSERT( sizeof( complex<float> ) == 2UL*sizeof( float ) );
308 
309  cgeev_( &jobvl, &jobvr, &n, reinterpret_cast<float*>( A ), &lda, reinterpret_cast<float*>( w ),
310  reinterpret_cast<float*>( VL ), &ldvl, reinterpret_cast<float*>( VR ), &ldvr,
311  reinterpret_cast<float*>( work ), &lwork, rwork, info );
312 }
313 //*************************************************************************************************
314 
315 
316 //*************************************************************************************************
378 inline void geev( char jobvl, char jobvr, int n, complex<double>* A, int lda,
379  complex<double>* w, complex<double>* VL, int ldvl, complex<double>* VR, int ldvr,
380  complex<double>* work, int lwork, double* rwork, int* info )
381 {
382  BLAZE_STATIC_ASSERT( sizeof( complex<double> ) == 2UL*sizeof( double ) );
383 
384  zgeev_( &jobvl, &jobvr, &n, reinterpret_cast<double*>( A ), &lda, reinterpret_cast<double*>( w ),
385  reinterpret_cast<double*>( VL ), &ldvl, reinterpret_cast<double*>( VR ), &ldvr,
386  reinterpret_cast<double*>( work ), &lwork, rwork, info );
387 }
388 //*************************************************************************************************
389 
390 } // namespace blaze
391 
392 #endif
Namespace of the Blaze C++ math library.
Definition: Blaze.h:57
Compile time assertion.
void geev(char jobvl, char jobvr, int n, float *A, int lda, float *wr, float *wi, float *VL, int ldvl, float *VR, int ldvr, float *work, int lwork, int *info)
LAPACK kernel for computing the eigenvalues of the given dense general single precision column-major ...
Definition: geev.h:161
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