Blaze
3.9
Toggle main menu visibility
Loading...
Searching...
No Matches
blaze
math
lapack
clapack
heev.h
Go to the documentation of this file.
1
//=================================================================================================
33
//=================================================================================================
34
35
#ifndef _BLAZE_MATH_LAPACK_CLAPACK_HEEV_H_
36
#define _BLAZE_MATH_LAPACK_CLAPACK_HEEV_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
cheev_(
char
* jobz,
char
* uplo,
blaze::blas_int_t
* n,
float
* A,
blaze::blas_int_t
* lda,
61
float
* w,
float
* work,
blaze::blas_int_t
* lwork,
float
* rwork,
blaze::blas_int_t
* info,
62
blaze::fortran_charlen_t
njobz,
blaze::fortran_charlen_t
nuplo );
63
void
zheev_(
char
* jobz,
char
* uplo,
blaze::blas_int_t
* n,
double
* A,
blaze::blas_int_t
* lda,
64
double
* w,
double
* work,
blaze::blas_int_t
* lwork,
double
* rwork,
blaze::blas_int_t
* info,
65
blaze::fortran_charlen_t
njobz,
blaze::fortran_charlen_t
nuplo );
66
67
}
68
#endif
70
//*************************************************************************************************
71
72
73
74
75
namespace
blaze {
76
77
//=================================================================================================
78
//
79
// LAPACK HERMITIAN MATRIX EIGENVALUE FUNCTIONS (HEEV)
80
//
81
//=================================================================================================
82
83
//*************************************************************************************************
86
void
heev
(
char
jobz,
char
uplo,
blas_int_t
n, complex<float>* A,
87
blas_int_t
lda,
float
* w, complex<float>* work,
88
blas_int_t
lwork,
float
* rwork,
blas_int_t
* info );
89
90
void
heev
(
char
jobz,
char
uplo,
blas_int_t
n, complex<double>* A,
91
blas_int_t
lda,
double
* w, complex<double>* work,
92
blas_int_t
lwork,
double
* rwork,
blas_int_t
* info );
94
//*************************************************************************************************
95
96
97
//*************************************************************************************************
138
inline
void
heev
(
char
jobz,
char
uplo,
blas_int_t
n, complex<float>* A,
139
blas_int_t
lda,
float
* w, complex<float>* work,
140
blas_int_t
lwork,
float
* rwork,
blas_int_t
* info )
141
{
142
BLAZE_STATIC_ASSERT
(
sizeof
( complex<float> ) == 2UL*
sizeof
(
float
) );
143
144
#if defined(INTEL_MKL_VERSION)
145
BLAZE_STATIC_ASSERT
(
sizeof
( MKL_INT ) ==
sizeof
(
blas_int_t
) );
146
BLAZE_STATIC_ASSERT
(
sizeof
( MKL_Complex8 ) ==
sizeof
( complex<float> ) );
147
using
ET = MKL_Complex8;
148
#else
149
using
ET = float;
150
#endif
151
152
cheev_( &jobz, &uplo, &n,
reinterpret_cast<
ET*
>
( A ), &lda, w,
153
reinterpret_cast<
ET*
>
( work ), &lwork, rwork, info
154
#
if
!defined(INTEL_MKL_VERSION)
155
,
blaze::fortran_charlen_t
(1),
blaze::fortran_charlen_t
(1)
156
#endif
157
);
158
}
159
//*************************************************************************************************
160
161
162
//*************************************************************************************************
203
inline
void
heev
(
char
jobz,
char
uplo,
blas_int_t
n, complex<double>* A,
204
blas_int_t
lda,
double
* w, complex<double>* work,
205
blas_int_t
lwork,
double
* rwork,
blas_int_t
* info )
206
{
207
BLAZE_STATIC_ASSERT
(
sizeof
( complex<double> ) == 2UL*
sizeof
(
double
) );
208
209
#if defined(INTEL_MKL_VERSION)
210
BLAZE_STATIC_ASSERT
(
sizeof
( MKL_INT ) ==
sizeof
(
blas_int_t
) );
211
BLAZE_STATIC_ASSERT
(
sizeof
( MKL_Complex16 ) ==
sizeof
( complex<double> ) );
212
using
ET = MKL_Complex16;
213
#else
214
using
ET = double;
215
#endif
216
217
zheev_( &jobz, &uplo, &n,
reinterpret_cast<
ET*
>
( A ), &lda, w,
218
reinterpret_cast<
ET*
>
( work ), &lwork, rwork, info
219
#
if
!defined(INTEL_MKL_VERSION)
220
,
blaze::fortran_charlen_t
(1),
blaze::fortran_charlen_t
(1)
221
#endif
222
);
223
}
224
//*************************************************************************************************
225
226
}
// namespace blaze
227
228
#endif
Complex.h
Header file for the complex data type.
StaticAssert.h
Compile time assertion.
blaze::heev
void heev(char jobz, char uplo, blas_int_t n, complex< float > *A, blas_int_t lda, float *w, complex< float > *work, blas_int_t lwork, float *rwork, blas_int_t *info)
LAPACK kernel for computing the eigenvalues of the given dense Hermitian single precision column-majo...
Definition
heev.h:138
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