Blaze
3.9
Toggle main menu visibility
Loading...
Searching...
No Matches
blaze
math
lapack
clapack
pstrf.h
Go to the documentation of this file.
1
//=================================================================================================
33
//=================================================================================================
34
35
#ifndef _BLAZE_MATH_LAPACK_CLAPACK_PSTRF_H_
36
#define _BLAZE_MATH_LAPACK_CLAPACK_PSTRF_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
spstrf_(
char
* uplo,
blaze::blas_int_t
* n,
float
* A,
blaze::blas_int_t
* lda,
61
blaze::blas_int_t
* piv,
blaze::blas_int_t
* rank,
float
* tol,
float
* work,
62
blaze::blas_int_t
* info,
blaze::fortran_charlen_t
nuplo );
63
void
dpstrf_(
char
* uplo,
blaze::blas_int_t
* n,
double
* A,
blaze::blas_int_t
* lda,
64
blaze::blas_int_t
* piv,
blaze::blas_int_t
* rank,
double
* tol,
double
* work,
65
blaze::blas_int_t
* info,
blaze::fortran_charlen_t
nuplo );
66
void
cpstrf_(
char
* uplo,
blaze::blas_int_t
* n,
float
* A,
blaze::blas_int_t
* lda,
67
blaze::blas_int_t
* piv,
blaze::blas_int_t
* rank,
float
* tol,
float
* work,
68
blaze::blas_int_t
* info,
blaze::fortran_charlen_t
nuplo );
69
void
zpstrf_(
char
* uplo,
blaze::blas_int_t
* n,
double
* A,
blaze::blas_int_t
* lda,
70
blaze::blas_int_t
* piv,
blaze::blas_int_t
* rank,
double
* tol,
double
* work,
71
blaze::blas_int_t
* info,
blaze::fortran_charlen_t
nuplo );
72
73
}
74
#endif
76
//*************************************************************************************************
77
78
79
80
81
namespace
blaze {
82
83
//=================================================================================================
84
//
85
// LAPACK LLH PIVOTING (CHOLESKY) DECOMPOSITION FUNCTIONS (PSTRF)
86
//
87
//=================================================================================================
88
89
//*************************************************************************************************
92
void
pstrf
(
char
uplo,
blas_int_t
n,
float
* A,
blas_int_t
lda,
93
blaze::blas_int_t
* piv,
blaze::blas_int_t
*
rank
,
float
tol,
float
* work,
94
blas_int_t
* info );
95
96
void
pstrf
(
char
uplo,
blas_int_t
n,
double
* A,
blas_int_t
lda,
97
blaze::blas_int_t
* piv,
blaze::blas_int_t
*
rank
,
double
tol,
double
* work,
98
blas_int_t
* info );
99
100
void
pstrf
(
char
uplo,
blas_int_t
n, complex<float>* A,
blas_int_t
lda,
101
blaze::blas_int_t
* piv,
blaze::blas_int_t
*
rank
,
float
tol, complex<float>* work,
102
blas_int_t
* info );
103
104
void
pstrf
(
char
uplo,
blas_int_t
n, complex<double>* A,
blas_int_t
lda,
105
blaze::blas_int_t
* piv,
blaze::blas_int_t
*
rank
,
double
tol, complex<double>* work,
106
blas_int_t
* info );
108
//*************************************************************************************************
109
110
111
//*************************************************************************************************
155
inline
void
pstrf
(
char
uplo,
blas_int_t
n,
float
* A,
blas_int_t
lda,
156
blaze::blas_int_t
* piv,
blaze::blas_int_t
*
rank
,
float
tol,
157
float
* work,
blas_int_t
* info )
158
{
159
#if defined(INTEL_MKL_VERSION)
160
BLAZE_STATIC_ASSERT
(
sizeof
( MKL_INT ) ==
sizeof
(
blas_int_t
) );
161
#endif
162
163
spstrf_( &uplo, &n, A, &lda, piv,
rank
, &tol, work, info
164
#
if
!defined(INTEL_MKL_VERSION) && !defined(BLAS_H)
165
,
blaze::fortran_charlen_t
(1)
166
#endif
167
);
168
}
169
//*************************************************************************************************
170
171
172
//*************************************************************************************************
216
inline
void
pstrf
(
char
uplo,
blas_int_t
n,
double
* A,
blas_int_t
lda,
217
blaze::blas_int_t
* piv,
blaze::blas_int_t
*
rank
,
double
tol,
218
double
* work,
blas_int_t
* info )
219
{
220
#if defined(INTEL_MKL_VERSION)
221
BLAZE_STATIC_ASSERT
(
sizeof
( MKL_INT ) ==
sizeof
(
blas_int_t
) );
222
#endif
223
224
dpstrf_( &uplo, &n, A, &lda, piv,
rank
, &tol, work, info
225
#
if
!defined(INTEL_MKL_VERSION) && !defined(BLAS_H)
226
,
blaze::fortran_charlen_t
(1)
227
#endif
228
);
229
}
230
//*************************************************************************************************
231
232
233
//*************************************************************************************************
277
inline
void
pstrf
(
char
uplo,
blas_int_t
n, complex<float>* A,
blas_int_t
lda,
278
blaze::blas_int_t
* piv,
blaze::blas_int_t
*
rank
,
float
tol,
279
complex<float>* work,
blas_int_t
* info )
280
{
281
#if defined(INTEL_MKL_VERSION)
282
BLAZE_STATIC_ASSERT
(
sizeof
( MKL_INT ) ==
sizeof
(
blas_int_t
) );
283
#endif
284
285
#if defined(INTEL_MKL_VERSION)
286
BLAZE_STATIC_ASSERT
(
sizeof
( MKL_INT ) ==
sizeof
(
blas_int_t
) );
287
BLAZE_STATIC_ASSERT
(
sizeof
( MKL_Complex8 ) ==
sizeof
( complex<float> ) );
288
using
ET = MKL_Complex8;
289
#else
290
using
ET = float;
291
#endif
292
293
cpstrf_( &uplo, &n,
reinterpret_cast<
ET*
>
(A), &lda, piv,
rank
,
294
&tol,
reinterpret_cast<
ET*
>
(work), info
295
#
if
!defined(INTEL_MKL_VERSION) && !defined(BLAS_H)
296
,
blaze::fortran_charlen_t
(1)
297
#endif
298
);
299
}
300
//*************************************************************************************************
301
302
303
//*************************************************************************************************
347
inline
void
pstrf
(
char
uplo,
blas_int_t
n, complex<double>* A,
blas_int_t
lda,
348
blaze::blas_int_t
* piv,
blaze::blas_int_t
*
rank
,
double
tol,
349
complex<double>* work,
blas_int_t
* info )
350
{
351
#if defined(INTEL_MKL_VERSION)
352
BLAZE_STATIC_ASSERT
(
sizeof
( MKL_INT ) ==
sizeof
(
blas_int_t
) );
353
#endif
354
355
#if defined(INTEL_MKL_VERSION)
356
BLAZE_STATIC_ASSERT
(
sizeof
( MKL_INT ) ==
sizeof
(
blas_int_t
) );
357
BLAZE_STATIC_ASSERT
(
sizeof
( MKL_Complex16 ) ==
sizeof
( complex<double> ) );
358
using
ET = MKL_Complex16;
359
#else
360
using
ET = double;
361
#endif
362
363
zpstrf_( &uplo, &n,
reinterpret_cast<
ET*
>
(A), &lda, piv,
rank
,
364
&tol,
reinterpret_cast<
ET*
>
(work), info
365
#
if
!defined(INTEL_MKL_VERSION) && !defined(BLAS_H)
366
,
blaze::fortran_charlen_t
(1)
367
#endif
368
);
369
}
370
//*************************************************************************************************
371
372
}
// namespace blaze
373
374
#endif
Complex.h
Header file for the complex data type.
StaticAssert.h
Compile time assertion.
blaze::rank
size_t rank(const DenseMatrix< MT, SO > &dm)
Computes the rank of the given dense matrix.
Definition
DenseMatrix.h:2715
blaze::pstrf
void pstrf(char uplo, blas_int_t n, float *A, blas_int_t lda, blaze::blas_int_t *piv, blaze::blas_int_t *rank, float tol, float *work, blas_int_t *info)
LAPACK kernel for the pivoting Cholesky decomposition of the given dense semi-positive definite singl...
Definition
pstrf.h:155
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