Blaze
3.9
Toggle main menu visibility
Loading...
Searching...
No Matches
blaze
math
lapack
clapack
getrf.h
Go to the documentation of this file.
1
//=================================================================================================
33
//=================================================================================================
34
35
#ifndef _BLAZE_MATH_LAPACK_CLAPACK_GETRF_H_
36
#define _BLAZE_MATH_LAPACK_CLAPACK_GETRF_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
47
48
//=================================================================================================
49
//
50
// LAPACK FORWARD DECLARATIONS
51
//
52
//=================================================================================================
53
54
//*************************************************************************************************
56
#if !defined(INTEL_MKL_VERSION) && !defined(BLAS_H)
57
extern
"C"
{
58
59
void
sgetrf_(
blaze::blas_int_t
* m,
blaze::blas_int_t
* n,
float
* A,
blaze::blas_int_t
* lda,
60
blaze::blas_int_t
* ipiv,
blaze::blas_int_t
* info );
61
void
dgetrf_(
blaze::blas_int_t
* m,
blaze::blas_int_t
* n,
double
* A,
blaze::blas_int_t
* lda,
62
blaze::blas_int_t
* ipiv,
blaze::blas_int_t
* info );
63
void
cgetrf_(
blaze::blas_int_t
* m,
blaze::blas_int_t
* n,
float
* A,
blaze::blas_int_t
* lda,
64
blaze::blas_int_t
* ipiv,
blaze::blas_int_t
* info );
65
void
zgetrf_(
blaze::blas_int_t
* m,
blaze::blas_int_t
* n,
double
* A,
blaze::blas_int_t
* lda,
66
blaze::blas_int_t
* ipiv,
blaze::blas_int_t
* info );
67
68
}
69
#endif
71
//*************************************************************************************************
72
73
74
75
76
namespace
blaze {
77
78
//=================================================================================================
79
//
80
// LAPACK LU DECOMPOSITION FUNCTIONS (GETRF)
81
//
82
//=================================================================================================
83
84
//*************************************************************************************************
87
void
getrf
(
blas_int_t
m,
blas_int_t
n,
float
* A,
blas_int_t
lda,
88
blas_int_t
* ipiv,
blas_int_t
* info );
89
90
void
getrf
(
blas_int_t
m,
blas_int_t
n,
double
* A,
blas_int_t
lda,
91
blas_int_t
* ipiv,
blas_int_t
* info );
92
93
void
getrf
(
blas_int_t
m,
blas_int_t
n, complex<float>* A,
blas_int_t
lda,
94
blas_int_t
* ipiv,
blas_int_t
* info );
95
96
void
getrf
(
blas_int_t
m,
blas_int_t
n, complex<double>* A,
blas_int_t
lda,
97
blas_int_t
* ipiv,
blas_int_t
* info );
99
//*************************************************************************************************
100
101
102
//*************************************************************************************************
140
inline
void
getrf
(
blas_int_t
m,
blas_int_t
n,
float
* A,
blas_int_t
lda,
141
blas_int_t
* ipiv,
blas_int_t
* info )
142
{
143
#if defined(INTEL_MKL_VERSION)
144
BLAZE_STATIC_ASSERT
(
sizeof
( MKL_INT ) ==
sizeof
(
blas_int_t
) );
145
#endif
146
147
sgetrf_( &m, &n, A, &lda, ipiv, info );
148
}
149
//*************************************************************************************************
150
151
152
//*************************************************************************************************
190
inline
void
getrf
(
blas_int_t
m,
blas_int_t
n,
double
* A,
blas_int_t
lda,
191
blas_int_t
* ipiv,
blas_int_t
* info )
192
{
193
#if defined(INTEL_MKL_VERSION)
194
BLAZE_STATIC_ASSERT
(
sizeof
( MKL_INT ) ==
sizeof
(
blas_int_t
) );
195
#endif
196
197
dgetrf_( &m, &n, A, &lda, ipiv, info );
198
}
199
//*************************************************************************************************
200
201
202
//*************************************************************************************************
240
inline
void
getrf
(
blas_int_t
m,
blas_int_t
n, complex<float>* A,
blas_int_t
lda,
241
blas_int_t
* ipiv,
blas_int_t
* info )
242
{
243
BLAZE_STATIC_ASSERT
(
sizeof
( complex<float> ) == 2UL*
sizeof
(
float
) );
244
245
#if defined(INTEL_MKL_VERSION)
246
BLAZE_STATIC_ASSERT
(
sizeof
( MKL_INT ) ==
sizeof
(
blas_int_t
) );
247
BLAZE_STATIC_ASSERT
(
sizeof
( MKL_Complex8 ) ==
sizeof
( complex<float> ) );
248
using
ET = MKL_Complex8;
249
#else
250
using
ET = float;
251
#endif
252
253
cgetrf_( &m, &n,
reinterpret_cast<
ET*
>
( A ), &lda, ipiv, info );
254
}
255
//*************************************************************************************************
256
257
258
//*************************************************************************************************
296
inline
void
getrf
(
blas_int_t
m,
blas_int_t
n, complex<double>* A,
blas_int_t
lda,
297
blas_int_t
* ipiv,
blas_int_t
* info )
298
{
299
BLAZE_STATIC_ASSERT
(
sizeof
( complex<double> ) == 2UL*
sizeof
(
double
) );
300
301
#if defined(INTEL_MKL_VERSION)
302
BLAZE_STATIC_ASSERT
(
sizeof
( MKL_INT ) ==
sizeof
(
blas_int_t
) );
303
BLAZE_STATIC_ASSERT
(
sizeof
( MKL_Complex16 ) ==
sizeof
( complex<double> ) );
304
using
ET = MKL_Complex16;
305
#else
306
using
ET = double;
307
#endif
308
309
zgetrf_( &m, &n,
reinterpret_cast<
ET*
>
( A ), &lda, ipiv, info );
310
}
311
//*************************************************************************************************
312
313
}
// namespace blaze
314
315
#endif
Complex.h
Header file for the complex data type.
StaticAssert.h
Compile time assertion.
blaze::getrf
void getrf(blas_int_t m, blas_int_t n, float *A, blas_int_t lda, blas_int_t *ipiv, blas_int_t *info)
LAPACK kernel for the LU decomposition of the given dense general single precision column-major matri...
Definition
getrf.h:140
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
Types.h
Header file for basic BLAS type definitions.
Generated by
1.18.0