Blaze
3.9
Toggle main menu visibility
Loading...
Searching...
No Matches
blaze
math
lapack
clapack
ungqr.h
Go to the documentation of this file.
1
//=================================================================================================
33
//=================================================================================================
34
35
#ifndef _BLAZE_MATH_LAPACK_CLAPACK_UNGQR_H_
36
#define _BLAZE_MATH_LAPACK_CLAPACK_UNGQR_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
cungqr_(
blaze::blas_int_t
* m,
blaze::blas_int_t
* n,
blaze::blas_int_t
* k,
float
* A,
60
blaze::blas_int_t
* lda,
float
* tau,
float
* work,
blaze::blas_int_t
* lwork,
61
blaze::blas_int_t
* info );
62
void
zungqr_(
blaze::blas_int_t
* m,
blaze::blas_int_t
* n,
blaze::blas_int_t
* k,
double
* A,
63
blaze::blas_int_t
* lda,
double
* tau,
double
* work,
blaze::blas_int_t
* lwork,
64
blaze::blas_int_t
* info );
65
66
}
67
#endif
69
//*************************************************************************************************
70
71
72
73
74
namespace
blaze {
75
76
//=================================================================================================
77
//
78
// LAPACK FUNCTIONS TO RECONSTRUCT Q FROM A QR DECOMPOSITION (UNGQR)
79
//
80
//=================================================================================================
81
82
//*************************************************************************************************
85
void
ungqr
(
blas_int_t
m,
blas_int_t
n,
blas_int_t
k, complex<float>* A,
86
blas_int_t
lda,
const
complex<float>* tau, complex<float>* work,
87
blas_int_t
lwork,
blas_int_t
* info );
88
89
void
ungqr
(
blas_int_t
m,
blas_int_t
n,
blas_int_t
k, complex<double>* A,
90
blas_int_t
lda,
const
complex<double>* tau, complex<double>* work,
91
blas_int_t
lwork,
blas_int_t
* info );
93
//*************************************************************************************************
94
95
96
//*************************************************************************************************
127
inline
void
ungqr
(
blas_int_t
m,
blas_int_t
n,
blas_int_t
k, complex<float>* A,
128
blas_int_t
lda,
const
complex<float>* tau, complex<float>* work,
129
blas_int_t
lwork,
blas_int_t
* info )
130
{
131
BLAZE_STATIC_ASSERT
(
sizeof
( complex<float> ) == 2UL*
sizeof
(
float
) );
132
133
#if defined(INTEL_MKL_VERSION)
134
BLAZE_STATIC_ASSERT
(
sizeof
( MKL_INT ) ==
sizeof
(
blas_int_t
) );
135
BLAZE_STATIC_ASSERT
(
sizeof
( MKL_Complex8 ) ==
sizeof
( complex<float> ) );
136
using
ET = MKL_Complex8;
137
#else
138
using
ET = float;
139
#endif
140
141
cungqr_( &m, &n, &k,
reinterpret_cast<
ET*
>
( A ), &lda,
142
const_cast<
ET*
>
(
reinterpret_cast<
const
ET*
>
( tau ) ),
143
reinterpret_cast<
ET*
>
( work ), &lwork, info );
144
}
145
//*************************************************************************************************
146
147
148
//*************************************************************************************************
179
inline
void
ungqr
(
blas_int_t
m,
blas_int_t
n,
blas_int_t
k, complex<double>* A,
180
blas_int_t
lda,
const
complex<double>* tau, complex<double>* work,
181
blas_int_t
lwork,
blas_int_t
* info )
182
{
183
BLAZE_STATIC_ASSERT
(
sizeof
( complex<double> ) == 2UL*
sizeof
(
double
) );
184
185
#if defined(INTEL_MKL_VERSION)
186
BLAZE_STATIC_ASSERT
(
sizeof
( MKL_INT ) ==
sizeof
(
blas_int_t
) );
187
BLAZE_STATIC_ASSERT
(
sizeof
( MKL_Complex16 ) ==
sizeof
( complex<double> ) );
188
using
ET = MKL_Complex16;
189
#else
190
using
ET = double;
191
#endif
192
193
zungqr_( &m, &n, &k,
reinterpret_cast<
ET*
>
( A ), &lda,
194
const_cast<
ET*
>
(
reinterpret_cast<
const
ET*
>
( tau ) ),
195
reinterpret_cast<
ET*
>
( work ), &lwork, info );
196
}
197
//*************************************************************************************************
198
199
}
// namespace blaze
200
201
#endif
Complex.h
Header file for the complex data type.
StaticAssert.h
Compile time assertion.
blaze::ungqr
void ungqr(blas_int_t m, blas_int_t n, blas_int_t k, complex< float > *A, blas_int_t lda, const complex< float > *tau, complex< float > *work, blas_int_t lwork, blas_int_t *info)
LAPACK kernel for the reconstruction of the orthogonal matrix Q from a QR decomposition.
Definition
ungqr.h:127
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