Blaze
3.9
Toggle main menu visibility
Loading...
Searching...
No Matches
blaze
math
lapack
clapack
geqrf.h
Go to the documentation of this file.
1
//=================================================================================================
33
//=================================================================================================
34
35
#ifndef _BLAZE_MATH_LAPACK_CLAPACK_GEQRF_H_
36
#define _BLAZE_MATH_LAPACK_CLAPACK_GEQRF_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)
57
extern
"C"
{
58
59
void
sgeqrf_(
blaze::blas_int_t
* m,
blaze::blas_int_t
* n,
float
* A,
blaze::blas_int_t
* lda,
60
float
* tau,
float
* work,
blaze::blas_int_t
* lwork,
blaze::blas_int_t
* info );
61
void
dgeqrf_(
blaze::blas_int_t
* m,
blaze::blas_int_t
* n,
double
* A,
blaze::blas_int_t
* lda,
62
double
* tau,
double
* work,
blaze::blas_int_t
* lwork,
blaze::blas_int_t
* info );
63
void
cgeqrf_(
blaze::blas_int_t
* m,
blaze::blas_int_t
* n,
float
* A,
blaze::blas_int_t
* lda,
64
float
* tau,
float
* work,
blaze::blas_int_t
* lwork,
blaze::blas_int_t
* info );
65
void
zgeqrf_(
blaze::blas_int_t
* m,
blaze::blas_int_t
* n,
double
* A,
blaze::blas_int_t
* lda,
66
double
* tau,
double
* work,
blaze::blas_int_t
* lwork,
blaze::blas_int_t
* info );
67
68
}
69
#endif
71
//*************************************************************************************************
72
73
74
75
76
namespace
blaze {
77
78
//=================================================================================================
79
//
80
// LAPACK QR DECOMPOSITION FUNCTIONS (GEQRF)
81
//
82
//=================================================================================================
83
84
//*************************************************************************************************
87
void
geqrf
(
blas_int_t
m,
blas_int_t
n,
float
* A,
blas_int_t
lda,
88
float
* tau,
float
* work,
blas_int_t
lwork,
blas_int_t
* info );
89
90
void
geqrf
(
blas_int_t
m,
blas_int_t
n,
double
* A,
blas_int_t
lda,
91
double
* tau,
double
* work,
blas_int_t
lwork,
blas_int_t
* info );
92
93
void
geqrf
(
blas_int_t
m,
blas_int_t
n, complex<float>* A,
blas_int_t
lda,
94
complex<float>* tau, complex<float>* work,
blas_int_t
lwork,
blas_int_t
* info );
95
96
void
geqrf
(
blas_int_t
m,
blas_int_t
n, complex<double>* A,
blas_int_t
lda,
97
complex<double>* tau, complex<double>* work,
blas_int_t
lwork,
blas_int_t
* info );
99
//*************************************************************************************************
100
101
102
//*************************************************************************************************
151
inline
void
geqrf
(
blas_int_t
m,
blas_int_t
n,
float
* A,
blas_int_t
lda,
152
float
* tau,
float
* work,
blas_int_t
lwork,
blas_int_t
* info )
153
{
154
#if defined(INTEL_MKL_VERSION)
155
BLAZE_STATIC_ASSERT
(
sizeof
( MKL_INT ) ==
sizeof
(
blas_int_t
) );
156
#endif
157
158
sgeqrf_( &m, &n, A, &lda, tau, work, &lwork, info );
159
}
160
//*************************************************************************************************
161
162
163
//*************************************************************************************************
212
inline
void
geqrf
(
blas_int_t
m,
blas_int_t
n,
double
* A,
blas_int_t
lda,
213
double
* tau,
double
* work,
blas_int_t
lwork,
blas_int_t
* info )
214
{
215
#if defined(INTEL_MKL_VERSION)
216
BLAZE_STATIC_ASSERT
(
sizeof
( MKL_INT ) ==
sizeof
(
blas_int_t
) );
217
#endif
218
219
dgeqrf_( &m, &n, A, &lda, tau, work, &lwork, info );
220
}
221
//*************************************************************************************************
222
223
224
//*************************************************************************************************
273
inline
void
geqrf
(
blas_int_t
m,
blas_int_t
n, complex<float>* A,
blas_int_t
lda,
274
complex<float>* tau, complex<float>* work,
blas_int_t
lwork,
blas_int_t
* info )
275
{
276
BLAZE_STATIC_ASSERT
(
sizeof
( complex<float> ) == 2UL*
sizeof
(
float
) );
277
278
#if defined(INTEL_MKL_VERSION)
279
BLAZE_STATIC_ASSERT
(
sizeof
( MKL_INT ) ==
sizeof
(
blas_int_t
) );
280
BLAZE_STATIC_ASSERT
(
sizeof
( MKL_Complex8 ) ==
sizeof
( complex<float> ) );
281
using
ET = MKL_Complex8;
282
#else
283
using
ET = float;
284
#endif
285
286
cgeqrf_( &m, &n,
reinterpret_cast<
ET*
>
( A ), &lda,
reinterpret_cast<
ET*
>
( tau ),
287
reinterpret_cast<
ET*
>
( work ), &lwork, info );
288
}
289
//*************************************************************************************************
290
291
292
//*************************************************************************************************
341
inline
void
geqrf
(
blas_int_t
m,
blas_int_t
n, complex<double>* A,
blas_int_t
lda,
342
complex<double>* tau, complex<double>* work,
blas_int_t
lwork,
blas_int_t
* info )
343
{
344
BLAZE_STATIC_ASSERT
(
sizeof
( complex<double> ) == 2UL*
sizeof
(
double
) );
345
346
#if defined(INTEL_MKL_VERSION)
347
BLAZE_STATIC_ASSERT
(
sizeof
( MKL_INT ) ==
sizeof
(
blas_int_t
) );
348
BLAZE_STATIC_ASSERT
(
sizeof
( MKL_Complex16 ) ==
sizeof
( complex<double> ) );
349
using
ET = MKL_Complex16;
350
#else
351
using
ET = double;
352
#endif
353
354
zgeqrf_( &m, &n,
reinterpret_cast<
ET*
>
( A ), &lda,
reinterpret_cast<
ET*
>
( tau ),
355
reinterpret_cast<
ET*
>
( work ), &lwork, info );
356
}
357
//*************************************************************************************************
358
359
}
// namespace blaze
360
361
#endif
Complex.h
Header file for the complex data type.
StaticAssert.h
Compile time assertion.
blaze::geqrf
void geqrf(blas_int_t m, blas_int_t n, float *A, blas_int_t lda, float *tau, float *work, blas_int_t lwork, blas_int_t *info)
LAPACK kernel for the QR decomposition of the given dense single precision column-major matrix.
Definition
geqrf.h:151
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