Blaze
3.9
Toggle main menu visibility
Loading...
Searching...
No Matches
blaze
math
lapack
clapack
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/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
//*************************************************************************************************
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
80
//*************************************************************************************************
81
82
83
84
85
namespace
blaze {
86
87
//=================================================================================================
88
//
89
// LAPACK GENERAL MATRIX EIGENVALUE FUNCTIONS (GEEV)
90
//
91
//=================================================================================================
92
93
//*************************************************************************************************
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 );
114
//*************************************************************************************************
115
116
117
//*************************************************************************************************
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
//*************************************************************************************************
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
//*************************************************************************************************
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
//*************************************************************************************************
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
Complex.h
Header file for the complex data type.
StaticAssert.h
Compile time assertion.
blaze::geev
void 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)
LAPACK kernel for computing the eigenvalues of the given dense general single precision column-major ...
Definition
geev.h:179
blaze::blas_int_t
int32_t blas_int_t
Signed integer type used in the BLAS/LAPACK wrapper functions.
Definition
Types.h:64
BLAZE_STATIC_ASSERT
#define BLAZE_STATIC_ASSERT(expr)
Compile time assertion macro.
Definition
StaticAssert.h:112
blaze::fortran_charlen_t
size_t fortran_charlen_t
Type of the hidden arguments of character type within a Fortran forward declaration.
Definition
Types.h:186
Types.h
Header file for basic BLAS type definitions.
Types.h
Header file for basic type definitions.
Generated by
1.18.0