1 //=================================================================================================
2 /*!
3 // \file blaze/math/lapack/clapack/geev.h
4 // \brief Header file for the CLAPACK geev wrapper functions
5 //
6 // Copyright (C) 2012-2020 Klaus Iglberger - All Rights Reserved
7 //
8 // This file is part of the Blaze library. You can redistribute it and/or modify it under
9 // the terms of the New (Revised) BSD License. Redistribution and use in source and binary
10 // forms, with or without modification, are permitted provided that the following conditions
11 // are met:
12 //
13 // 1. Redistributions of source code must retain the above copyright notice, this list of
14 // conditions and the following disclaimer.
15 // 2. Redistributions in binary form must reproduce the above copyright notice, this list
16 // of conditions and the following disclaimer in the documentation and/or other materials
17 // provided with the distribution.
18 // 3. Neither the names of the Blaze development group nor the names of its contributors
19 // may be used to endorse or promote products derived from this software without specific
20 // prior written permission.
21 //
22 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
23 // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
24 // OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
25 // SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
26 // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
27 // TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
28 // BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
29 // CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
30 // ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
31 // DAMAGE.
32 */
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/math/blas/Types.h>
44 #include <blaze/util/Complex.h>
45 #include <blaze/util/StaticAssert.h>
46 #include <blaze/util/Types.h>
47
48
49 //=================================================================================================
50 //
51 // LAPACK FORWARD DECLARATIONS
52 //
53 //=================================================================================================
54
55 //*************************************************************************************************
56 /*! \cond BLAZE_INTERNAL */
57 #if !defined(INTEL_MKL_VERSION)
58 extern "C" {
59
60 void sgeev_( char* jobvl, char* jobvr, blaze::blas_int_t* n, float* A, blaze::blas_int_t* lda,
61 float* wr, float* wi, float* VL, blaze::blas_int_t* ldvl, float* VR, blaze::blas_int_t* ldvr,
62 float* work, blaze::blas_int_t* lwork, blaze::blas_int_t* info,
63 blaze::fortran_charlen_t njobvl, blaze::fortran_charlen_t njobvr );
64 void dgeev_( char* jobvl, char* jobvr, blaze::blas_int_t* n, double* A, blaze::blas_int_t* lda,
65 double* wr, double* wi, double* VL, blaze::blas_int_t* ldvl, double* VR, blaze::blas_int_t* ldvr,
66 double* work, blaze::blas_int_t* lwork, blaze::blas_int_t* info,
67 blaze::fortran_charlen_t njobvl, blaze::fortran_charlen_t njobvr );
68 void cgeev_( char* jobvl, char* jobvr, blaze::blas_int_t* n, float* A, blaze::blas_int_t* lda,
69 float* w, float* VL, blaze::blas_int_t* ldvl, float* VR, blaze::blas_int_t* ldvr,
70 float* work, blaze::blas_int_t* lwork, float* rwork, blaze::blas_int_t* info,
71 blaze::fortran_charlen_t njobvl, blaze::fortran_charlen_t njobvr );
72 void zgeev_( char* jobvl, char* jobvr, blaze::blas_int_t* n, double* A, blaze::blas_int_t* lda,
73 double* w, double* VL, blaze::blas_int_t* ldvl, double* VR, blaze::blas_int_t* ldvr,
74 double* work, blaze::blas_int_t* lwork, double* rwork, blaze::blas_int_t* info,
75 blaze::fortran_charlen_t njobvl, blaze::fortran_charlen_t njobvr );
76
77 }
78 #endif
79 /*! \endcond */
80 //*************************************************************************************************
81
82
83
84
85 namespace blaze {
86
87 //=================================================================================================
88 //
89 // LAPACK GENERAL MATRIX EIGENVALUE FUNCTIONS (GEEV)
90 //
91 //=================================================================================================
92
93 //*************************************************************************************************
94 /*!\name LAPACK general matrix eigenvalue functions (geev) */
95 //@{
96 void geev( char jobvl, char jobvr, blas_int_t n, float* A, blas_int_t lda,
97 float* wr, float* wi, float* VL, blas_int_t ldvl, float* VR, blas_int_t ldvr,
98 float* work, blas_int_t lwork, blas_int_t* info );
99
100 void geev( char jobvl, char jobvr, blas_int_t n, double* A, blas_int_t lda,
101 double* wr, double* wi, double* VL, blas_int_t ldvl, double* VR, blas_int_t ldvr,
102 double* work, blas_int_t lwork, blas_int_t* info );
103
104 void geev( char jobvl, char jobvr, blas_int_t n, complex<float>* A, blas_int_t lda,
105 complex<float>* w, complex<float>* VL, blas_int_t ldvl, complex<float>* VR,
106 blas_int_t ldvr, complex<float>* work, blas_int_t lwork, float* rwork,
107 blas_int_t* info );
108
109 void geev( char jobvl, char jobvr, blas_int_t n, complex<double>* A, blas_int_t lda,
110 complex<double>* w, complex<double>* VL, blas_int_t ldvl, complex<double>* VR,
111 blas_int_t ldvr, complex<double>* work, blas_int_t lwork, double* rwork,
112 blas_int_t* info );
113 //@}
114 //*************************************************************************************************
115
116
117 //*************************************************************************************************
118 /*!\brief LAPACK kernel for computing the eigenvalues of the given dense general single
119 // precision column-major matrix.
120 // \ingroup lapack_eigenvalue
121 //
122 // \param jobvl \c 'V' to compute the left eigenvectors of \a A, \c 'N' to not compute them.
123 // \param jobvr \c 'V' to compute the right eigenvectors of \a A, \c 'N' to not compute them.
124 // \param n The number of rows and columns of the given matrix \f$[0..\infty)\f$.
125 // \param A Pointer to the first element of the single precision column-major matrix.
126 // \param lda The total number of elements between two columns of the matrix A; size >= max( 1, \a n ).
127 // \param wr Pointer to the first element of the vector for the real part of the eigenvalues.
128 // \param wi Pointer to the first element of the vector for the imaginary part of the eigenvalues.
129 // \param VL Pointer to the first element of the column-major matrix for the left eigenvectors.
130 // \param ldvl The total number of elements between two columns of the matrix VL \f$[0..\infty)\f$.
131 // \param VR Pointer to the first element of the column-major matrix for the right eigenvectors.
132 // \param ldvr The total number of elements between two columns of the matrix VR \f$[0..\infty)\f$.
133 // \param work Auxiliary array; size >= max( 1, \a lwork ).
134 // \param lwork The dimension of the array \a work; see online reference for details.
135 // \param info Return code of the function call.
136 // \return void
137 //
138 // This function computes the eigenvalues of a non-symmetric \a n-by-\a n single precision
139 // column-major matrix based on the LAPACK sgeev() function. Optionally, it computes the left
140 // and/or right eigenvectors. The right eigenvector \f$v[j]\f$ of \a satisfies
141
142 \f[ A * v[j] = lambda[j] * v[j], \f]
143
144 // where \f$lambda[j]\f$ is its eigenvalue. The left eigenvector \f$u[j]\f$ of \a A satisfies
145
146 \f[ u[j]^{H} * A = lambda[j] * u[j]^{H}, \f]
147
148 // where \f$u[j]^{H}\f$ denotes the conjugate transpose of \f$u[j]\f$.
149 //
150 // Complex conjugate pairs of eigenvalues appear consecutively with the eigenvalue having the
151 // positive imaginary part first. The computed eigenvectors are normalized to have Euclidean
152 // norm equal to 1 and largest component real.
153 //
154 // The parameter \a jobvl specifies the computation of the left eigenvectors:
155 //
156 // - \c 'V': The left eigenvectors of \a A are computed and returned in \a VL.
157 // - \c 'N': The left eigenvectors of \a A are not computed.
158 //
159 // The parameter \a jobvr specifies the computation of the right eigenvectors:
160 //
161 // - \c 'V': The right eigenvectors of \a A are computed and returned in \a VR.
162 // - \c 'N': The right eigenvectors of \a A are not computed.
163 //
164 // The \a info argument provides feedback on the success of the function call:
165 //
166 // - = 0: The computation finished successfully.
167 // - < 0: If info = -i, the i-th argument had an illegal value.
168 // - > 0: If info = i, the QR algorithm failed to compute all the eigenvalues and no eigenvectors
169 // have been computed; the elements with index larger than \a i have converged.
170 //
171 // For more information on the sgeev() function, see the LAPACK online documentation browser:
172 //
173 // http://www.netlib.org/lapack/explore-html/
174 //
175 // \note This function can only be used if a fitting LAPACK library, which supports this function,
176 // is available and linked to the executable. Otherwise a call to this function will result in a
177 // linker error.
178 */
geev(char jobvl,char jobvr,blas_int_t n,float * A,blas_int_t lda,float * wr,float * wi,float * VL,blas_int_t ldvl,float * VR,blas_int_t ldvr,float * work,blas_int_t lwork,blas_int_t * info)179 inline void geev( char jobvl, char jobvr, blas_int_t n, float* A, blas_int_t lda,
180 float* wr, float* wi, float* VL, blas_int_t ldvl, float* VR, blas_int_t ldvr,
181 float* work, blas_int_t lwork, blas_int_t* info )
182 {
183 #if defined(INTEL_MKL_VERSION)
184 BLAZE_STATIC_ASSERT( sizeof( MKL_INT ) == sizeof( blas_int_t ) );
185 #endif
186
187 sgeev_( &jobvl, &jobvr, &n, A, &lda, wr, wi, VL, &ldvl, VR, &ldvr, work, &lwork, info
188 #if !defined(INTEL_MKL_VERSION)
189 , blaze::fortran_charlen_t(1), blaze::fortran_charlen_t(1)
190 #endif
191 );
192 }
193 //*************************************************************************************************
194
195
196 //*************************************************************************************************
197 /*!\brief LAPACK kernel for computing the eigenvalues of the given dense general double
198 // precision column-major matrix.
199 // \ingroup lapack_eigenvalue
200 //
201 // \param jobvl \c 'V' to compute the left eigenvectors of \a A, \c 'N' to not compute them.
202 // \param jobvr \c 'V' to compute the right eigenvectors of \a A, \c 'N' to not compute them.
203 // \param n The number of rows and columns of the given matrix \f$[0..\infty)\f$.
204 // \param A Pointer to the first element of the double precision column-major matrix.
205 // \param lda The total number of elements between two columns of the matrix A; size >= max( 1, \a n ).
206 // \param wr Pointer to the first element of the vector for the real part of the eigenvalues.
207 // \param wi Pointer to the first element of the vector for the imaginary part of the eigenvalues.
208 // \param VL Pointer to the first element of the column-major matrix for the left eigenvectors.
209 // \param ldvl The total number of elements between two columns of the matrix VL \f$[0..\infty)\f$.
210 // \param VR Pointer to the first element of the column-major matrix for the right eigenvectors.
211 // \param ldvr The total number of elements between two columns of the matrix VR \f$[0..\infty)\f$.
212 // \param work Auxiliary array; size >= max( 1, \a lwork ).
213 // \param lwork The dimension of the array \a work; see online reference for details.
214 // \param info Return code of the function call.
215 // \return void
216 //
217 // This function computes the eigenvalues of a non-symmetric \a n-by-\a n double precision
218 // column-major matrix based on the LAPACK dgeev() function. Optionally, it computes the left
219 // and/or right eigenvectors. The right eigenvector \f$v[j]\f$ of \a satisfies
220
221 \f[ A * v[j] = lambda[j] * v[j], \f]
222
223 // where \f$lambda[j]\f$ is its eigenvalue. The left eigenvector \f$u[j]\f$ of \a A satisfies
224
225 \f[ u[j]^{H} * A = lambda[j] * u[j]^{H}, \f]
226
227 // where \f$u[j]^{H}\f$ denotes the conjugate transpose of \f$u[j]\f$.
228 //
229 // Complex conjugate pairs of eigenvalues appear consecutively with the eigenvalue having the
230 // positive imaginary part first. The computed eigenvectors are normalized to have Euclidean
231 // norm equal to 1 and largest component real.
232 //
233 // The parameter \a jobvl specifies the computation of the left eigenvectors:
234 //
235 // - \c 'V': The left eigenvectors of \a A are computed and returned in \a VL.
236 // - \c 'N': The left eigenvectors of \a A are not computed.
237 //
238 // The parameter \a jobvr specifies the computation of the right eigenvectors:
239 //
240 // - \c 'V': The right eigenvectors of \a A are computed and returned in \a VR.
241 // - \c 'N': The right eigenvectors of \a A are not computed.
242 //
243 // The \a info argument provides feedback on the success of the function call:
244 //
245 // - = 0: The computation finished successfully.
246 // - < 0: If info = -i, the i-th argument had an illegal value.
247 // - > 0: If info = i, the QR algorithm failed to compute all the eigenvalues and no eigenvectors
248 // have been computed; the elements with index larger than \a i have converged.
249 //
250 // For more information on the dgeev() function, see the LAPACK online documentation browser:
251 //
252 // http://www.netlib.org/lapack/explore-html/
253 //
254 // \note This function can only be used if a fitting LAPACK library, which supports this function,
255 // is available and linked to the executable. Otherwise a call to this function will result in a
256 // linker error.
257 */
geev(char jobvl,char jobvr,blas_int_t n,double * A,blas_int_t lda,double * wr,double * wi,double * VL,blas_int_t ldvl,double * VR,blas_int_t ldvr,double * work,blas_int_t lwork,blas_int_t * info)258 inline void geev( char jobvl, char jobvr, blas_int_t n, double* A, blas_int_t lda,
259 double* wr, double* wi, double* VL, blas_int_t ldvl, double* VR, blas_int_t ldvr,
260 double* work, blas_int_t lwork, blas_int_t* info )
261 {
262 #if defined(INTEL_MKL_VERSION)
263 BLAZE_STATIC_ASSERT( sizeof( MKL_INT ) == sizeof( blas_int_t ) );
264 #endif
265
266 dgeev_( &jobvl, &jobvr, &n, A, &lda, wr, wi, VL, &ldvl, VR, &ldvr, work, &lwork, info
267 #if !defined(INTEL_MKL_VERSION)
268 , blaze::fortran_charlen_t(1), blaze::fortran_charlen_t(1)
269 #endif
270 );
271 }
272 //*************************************************************************************************
273
274
275 //*************************************************************************************************
276 /*!\brief LAPACK kernel for computing the eigenvalues of the given dense general single
277 // precision complex column-major matrix.
278 // \ingroup lapack_eigenvalue
279 //
280 // \param jobvl \c 'V' to compute the left eigenvectors of \a A, \c 'N' to not compute them.
281 // \param jobvr \c 'V' to compute the right eigenvectors of \a A, \c 'N' to not compute them.
282 // \param n The number of rows and columns of the given matrix \f$[0..\infty)\f$.
283 // \param A Pointer to the first element of the single precision complex column-major matrix.
284 // \param lda The total number of elements between two columns of the matrix A; size >= max( 1, \a n ).
285 // \param w Pointer to the first element of the vector for the eigenvalues.
286 // \param VL Pointer to the first element of the column-major matrix for the left eigenvectors.
287 // \param ldvl The total number of elements between two columns of the matrix VL \f$[0..\infty)\f$.
288 // \param VR Pointer to the first element of the column-major matrix for the right eigenvectors.
289 // \param ldvr The total number of elements between two columns of the matrix VR \f$[0..\infty)\f$.
290 // \param work Auxiliary array; size >= max( 1, \a lwork ).
291 // \param lwork The dimension of the array \a work; see online reference for details.
292 // \param rwork Auxiliary array; size >= 2*\a n.
293 // \param info Return code of the function call.
294 // \return void
295 //
296 // This function computes the eigenvalues of a non-symmetric \a n-by-\a n single precision
297 // complex column-major matrix based on the LAPACK cgeev() function. Optionally, it computes
298 // the left and/or right eigenvectors. The right eigenvector \f$v[j]\f$ of \a satisfies
299
300 \f[ A * v[j] = lambda[j] * v[j], \f]
301
302 // where \f$lambda[j]\f$ is its eigenvalue. The left eigenvector \f$u[j]\f$ of \a A satisfies
303
304 \f[ u[j]^{H} * A = lambda[j] * u[j]^{H}, \f]
305
306 // where \f$u[j]^{H}\f$ denotes the conjugate transpose of \f$u[j]\f$.
307 //
308 // Complex conjugate pairs of eigenvalues appear consecutively with the eigenvalue having the
309 // positive imaginary part first. The computed eigenvectors are normalized to have Euclidean
310 // norm equal to 1 and largest component real.
311 //
312 // The parameter \a jobvl specifies the computation of the left eigenvectors:
313 //
314 // - \c 'V': The left eigenvectors of \a A are computed and returned in \a VL.
315 // - \c 'N': The left eigenvectors of \a A are not computed.
316 //
317 // The parameter \a jobvr specifies the computation of the right eigenvectors:
318 //
319 // - \c 'V': The right eigenvectors of \a A are computed and returned in \a VR.
320 // - \c 'N': The right eigenvectors of \a A are not computed.
321 //
322 // The \a info argument provides feedback on the success of the function call:
323 //
324 // - = 0: The computation finished successfully.
325 // - < 0: If info = -i, the i-th argument had an illegal value.
326 // - > 0: If info = i, the QR algorithm failed to compute all the eigenvalues and no eigenvectors
327 // have been computed; the elements with index larger than \a i have converged.
328 //
329 // For more information on the cgeev() function, see the LAPACK online documentation browser:
330 //
331 // http://www.netlib.org/lapack/explore-html/
332 //
333 // \note This function can only be used if a fitting LAPACK library, which supports this function,
334 // is available and linked to the executable. Otherwise a call to this function will result in a
335 // linker error.
336 */
geev(char jobvl,char jobvr,blas_int_t n,complex<float> * A,blas_int_t lda,complex<float> * w,complex<float> * VL,blas_int_t ldvl,complex<float> * VR,blas_int_t ldvr,complex<float> * work,blas_int_t lwork,float * rwork,blas_int_t * info)337 inline void geev( char jobvl, char jobvr, blas_int_t n, complex<float>* A, blas_int_t lda,
338 complex<float>* w, complex<float>* VL, blas_int_t ldvl, complex<float>* VR,
339 blas_int_t ldvr, complex<float>* work, blas_int_t lwork, float* rwork,
340 blas_int_t* info )
341 {
342 BLAZE_STATIC_ASSERT( sizeof( complex<float> ) == 2UL*sizeof( float ) );
343
344 #if defined(INTEL_MKL_VERSION)
345 BLAZE_STATIC_ASSERT( sizeof( MKL_INT ) == sizeof( blas_int_t ) );
346 BLAZE_STATIC_ASSERT( sizeof( MKL_Complex8 ) == sizeof( complex<float> ) );
347 using ET = MKL_Complex8;
348 #else
349 using ET = float;
350 #endif
351
352 cgeev_( &jobvl, &jobvr, &n, reinterpret_cast<ET*>( A ), &lda, reinterpret_cast<ET*>( w ),
353 reinterpret_cast<ET*>( VL ), &ldvl, reinterpret_cast<ET*>( VR ), &ldvr,
354 reinterpret_cast<ET*>( work ), &lwork, rwork, info
355 #if !defined(INTEL_MKL_VERSION)
356 , blaze::fortran_charlen_t(1), blaze::fortran_charlen_t(1)
357 #endif
358 );
359 }
360 //*************************************************************************************************
361
362
363 //*************************************************************************************************
364 /*!\brief LAPACK kernel for computing the eigenvalues of the given dense general double
365 // precision complex column-major matrix.
366 // \ingroup lapack_eigenvalue
367 //
368 // \param jobvl \c 'V' to compute the left eigenvectors of \a A, \c 'N' to not compute them.
369 // \param jobvr \c 'V' to compute the right eigenvectors of \a A, \c 'N' to not compute them.
370 // \param n The number of rows and columns of the given matrix \f$[0..\infty)\f$.
371 // \param A Pointer to the first element of the double precision complex column-major matrix.
372 // \param lda The total number of elements between two columns of the matrix A; size >= max( 1, \a n ).
373 // \param w Pointer to the first element of the vector for the eigenvalues.
374 // \param VL Pointer to the first element of the column-major matrix for the left eigenvectors.
375 // \param ldvl The total number of elements between two columns of the matrix VL \f$[0..\infty)\f$.
376 // \param VR Pointer to the first element of the column-major matrix for the right eigenvectors.
377 // \param ldvr The total number of elements between two columns of the matrix VR \f$[0..\infty)\f$.
378 // \param work Auxiliary array; size >= max( 1, \a lwork ).
379 // \param lwork The dimension of the array \a work; see online reference for details.
380 // \param rwork Auxiliary array; size >= 2*\a n.
381 // \param info Return code of the function call.
382 // \return void
383 //
384 // This function computes the eigenvalues of a non-symmetric \a n-by-\a n double precision
385 // complex column-major matrix based on the LAPACK zgeev() function. Optionally, it computes
386 // the left and/or right eigenvectors. The right eigenvector \f$v[j]\f$ of \a satisfies
387
388 \f[ A * v[j] = lambda[j] * v[j], \f]
389
390 // where \f$lambda[j]\f$ is its eigenvalue. The left eigenvector \f$u[j]\f$ of \a A satisfies
391
392 \f[ u[j]^{H} * A = lambda[j] * u[j]^{H}, \f]
393
394 // where \f$u[j]^{H}\f$ denotes the conjugate transpose of \f$u[j]\f$.
395 //
396 // Complex conjugate pairs of eigenvalues appear consecutively with the eigenvalue having the
397 // positive imaginary part first. The computed eigenvectors are normalized to have Euclidean
398 // norm equal to 1 and largest component real.
399 //
400 // The parameter \a jobvl specifies the computation of the left eigenvectors:
401 //
402 // - \c 'V': The left eigenvectors of \a A are computed and returned in \a VL.
403 // - \c 'N': The left eigenvectors of \a A are not computed.
404 //
405 // The parameter \a jobvr specifies the computation of the right eigenvectors:
406 //
407 // - \c 'V': The right eigenvectors of \a A are computed and returned in \a VR.
408 // - \c 'N': The right eigenvectors of \a A are not computed.
409 //
410 // The \a info argument provides feedback on the success of the function call:
411 //
412 // - = 0: The computation finished successfully.
413 // - < 0: If info = -i, the i-th argument had an illegal value.
414 // - > 0: If info = i, the QR algorithm failed to compute all the eigenvalues and no eigenvectors
415 // have been computed; the elements with index larger than \a i have converged.
416 //
417 // For more information on the zgeev() function, see the LAPACK online documentation browser:
418 //
419 // http://www.netlib.org/lapack/explore-html/
420 //
421 // \note This function can only be used if a fitting LAPACK library, which supports this function,
422 // is available and linked to the executable. Otherwise a call to this function will result in a
423 // linker error.
424 */
geev(char jobvl,char jobvr,blas_int_t n,complex<double> * A,blas_int_t lda,complex<double> * w,complex<double> * VL,blas_int_t ldvl,complex<double> * VR,blas_int_t ldvr,complex<double> * work,blas_int_t lwork,double * rwork,blas_int_t * info)425 inline void geev( char jobvl, char jobvr, blas_int_t n, complex<double>* A, blas_int_t lda,
426 complex<double>* w, complex<double>* VL, blas_int_t ldvl, complex<double>* VR,
427 blas_int_t ldvr, complex<double>* work, blas_int_t lwork, double* rwork,
428 blas_int_t* info )
429 {
430 BLAZE_STATIC_ASSERT( sizeof( complex<double> ) == 2UL*sizeof( double ) );
431
432 #if defined(INTEL_MKL_VERSION)
433 BLAZE_STATIC_ASSERT( sizeof( MKL_INT ) == sizeof( blas_int_t ) );
434 BLAZE_STATIC_ASSERT( sizeof( MKL_Complex16 ) == sizeof( complex<double> ) );
435 using ET = MKL_Complex16;
436 #else
437 using ET = double;
438 #endif
439
440 zgeev_( &jobvl, &jobvr, &n, reinterpret_cast<ET*>( A ), &lda, reinterpret_cast<ET*>( w ),
441 reinterpret_cast<ET*>( VL ), &ldvl, reinterpret_cast<ET*>( VR ), &ldvr,
442 reinterpret_cast<ET*>( work ), &lwork, rwork, info
443 #if !defined(INTEL_MKL_VERSION)
444 , blaze::fortran_charlen_t(1), blaze::fortran_charlen_t(1)
445 #endif
446 );
447 }
448 //*************************************************************************************************
449
450 } // namespace blaze
451
452 #endif
453