Blaze
3.9
Toggle main menu visibility
Loading...
Searching...
No Matches
blaze
math
lapack
clapack
gelqf.h
Go to the documentation of this file.
1
//=================================================================================================
33
//=================================================================================================
34
35
#ifndef _BLAZE_MATH_LAPACK_CLAPACK_GELQF_H_
36
#define _BLAZE_MATH_LAPACK_CLAPACK_GELQF_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
sgelqf_(
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
dgelqf_(
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
cgelqf_(
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
zgelqf_(
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 LQ DECOMPOSITION FUNCTIONS (GELQF)
81
//
82
//=================================================================================================
83
84
//*************************************************************************************************
87
void
gelqf
(
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
gelqf
(
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
gelqf
(
blas_int_t
m,
blas_int_t
n, complex<float>* A,
94
blas_int_t
lda, complex<float>* tau, complex<float>* work,
95
blas_int_t
lwork,
blas_int_t
* info );
96
97
void
gelqf
(
blas_int_t
m,
blas_int_t
n, complex<double>* A,
98
blas_int_t
lda, complex<double>* tau, complex<double>* work,
99
blas_int_t
lwork,
blas_int_t
* info );
101
//*************************************************************************************************
102
103
104
//*************************************************************************************************
153
inline
void
gelqf
(
blas_int_t
m,
blas_int_t
n,
float
* A,
blas_int_t
lda,
154
float
* tau,
float
* work,
blas_int_t
lwork,
blas_int_t
* info )
155
{
156
#if defined(INTEL_MKL_VERSION)
157
BLAZE_STATIC_ASSERT
(
sizeof
( MKL_INT ) ==
sizeof
(
blas_int_t
) );
158
#endif
159
160
sgelqf_( &m, &n, A, &lda, tau, work, &lwork, info );
161
}
162
//*************************************************************************************************
163
164
165
//*************************************************************************************************
214
inline
void
gelqf
(
blas_int_t
m,
blas_int_t
n,
double
* A,
blas_int_t
lda,
215
double
* tau,
double
* work,
blas_int_t
lwork,
blas_int_t
* info )
216
{
217
#if defined(INTEL_MKL_VERSION)
218
BLAZE_STATIC_ASSERT
(
sizeof
( MKL_INT ) ==
sizeof
(
blas_int_t
) );
219
#endif
220
221
dgelqf_( &m, &n, A, &lda, tau, work, &lwork, info );
222
}
223
//*************************************************************************************************
224
225
226
//*************************************************************************************************
275
inline
void
gelqf
(
blas_int_t
m,
blas_int_t
n, complex<float>* A,
276
blas_int_t
lda, complex<float>* tau, complex<float>* work,
277
blas_int_t
lwork,
blas_int_t
* info )
278
{
279
BLAZE_STATIC_ASSERT
(
sizeof
( complex<float> ) == 2UL*
sizeof
(
float
) );
280
281
#if defined(INTEL_MKL_VERSION)
282
BLAZE_STATIC_ASSERT
(
sizeof
( MKL_INT ) ==
sizeof
(
blas_int_t
) );
283
BLAZE_STATIC_ASSERT
(
sizeof
( MKL_Complex8 ) ==
sizeof
( complex<float> ) );
284
using
ET = MKL_Complex8;
285
#else
286
using
ET = float;
287
#endif
288
289
cgelqf_( &m, &n,
reinterpret_cast<
ET*
>
( A ), &lda,
reinterpret_cast<
ET*
>
( tau ),
290
reinterpret_cast<
ET*
>
( work ), &lwork, info );
291
}
292
//*************************************************************************************************
293
294
295
//*************************************************************************************************
344
inline
void
gelqf
(
blas_int_t
m,
blas_int_t
n, complex<double>* A,
345
blas_int_t
lda, complex<double>* tau, complex<double>* work,
346
blas_int_t
lwork,
blas_int_t
* info )
347
{
348
BLAZE_STATIC_ASSERT
(
sizeof
( complex<double> ) == 2UL*
sizeof
(
double
) );
349
350
#if defined(INTEL_MKL_VERSION)
351
BLAZE_STATIC_ASSERT
(
sizeof
( MKL_INT ) ==
sizeof
(
blas_int_t
) );
352
BLAZE_STATIC_ASSERT
(
sizeof
( MKL_Complex16 ) ==
sizeof
( complex<double> ) );
353
using
ET = MKL_Complex16;
354
#else
355
using
ET = double;
356
#endif
357
358
zgelqf_( &m, &n,
reinterpret_cast<
ET*
>
( A ), &lda,
reinterpret_cast<
ET*
>
( tau ),
359
reinterpret_cast<
ET*
>
( work ), &lwork, info );
360
}
361
//*************************************************************************************************
362
363
}
// namespace blaze
364
365
#endif
Complex.h
Header file for the complex data type.
StaticAssert.h
Compile time assertion.
blaze::gelqf
void gelqf(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 LQ decomposition of the given dense single precision column-major matrix.
Definition
gelqf.h:153
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