Blaze
3.9
Toggle main menu visibility
Loading...
Searching...
No Matches
blaze
math
lapack
clapack
hetrs.h
Go to the documentation of this file.
1
//=================================================================================================
33
//=================================================================================================
34
35
#ifndef _BLAZE_MATH_LAPACK_CLAPACK_HETRS_H_
36
#define _BLAZE_MATH_LAPACK_CLAPACK_HETRS_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
chetrs_(
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
blaze::blas_int_t
* info,
blaze::fortran_charlen_t
nuplo );
63
void
zhetrs_(
char
* uplo,
blaze::blas_int_t
* n,
blaze::blas_int_t
* nrhs,
double
* A,
64
blaze::blas_int_t
* lda,
blaze::blas_int_t
* ipiv,
double
* B,
blaze::blas_int_t
* ldb,
65
blaze::blas_int_t
* info,
blaze::fortran_charlen_t
nuplo );
66
67
}
68
#endif
70
//*************************************************************************************************
71
72
73
74
75
namespace
blaze {
76
77
//=================================================================================================
78
//
79
// LAPACK LDLH-BASED SUBSTITUTION FUNCTIONS (HETRS)
80
//
81
//=================================================================================================
82
83
//*************************************************************************************************
86
void
hetrs
(
char
uplo,
blas_int_t
n,
blas_int_t
nrhs,
const
complex<float>* A,
87
blas_int_t
lda,
const
blas_int_t
* ipiv, complex<float>* B,
88
blas_int_t
ldb,
blas_int_t
* info );
89
90
void
hetrs
(
char
uplo,
blas_int_t
n,
blas_int_t
nrhs,
const
complex<double>* A,
91
blas_int_t
lda,
const
blas_int_t
* ipiv, complex<double>* B,
92
blas_int_t
ldb,
blas_int_t
* info );
94
//*************************************************************************************************
95
96
97
//*************************************************************************************************
131
inline
void
hetrs
(
char
uplo,
blas_int_t
n,
blas_int_t
nrhs,
const
complex<float>* A,
132
blas_int_t
lda,
const
blas_int_t
* ipiv, complex<float>* B,
133
blas_int_t
ldb,
blas_int_t
* info )
134
{
135
BLAZE_STATIC_ASSERT
(
sizeof
( complex<float> ) == 2UL*
sizeof
(
float
) );
136
137
#if defined(INTEL_MKL_VERSION)
138
BLAZE_STATIC_ASSERT
(
sizeof
( MKL_INT ) ==
sizeof
(
blas_int_t
) );
139
BLAZE_STATIC_ASSERT
(
sizeof
( MKL_Complex8 ) ==
sizeof
( complex<float> ) );
140
using
ET = MKL_Complex8;
141
#else
142
using
ET = float;
143
#endif
144
145
chetrs_( &uplo, &n, &nrhs,
const_cast<
ET*
>
(
reinterpret_cast<
const
ET*
>
( A ) ),
146
&lda,
const_cast<
blas_int_t
*
>
( ipiv ),
reinterpret_cast<
ET*
>
( B ), &ldb, info
147
#
if
!defined(INTEL_MKL_VERSION)
148
,
blaze::fortran_charlen_t
(1)
149
#endif
150
);
151
}
152
//*************************************************************************************************
153
154
155
//*************************************************************************************************
189
inline
void
hetrs
(
char
uplo,
blas_int_t
n,
blas_int_t
nrhs,
const
complex<double>* A,
190
blas_int_t
lda,
const
blas_int_t
* ipiv, complex<double>* B,
191
blas_int_t
ldb,
blas_int_t
* info )
192
{
193
BLAZE_STATIC_ASSERT
(
sizeof
( complex<double> ) == 2UL*
sizeof
(
double
) );
194
195
#if defined(INTEL_MKL_VERSION)
196
BLAZE_STATIC_ASSERT
(
sizeof
( MKL_INT ) ==
sizeof
(
blas_int_t
) );
197
BLAZE_STATIC_ASSERT
(
sizeof
( MKL_Complex16 ) ==
sizeof
( complex<double> ) );
198
using
ET = MKL_Complex16;
199
#else
200
using
ET = double;
201
#endif
202
203
zhetrs_( &uplo, &n, &nrhs,
const_cast<
ET*
>
(
reinterpret_cast<
const
ET*
>
( A ) ),
204
&lda,
const_cast<
blas_int_t
*
>
( ipiv ),
reinterpret_cast<
ET*
>
( B ), &ldb, info
205
#
if
!defined(INTEL_MKL_VERSION)
206
,
blaze::fortran_charlen_t
(1)
207
#endif
208
);
209
}
210
//*************************************************************************************************
211
212
}
// namespace blaze
213
214
#endif
Complex.h
Header file for the complex data type.
StaticAssert.h
Compile time assertion.
blaze::hetrs
void hetrs(char uplo, blas_int_t n, blas_int_t nrhs, const complex< float > *A, blas_int_t lda, const blas_int_t *ipiv, complex< float > *B, blas_int_t ldb, blas_int_t *info)
LAPACK kernel for the substitution step of solving a symmetric indefinite single precision complex li...
Definition
hetrs.h:131
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