Blaze
3.9
Toggle main menu visibility
Loading...
Searching...
No Matches
blaze
math
lapack
clapack
potri.h
Go to the documentation of this file.
1
//=================================================================================================
33
//=================================================================================================
34
35
#ifndef _BLAZE_MATH_LAPACK_CLAPACK_POTRI_H_
36
#define _BLAZE_MATH_LAPACK_CLAPACK_POTRI_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) && !defined(BLAS_H)
58
extern
"C"
{
59
60
void
spotri_(
char
* uplo,
blaze::blas_int_t
* n,
float
* A,
blaze::blas_int_t
* lda,
61
blaze::blas_int_t
* info,
blaze::fortran_charlen_t
nuplo );
62
void
dpotri_(
char
* uplo,
blaze::blas_int_t
* n,
double
* A,
blaze::blas_int_t
* lda,
63
blaze::blas_int_t
* info,
blaze::fortran_charlen_t
nuplo );
64
void
cpotri_(
char
* uplo,
blaze::blas_int_t
* n,
float
* A,
blaze::blas_int_t
* lda,
65
blaze::blas_int_t
* info,
blaze::fortran_charlen_t
nuplo );
66
void
zpotri_(
char
* uplo,
blaze::blas_int_t
* n,
double
* A,
blaze::blas_int_t
* lda,
67
blaze::blas_int_t
* info,
blaze::fortran_charlen_t
nuplo );
68
69
}
70
#endif
72
//*************************************************************************************************
73
74
75
76
77
namespace
blaze {
78
79
//=================================================================================================
80
//
81
// LAPACK LLH-BASED INVERSION FUNCTIONS (POTRI)
82
//
83
//=================================================================================================
84
85
//*************************************************************************************************
88
void
potri
(
char
uplo,
blas_int_t
n,
float
* A,
blas_int_t
lda,
blas_int_t
* info );
89
90
void
potri
(
char
uplo,
blas_int_t
n,
double
* A,
blas_int_t
lda,
blas_int_t
* info );
91
92
void
potri
(
char
uplo,
blas_int_t
n, complex<float>* A,
blas_int_t
lda,
blas_int_t
* info );
93
94
void
potri
(
char
uplo,
blas_int_t
n, complex<double>* A,
blas_int_t
lda,
blas_int_t
* info );
96
//*************************************************************************************************
97
98
99
//*************************************************************************************************
130
inline
void
potri
(
char
uplo,
blas_int_t
n,
float
* A,
blas_int_t
lda,
blas_int_t
* info )
131
{
132
#if defined(INTEL_MKL_VERSION)
133
BLAZE_STATIC_ASSERT
(
sizeof
( MKL_INT ) ==
sizeof
(
blas_int_t
) );
134
#endif
135
136
spotri_( &uplo, &n, A, &lda, info
137
#
if
!defined(INTEL_MKL_VERSION) && !defined(BLAS_H)
138
,
blaze::fortran_charlen_t
(1)
139
#endif
140
);
141
}
142
//*************************************************************************************************
143
144
145
//*************************************************************************************************
176
inline
void
potri
(
char
uplo,
blas_int_t
n,
double
* A,
blas_int_t
lda,
blas_int_t
* info )
177
{
178
#if defined(INTEL_MKL_VERSION)
179
BLAZE_STATIC_ASSERT
(
sizeof
( MKL_INT ) ==
sizeof
(
blas_int_t
) );
180
#endif
181
182
dpotri_( &uplo, &n, A, &lda, info
183
#
if
!defined(INTEL_MKL_VERSION) && !defined(BLAS_H)
184
,
blaze::fortran_charlen_t
(1)
185
#endif
186
);
187
}
188
//*************************************************************************************************
189
190
191
//*************************************************************************************************
222
inline
void
potri
(
char
uplo,
blas_int_t
n, complex<float>* A,
blas_int_t
lda,
blas_int_t
* info )
223
{
224
BLAZE_STATIC_ASSERT
(
sizeof
( complex<float> ) == 2UL*
sizeof
(
float
) );
225
226
#if defined(INTEL_MKL_VERSION)
227
BLAZE_STATIC_ASSERT
(
sizeof
( MKL_INT ) ==
sizeof
(
blas_int_t
) );
228
BLAZE_STATIC_ASSERT
(
sizeof
( MKL_Complex8 ) ==
sizeof
( complex<float> ) );
229
using
ET = MKL_Complex8;
230
#else
231
using
ET = float;
232
#endif
233
234
cpotri_( &uplo, &n,
reinterpret_cast<
ET*
>
( A ), &lda, info
235
#
if
!defined(INTEL_MKL_VERSION) && !defined(BLAS_H)
236
,
blaze::fortran_charlen_t
(1)
237
#endif
238
);
239
}
240
//*************************************************************************************************
241
242
243
//*************************************************************************************************
274
inline
void
potri
(
char
uplo,
blas_int_t
n, complex<double>* A,
blas_int_t
lda,
blas_int_t
* info )
275
{
276
BLAZE_STATIC_ASSERT
(
sizeof
( complex<double> ) == 2UL*
sizeof
(
double
) );
277
278
#if defined(INTEL_MKL_VERSION)
279
BLAZE_STATIC_ASSERT
(
sizeof
( MKL_INT ) ==
sizeof
(
blas_int_t
) );
280
BLAZE_STATIC_ASSERT
(
sizeof
( MKL_Complex16 ) ==
sizeof
( complex<double> ) );
281
using
ET = MKL_Complex16;
282
#else
283
using
ET = double;
284
#endif
285
286
zpotri_( &uplo, &n,
reinterpret_cast<
ET*
>
( A ), &lda, info
287
#
if
!defined(INTEL_MKL_VERSION) && !defined(BLAS_H)
288
,
blaze::fortran_charlen_t
(1)
289
#endif
290
);
291
}
292
//*************************************************************************************************
293
294
}
// namespace blaze
295
296
#endif
Complex.h
Header file for the complex data type.
StaticAssert.h
Compile time assertion.
blaze::potri
void potri(char uplo, blas_int_t n, float *A, blas_int_t lda, blas_int_t *info)
LAPACK kernel for the inversion of the given dense positive definite single precision column-major sq...
Definition
potri.h:130
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