Blaze
3.9
Toggle main menu visibility
Loading...
Searching...
No Matches
blaze
math
lapack
clapack
unmlq.h
Go to the documentation of this file.
1
//=================================================================================================
33
//=================================================================================================
34
35
#ifndef _BLAZE_MATH_LAPACK_CLAPACK_UNMLQ_H_
36
#define _BLAZE_MATH_LAPACK_CLAPACK_UNMLQ_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
#include <
blaze/util/Types.h
>
47
48
49
//=================================================================================================
50
//
51
// LAPACK FORWARD DECLARATIONS
52
//
53
//=================================================================================================
54
55
//*************************************************************************************************
57
#if !defined(INTEL_MKL_VERSION)
58
extern
"C"
{
59
60
void
cunmlq_(
char
* side,
char
* trans,
blaze::blas_int_t
* m,
blaze::blas_int_t
* n,
61
blaze::blas_int_t
* k,
float
* A,
blaze::blas_int_t
* lda,
float
* tau,
float
* C,
62
blaze::blas_int_t
* ldc,
float
* work,
blaze::blas_int_t
* lwork,
blaze::blas_int_t
* info,
63
blaze::fortran_charlen_t
nside,
blaze::fortran_charlen_t
ntrans );
64
void
zunmlq_(
char
* side,
char
* trans,
blaze::blas_int_t
* m,
blaze::blas_int_t
* n,
65
blaze::blas_int_t
* k,
double
* A,
blaze::blas_int_t
* lda,
double
* tau,
double
* C,
66
blaze::blas_int_t
* ldc,
double
* work,
blaze::blas_int_t
* lwork,
blaze::blas_int_t
* info,
67
blaze::fortran_charlen_t
nside,
blaze::fortran_charlen_t
ntrans );
68
69
}
70
#endif
72
//*************************************************************************************************
73
74
75
76
77
namespace
blaze {
78
79
//=================================================================================================
80
//
81
// LAPACK FUNCTIONS TO MULTIPLY Q FROM A LQ DECOMPOSITION WITH A MATRIX (UNMLQ)
82
//
83
//=================================================================================================
84
85
//*************************************************************************************************
88
void
unmlq
(
char
side,
char
trans
,
blas_int_t
m,
blas_int_t
n,
89
blas_int_t
k,
const
complex<float>* A,
blas_int_t
lda,
90
const
complex<float>* tau, complex<float>* C,
blas_int_t
ldc,
91
complex<float>* work,
blas_int_t
lwork,
blas_int_t
* info );
92
93
void
unmlq
(
char
side,
char
trans
,
blas_int_t
m,
blas_int_t
n,
94
blas_int_t
k,
const
complex<double>* A,
blas_int_t
lda,
95
const
complex<double>* tau, complex<double>* C,
blas_int_t
ldc,
96
complex<double>* work,
blas_int_t
lwork,
blas_int_t
* info );
98
//*************************************************************************************************
99
100
101
//*************************************************************************************************
148
inline
void
unmlq
(
char
side,
char
trans
,
blas_int_t
m,
blas_int_t
n,
149
blas_int_t
k,
const
complex<float>* A,
blas_int_t
lda,
150
const
complex<float>* tau, complex<float>* C,
blas_int_t
ldc,
151
complex<float>* work,
blas_int_t
lwork,
blas_int_t
* info )
152
{
153
BLAZE_STATIC_ASSERT
(
sizeof
( complex<float> ) == 2UL*
sizeof
(
float
) );
154
155
#if defined(INTEL_MKL_VERSION)
156
BLAZE_STATIC_ASSERT
(
sizeof
( MKL_INT ) ==
sizeof
(
blas_int_t
) );
157
BLAZE_STATIC_ASSERT
(
sizeof
( MKL_Complex8 ) ==
sizeof
( complex<float> ) );
158
using
ET = MKL_Complex8;
159
#else
160
using
ET = float;
161
#endif
162
163
cunmlq_( &side, &
trans
, &m, &n, &k,
164
const_cast<
ET*
>
(
reinterpret_cast<
const
ET*
>
( A ) ), &lda,
165
const_cast<
ET*
>
(
reinterpret_cast<
const
ET*
>
( tau ) ),
166
reinterpret_cast<
ET*
>
( C ), &ldc,
reinterpret_cast<
ET*
>
( work ),
167
&lwork, info
168
#
if
!defined(INTEL_MKL_VERSION)
169
,
blaze::fortran_charlen_t
(1),
blaze::fortran_charlen_t
(1)
170
#endif
171
);
172
}
173
//*************************************************************************************************
174
175
176
//*************************************************************************************************
223
inline
void
unmlq
(
char
side,
char
trans
,
blas_int_t
m,
blas_int_t
n,
224
blas_int_t
k,
const
complex<double>* A,
blas_int_t
lda,
225
const
complex<double>* tau, complex<double>* C,
blas_int_t
ldc,
226
complex<double>* work,
blas_int_t
lwork,
blas_int_t
* info )
227
{
228
BLAZE_STATIC_ASSERT
(
sizeof
( complex<double> ) == 2UL*
sizeof
(
double
) );
229
230
#if defined(INTEL_MKL_VERSION)
231
BLAZE_STATIC_ASSERT
(
sizeof
( MKL_INT ) ==
sizeof
(
blas_int_t
) );
232
BLAZE_STATIC_ASSERT
(
sizeof
( MKL_Complex16 ) ==
sizeof
( complex<double> ) );
233
using
ET = MKL_Complex16;
234
#else
235
using
ET = double;
236
#endif
237
238
zunmlq_( &side, &
trans
, &m, &n, &k,
239
const_cast<
ET*
>
(
reinterpret_cast<
const
ET*
>
( A ) ), &lda,
240
const_cast<
ET*
>
(
reinterpret_cast<
const
ET*
>
( tau ) ),
241
reinterpret_cast<
ET*
>
( C ), &ldc,
reinterpret_cast<
ET*
>
( work ),
242
&lwork, info
243
#
if
!defined(INTEL_MKL_VERSION)
244
,
blaze::fortran_charlen_t
(1),
blaze::fortran_charlen_t
(1)
245
#endif
246
);
247
}
248
//*************************************************************************************************
249
250
}
// namespace blaze
251
252
#endif
Complex.h
Header file for the complex data type.
StaticAssert.h
Compile time assertion.
blaze::trans
decltype(auto) trans(const DenseMatrix< MT, SO > &dm)
Calculation of the transpose of the given dense matrix.
Definition
DMatTransExpr.h:766
blaze::unmlq
void unmlq(char side, char trans, blas_int_t m, blas_int_t n, blas_int_t k, const complex< float > *A, blas_int_t lda, const complex< float > *tau, complex< float > *C, blas_int_t ldc, complex< float > *work, blas_int_t lwork, blas_int_t *info)
LAPACK kernel for the multiplication of the single precision complex Q from a LQ decomposition with a...
Definition
unmlq.h:148
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
blaze::fortran_charlen_t
size_t fortran_charlen_t
Type of the hidden arguments of character type within a Fortran forward declaration.
Definition
Types.h:186
Types.h
Header file for basic BLAS type definitions.
Types.h
Header file for basic type definitions.
Generated by
1.18.0