Blaze
3.9
Toggle main menu visibility
Loading...
Searching...
No Matches
blaze
math
lapack
clapack
sytri.h
Go to the documentation of this file.
1
//=================================================================================================
33
//=================================================================================================
34
35
#ifndef _BLAZE_MATH_LAPACK_CLAPACK_SYTRI_H_
36
#define _BLAZE_MATH_LAPACK_CLAPACK_SYTRI_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
ssytri_(
char
* uplo,
blaze::blas_int_t
* n,
float
* A,
blaze::blas_int_t
* lda,
61
blaze::blas_int_t
* ipiv,
float
* work,
blaze::blas_int_t
* info,
62
blaze::fortran_charlen_t
nuplo );
63
void
dsytri_(
char
* uplo,
blaze::blas_int_t
* n,
double
* A,
blaze::blas_int_t
* lda,
64
blaze::blas_int_t
* ipiv,
double
* work,
blaze::blas_int_t
* info,
65
blaze::fortran_charlen_t
nuplo );
66
void
csytri_(
char
* uplo,
blaze::blas_int_t
* n,
float
* A,
blaze::blas_int_t
* lda,
67
blaze::blas_int_t
* ipiv,
float
* work,
blaze::blas_int_t
* info,
68
blaze::fortran_charlen_t
nuplo );
69
void
zsytri_(
char
* uplo,
blaze::blas_int_t
* n,
double
* A,
blaze::blas_int_t
* lda,
70
blaze::blas_int_t
* ipiv,
double
* work,
blaze::blas_int_t
* info,
71
blaze::fortran_charlen_t
nuplo );
72
73
}
74
#endif
76
//*************************************************************************************************
77
78
79
80
81
namespace
blaze {
82
83
//=================================================================================================
84
//
85
// LAPACK LDLT-BASED INVERSION FUNCTIONS (SYTRI)
86
//
87
//=================================================================================================
88
89
//*************************************************************************************************
92
void
sytri
(
char
uplo,
blas_int_t
n,
float
* A,
blas_int_t
lda,
93
const
blas_int_t
* ipiv,
float
* work,
blas_int_t
* info );
94
95
void
sytri
(
char
uplo,
blas_int_t
n,
double
* A,
blas_int_t
lda,
96
const
blas_int_t
* ipiv,
double
* work,
blas_int_t
* info );
97
98
void
sytri
(
char
uplo,
blas_int_t
n, complex<float>* A,
blas_int_t
lda,
99
const
blas_int_t
* ipiv, complex<float>* work,
blas_int_t
* info );
100
101
void
sytri
(
char
uplo,
blas_int_t
n, complex<double>* A,
blas_int_t
lda,
102
const
blas_int_t
* ipiv, complex<double>* work,
blas_int_t
* info );
104
//*************************************************************************************************
105
106
107
//*************************************************************************************************
139
inline
void
sytri
(
char
uplo,
blas_int_t
n,
float
* A,
blas_int_t
lda,
140
const
blas_int_t
* ipiv,
float
* work,
blas_int_t
* info )
141
{
142
#if defined(INTEL_MKL_VERSION)
143
BLAZE_STATIC_ASSERT
(
sizeof
( MKL_INT ) ==
sizeof
(
blas_int_t
) );
144
#endif
145
146
ssytri_( &uplo, &n, A, &lda,
const_cast<
blas_int_t
*
>
( ipiv ), work, info
147
#
if
!defined(INTEL_MKL_VERSION)
148
,
blaze::fortran_charlen_t
(1)
149
#endif
150
);
151
}
152
//*************************************************************************************************
153
154
155
//*************************************************************************************************
187
inline
void
sytri
(
char
uplo,
blas_int_t
n,
double
* A,
blas_int_t
lda,
188
const
blas_int_t
* ipiv,
double
* work,
blas_int_t
* info )
189
{
190
#if defined(INTEL_MKL_VERSION)
191
BLAZE_STATIC_ASSERT
(
sizeof
( MKL_INT ) ==
sizeof
(
blas_int_t
) );
192
#endif
193
194
dsytri_( &uplo, &n, A, &lda,
const_cast<
blas_int_t
*
>
( ipiv ), work, info
195
#
if
!defined(INTEL_MKL_VERSION)
196
,
blaze::fortran_charlen_t
(1)
197
#endif
198
);
199
}
200
//*************************************************************************************************
201
202
203
//*************************************************************************************************
235
inline
void
sytri
(
char
uplo,
blas_int_t
n, complex<float>* A,
blas_int_t
lda,
236
const
blas_int_t
* ipiv, complex<float>* work,
blas_int_t
* info )
237
{
238
BLAZE_STATIC_ASSERT
(
sizeof
( complex<float> ) == 2UL*
sizeof
(
float
) );
239
240
#if defined(INTEL_MKL_VERSION)
241
BLAZE_STATIC_ASSERT
(
sizeof
( MKL_INT ) ==
sizeof
(
blas_int_t
) );
242
BLAZE_STATIC_ASSERT
(
sizeof
( MKL_Complex8 ) ==
sizeof
( complex<float> ) );
243
using
ET = MKL_Complex8;
244
#else
245
using
ET = float;
246
#endif
247
248
csytri_( &uplo, &n,
reinterpret_cast<
ET*
>
( A ), &lda,
249
const_cast<
blas_int_t
*
>
( ipiv ),
reinterpret_cast<
ET*
>
( work ), info
250
#
if
!defined(INTEL_MKL_VERSION)
251
,
blaze::fortran_charlen_t
(1)
252
#endif
253
);
254
}
255
//*************************************************************************************************
256
257
258
//*************************************************************************************************
290
inline
void
sytri
(
char
uplo,
blas_int_t
n, complex<double>* A,
blas_int_t
lda,
291
const
blas_int_t
* ipiv, complex<double>* work,
blas_int_t
* info )
292
{
293
BLAZE_STATIC_ASSERT
(
sizeof
( complex<double> ) == 2UL*
sizeof
(
double
) );
294
295
#if defined(INTEL_MKL_VERSION)
296
BLAZE_STATIC_ASSERT
(
sizeof
( MKL_INT ) ==
sizeof
(
blas_int_t
) );
297
BLAZE_STATIC_ASSERT
(
sizeof
( MKL_Complex16 ) ==
sizeof
( complex<double> ) );
298
using
ET = MKL_Complex16;
299
#else
300
using
ET = double;
301
#endif
302
303
zsytri_( &uplo, &n,
reinterpret_cast<
ET*
>
( A ), &lda,
304
const_cast<
blas_int_t
*
>
( ipiv ),
reinterpret_cast<
ET*
>
( work ), info
305
#
if
!defined(INTEL_MKL_VERSION)
306
,
blaze::fortran_charlen_t
(1)
307
#endif
308
);
309
}
310
//*************************************************************************************************
311
312
}
// namespace blaze
313
314
#endif
Complex.h
Header file for the complex data type.
StaticAssert.h
Compile time assertion.
blaze::sytri
void sytri(char uplo, blas_int_t n, float *A, blas_int_t lda, const blas_int_t *ipiv, float *work, blas_int_t *info)
LAPACK kernel for the inversion of the given dense symmetric indefinite single precision column-major...
Definition
sytri.h:139
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