Blaze
3.9
Toggle main menu visibility
Loading...
Searching...
No Matches
blaze
math
lapack
clapack
ungr2.h
Go to the documentation of this file.
1
//=================================================================================================
33
//=================================================================================================
34
35
#ifndef _BLAZE_MATH_LAPACK_CLAPACK_UNGR2_H_
36
#define _BLAZE_MATH_LAPACK_CLAPACK_UNGR2_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
cungr2_(
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
* info );
61
void
zungr2_(
blaze::blas_int_t
* m,
blaze::blas_int_t
* n,
blaze::blas_int_t
* k,
double
* A,
62
blaze::blas_int_t
* lda,
double
* tau,
double
* work,
blaze::blas_int_t
* info );
63
64
}
65
#endif
67
//*************************************************************************************************
68
69
70
71
72
namespace
blaze {
73
74
//=================================================================================================
75
//
76
// LAPACK FUNCTIONS TO RECONSTRUCT Q FROM A RQ DECOMPOSITION (UNGR2)
77
//
78
//=================================================================================================
79
80
//*************************************************************************************************
83
void
ungr2
(
blas_int_t
m,
blas_int_t
n,
blas_int_t
k, complex<float>* A,
blas_int_t
lda,
84
const
complex<float>* tau, complex<float>* work,
blas_int_t
* info );
85
86
void
ungr2
(
blas_int_t
m,
blas_int_t
n,
blas_int_t
k, complex<double>* A,
blas_int_t
lda,
87
const
complex<double>* tau, complex<double>* work,
blas_int_t
* info );
89
//*************************************************************************************************
90
91
92
//*************************************************************************************************
122
inline
void
ungr2
(
blas_int_t
m,
blas_int_t
n,
blas_int_t
k, complex<float>* A,
blas_int_t
lda,
123
const
complex<float>* tau, complex<float>* work,
blas_int_t
* info )
124
{
125
BLAZE_STATIC_ASSERT
(
sizeof
( complex<float> ) == 2UL*
sizeof
(
float
) );
126
127
#if defined(INTEL_MKL_VERSION)
128
BLAZE_STATIC_ASSERT
(
sizeof
( MKL_INT ) ==
sizeof
(
blas_int_t
) );
129
BLAZE_STATIC_ASSERT
(
sizeof
( MKL_Complex8 ) ==
sizeof
( complex<float> ) );
130
using
ET = MKL_Complex8;
131
#else
132
using
ET = float;
133
#endif
134
135
cungr2_( &m, &n, &k,
reinterpret_cast<
ET*
>
( A ), &lda,
136
const_cast<
ET*
>
(
reinterpret_cast<
const
ET*
>
( tau ) ),
137
reinterpret_cast<
ET*
>
( work ), info );
138
}
139
//*************************************************************************************************
140
141
142
//*************************************************************************************************
172
inline
void
ungr2
(
blas_int_t
m,
blas_int_t
n,
blas_int_t
k, complex<double>* A,
blas_int_t
lda,
173
const
complex<double>* tau, complex<double>* work,
blas_int_t
* info )
174
{
175
BLAZE_STATIC_ASSERT
(
sizeof
( complex<double> ) == 2UL*
sizeof
(
double
) );
176
177
#if defined(INTEL_MKL_VERSION)
178
BLAZE_STATIC_ASSERT
(
sizeof
( MKL_INT ) ==
sizeof
(
blas_int_t
) );
179
BLAZE_STATIC_ASSERT
(
sizeof
( MKL_Complex16 ) ==
sizeof
( complex<double> ) );
180
using
ET = MKL_Complex16;
181
#else
182
using
ET = double;
183
#endif
184
185
zungr2_( &m, &n, &k,
reinterpret_cast<
ET*
>
( A ), &lda,
186
const_cast<
ET*
>
(
reinterpret_cast<
const
ET*
>
( tau ) ),
187
reinterpret_cast<
ET*
>
( work ), info );
188
}
189
//*************************************************************************************************
190
191
}
// namespace blaze
192
193
#endif
Complex.h
Header file for the complex data type.
StaticAssert.h
Compile time assertion.
blaze::ungr2
void ungr2(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 *info)
LAPACK kernel for the reconstruction of the orthogonal matrix Q from a RQ decomposition.
Definition
ungr2.h:122
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