Blaze
3.9
Toggle main menu visibility
Loading...
Searching...
No Matches
blaze
math
lapack
clapack
potrf.h
Go to the documentation of this file.
1
//=================================================================================================
33
//=================================================================================================
34
35
#ifndef _BLAZE_MATH_LAPACK_CLAPACK_POTRF_H_
36
#define _BLAZE_MATH_LAPACK_CLAPACK_POTRF_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
spotrf_(
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
dpotrf_(
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
cpotrf_(
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
zpotrf_(
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 (CHOLESKY) DECOMPOSITION FUNCTIONS (POTRF)
82
//
83
//=================================================================================================
84
85
//*************************************************************************************************
88
void
potrf
(
char
uplo,
blas_int_t
n,
float
* A,
blas_int_t
lda,
blas_int_t
* info );
89
90
void
potrf
(
char
uplo,
blas_int_t
n,
double
* A,
blas_int_t
lda,
blas_int_t
* info );
91
92
void
potrf
(
char
uplo,
blas_int_t
n, complex<float>* A,
blas_int_t
lda,
blas_int_t
* info );
93
94
void
potrf
(
char
uplo,
blas_int_t
n, complex<double>* A,
blas_int_t
lda,
blas_int_t
* info );
96
//*************************************************************************************************
97
98
99
//*************************************************************************************************
137
inline
void
potrf
(
char
uplo,
blas_int_t
n,
float
* A,
blas_int_t
lda,
blas_int_t
* info )
138
{
139
#if defined(INTEL_MKL_VERSION)
140
BLAZE_STATIC_ASSERT
(
sizeof
( MKL_INT ) ==
sizeof
(
blas_int_t
) );
141
#endif
142
143
spotrf_( &uplo, &n, A, &lda, info
144
#
if
!defined(INTEL_MKL_VERSION) && !defined(BLAS_H)
145
,
blaze::fortran_charlen_t
(1)
146
#endif
147
);
148
}
149
//*************************************************************************************************
150
151
152
//*************************************************************************************************
190
inline
void
potrf
(
char
uplo,
blas_int_t
n,
double
* A,
blas_int_t
lda,
blas_int_t
* info )
191
{
192
#if defined(INTEL_MKL_VERSION)
193
BLAZE_STATIC_ASSERT
(
sizeof
( MKL_INT ) ==
sizeof
(
blas_int_t
) );
194
#endif
195
196
dpotrf_( &uplo, &n, A, &lda, info
197
#
if
!defined(INTEL_MKL_VERSION) && !defined(BLAS_H)
198
,
blaze::fortran_charlen_t
(1)
199
#endif
200
);
201
}
202
//*************************************************************************************************
203
204
205
//*************************************************************************************************
243
inline
void
potrf
(
char
uplo,
blas_int_t
n, complex<float>* A,
blas_int_t
lda,
blas_int_t
* info )
244
{
245
BLAZE_STATIC_ASSERT
(
sizeof
( complex<float> ) == 2UL*
sizeof
(
float
) );
246
247
#if defined(INTEL_MKL_VERSION)
248
BLAZE_STATIC_ASSERT
(
sizeof
( MKL_INT ) ==
sizeof
(
blas_int_t
) );
249
BLAZE_STATIC_ASSERT
(
sizeof
( MKL_Complex8 ) ==
sizeof
( complex<float> ) );
250
using
ET = MKL_Complex8;
251
#else
252
using
ET = float;
253
#endif
254
255
cpotrf_( &uplo, &n,
reinterpret_cast<
ET*
>
( A ), &lda, info
256
#
if
!defined(INTEL_MKL_VERSION) && !defined(BLAS_H)
257
,
blaze::fortran_charlen_t
(1)
258
#endif
259
);
260
}
261
//*************************************************************************************************
262
263
264
//*************************************************************************************************
302
inline
void
potrf
(
char
uplo,
blas_int_t
n, complex<double>* A,
blas_int_t
lda,
blas_int_t
* info )
303
{
304
BLAZE_STATIC_ASSERT
(
sizeof
( complex<double> ) == 2UL*
sizeof
(
double
) );
305
306
#if defined(INTEL_MKL_VERSION)
307
BLAZE_STATIC_ASSERT
(
sizeof
( MKL_INT ) ==
sizeof
(
blas_int_t
) );
308
BLAZE_STATIC_ASSERT
(
sizeof
( MKL_Complex16 ) ==
sizeof
( complex<double> ) );
309
using
ET = MKL_Complex16;
310
#else
311
using
ET = double;
312
#endif
313
314
zpotrf_( &uplo, &n,
reinterpret_cast<
ET*
>
( A ), &lda, info
315
#
if
!defined(INTEL_MKL_VERSION) && !defined(BLAS_H)
316
,
blaze::fortran_charlen_t
(1)
317
#endif
318
);
319
}
320
//*************************************************************************************************
321
322
}
// namespace blaze
323
324
#endif
Complex.h
Header file for the complex data type.
StaticAssert.h
Compile time assertion.
blaze::potrf
void potrf(char uplo, blas_int_t n, float *A, blas_int_t lda, blas_int_t *info)
LAPACK kernel for the Cholesky decomposition of the given dense positive definite single precision co...
Definition
potrf.h:137
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