Blaze
3.9
Toggle main menu visibility
Loading...
Searching...
No Matches
blaze
math
lapack
clapack
hesv.h
Go to the documentation of this file.
1
//=================================================================================================
33
//=================================================================================================
34
35
#ifndef _BLAZE_MATH_LAPACK_CLAPACK_HESV_H_
36
#define _BLAZE_MATH_LAPACK_CLAPACK_HESV_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
chesv_(
char
* uplo,
blaze::blas_int_t
* n,
blaze::blas_int_t
* nrhs,
float
* A,
61
blaze::blas_int_t
* lda,
blaze::blas_int_t
* ipiv,
float
* b,
blaze::blas_int_t
* ldb,
62
float
* work,
blaze::blas_int_t
* lwork,
blaze::blas_int_t
* info,
63
blaze::fortran_charlen_t
nuplo );
64
void
zhesv_(
char
* uplo,
blaze::blas_int_t
* n,
blaze::blas_int_t
* nrhs,
double
* A,
65
blaze::blas_int_t
* lda,
blaze::blas_int_t
* ipiv,
double
* b,
blaze::blas_int_t
* ldb,
66
double
* work,
blaze::blas_int_t
* lwork,
blaze::blas_int_t
* info,
67
blaze::fortran_charlen_t
nuplo );
68
69
}
70
#endif
72
//*************************************************************************************************
73
74
75
76
77
namespace
blaze {
78
79
//=================================================================================================
80
//
81
// LAPACK HERMITIAN INDEFINITE LINEAR SYSTEM FUNCTIONS (HESV)
82
//
83
//=================================================================================================
84
85
//*************************************************************************************************
88
void
hesv
(
char
uplo,
blas_int_t
n,
blas_int_t
nrhs, complex<float>* A,
blas_int_t
lda,
89
blas_int_t
* ipiv, complex<float>* B,
blas_int_t
ldb, complex<float>* work,
90
blas_int_t
lwork,
blas_int_t
* info );
91
92
void
hesv
(
char
uplo,
blas_int_t
n,
blas_int_t
nrhs, complex<double>* A,
blas_int_t
lda,
93
blas_int_t
* ipiv, complex<double>* B,
blas_int_t
ldb, complex<double>* work,
94
blas_int_t
lwork,
blas_int_t
* info );
96
//*************************************************************************************************
97
98
99
//*************************************************************************************************
148
inline
void
hesv
(
char
uplo,
blas_int_t
n,
blas_int_t
nrhs, complex<float>* A,
blas_int_t
lda,
149
blas_int_t
* ipiv, complex<float>* B,
blas_int_t
ldb, complex<float>* work,
150
blas_int_t
lwork,
blas_int_t
* info )
151
{
152
BLAZE_STATIC_ASSERT
(
sizeof
( complex<float> ) == 2UL*
sizeof
(
float
) );
153
154
#if defined(INTEL_MKL_VERSION)
155
BLAZE_STATIC_ASSERT
(
sizeof
( MKL_INT ) ==
sizeof
(
blas_int_t
) );
156
BLAZE_STATIC_ASSERT
(
sizeof
( MKL_Complex8 ) ==
sizeof
( complex<float> ) );
157
using
ET = MKL_Complex8;
158
#else
159
using
ET = float;
160
#endif
161
162
chesv_( &uplo, &n, &nrhs,
reinterpret_cast<
ET*
>
( A ), &lda, ipiv,
163
reinterpret_cast<
ET*
>
( B ), &ldb,
reinterpret_cast<
ET*
>
( work ), &lwork, info
164
#
if
!defined(INTEL_MKL_VERSION)
165
,
blaze::fortran_charlen_t
(1)
166
#endif
167
);
168
}
169
//*************************************************************************************************
170
171
172
//*************************************************************************************************
221
inline
void
hesv
(
char
uplo,
blas_int_t
n,
blas_int_t
nrhs, complex<double>* A,
blas_int_t
lda,
222
blas_int_t
* ipiv, complex<double>* B,
blas_int_t
ldb, complex<double>* work,
223
blas_int_t
lwork,
blas_int_t
* info )
224
{
225
BLAZE_STATIC_ASSERT
(
sizeof
( complex<double> ) == 2UL*
sizeof
(
double
) );
226
227
#if defined(INTEL_MKL_VERSION)
228
BLAZE_STATIC_ASSERT
(
sizeof
( MKL_INT ) ==
sizeof
(
blas_int_t
) );
229
BLAZE_STATIC_ASSERT
(
sizeof
( MKL_Complex16 ) ==
sizeof
( complex<double> ) );
230
using
ET = MKL_Complex16;
231
#else
232
using
ET = double;
233
#endif
234
235
zhesv_( &uplo, &n, &nrhs,
reinterpret_cast<
ET*
>
( A ), &lda, ipiv,
236
reinterpret_cast<
ET*
>
( B ), &ldb,
reinterpret_cast<
ET*
>
( work ), &lwork, info
237
#
if
!defined(INTEL_MKL_VERSION)
238
,
blaze::fortran_charlen_t
(1)
239
#endif
240
);
241
}
242
//*************************************************************************************************
243
244
}
// namespace blaze
245
246
#endif
Complex.h
Header file for the complex data type.
StaticAssert.h
Compile time assertion.
blaze::hesv
void hesv(char uplo, blas_int_t n, blas_int_t nrhs, complex< float > *A, blas_int_t lda, blas_int_t *ipiv, complex< float > *B, blas_int_t ldb, complex< float > *work, blas_int_t lwork, blas_int_t *info)
LAPACK kernel for solving a Hermitian indefinite single precision complex linear system of equations ...
Definition
hesv.h:148
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