Blaze 3.9
geqlf.h
Go to the documentation of this file.
1//=================================================================================================
33//=================================================================================================
34
35#ifndef _BLAZE_MATH_LAPACK_CLAPACK_GEQLF_H_
36#define _BLAZE_MATH_LAPACK_CLAPACK_GEQLF_H_
37
38
39//*************************************************************************************************
40// Includes
41//*************************************************************************************************
42
44#include <blaze/util/Complex.h>
46
47
48//=================================================================================================
49//
50// LAPACK FORWARD DECLARATIONS
51//
52//=================================================================================================
53
54//*************************************************************************************************
56#if !defined(INTEL_MKL_VERSION)
57extern "C" {
58
59void sgeqlf_( 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 );
61void dgeqlf_( 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 );
63void cgeqlf_( 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 );
65void zgeqlf_( 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
76namespace blaze {
77
78//=================================================================================================
79//
80// LAPACK QL DECOMPOSITION FUNCTIONS (GEQLF)
81//
82//=================================================================================================
83
84//*************************************************************************************************
87void geqlf( 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
90void geqlf( 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
94 complex<float>* tau, complex<float>* work, blas_int_t lwork, blas_int_t* info );
95
97 complex<double>* tau, complex<double>* work, blas_int_t lwork, blas_int_t* info );
99//*************************************************************************************************
100
101
102//*************************************************************************************************
152inline void geqlf( blas_int_t m, blas_int_t n, float* A, blas_int_t lda,
153 float* tau, float* work, blas_int_t lwork, blas_int_t* info )
154{
155#if defined(INTEL_MKL_VERSION)
156 BLAZE_STATIC_ASSERT( sizeof( MKL_INT ) == sizeof( blas_int_t ) );
157#endif
158
159 sgeqlf_( &m, &n, A, &lda, tau, work, &lwork, info );
160}
161//*************************************************************************************************
162
163
164//*************************************************************************************************
214inline void geqlf( 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 dgeqlf_( &m, &n, A, &lda, tau, work, &lwork, info );
222}
223//*************************************************************************************************
224
225
226//*************************************************************************************************
276inline void geqlf( blas_int_t m, blas_int_t n, complex<float>* A, blas_int_t lda,
277 complex<float>* tau, complex<float>* work, 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 cgeqlf_( &m, &n, reinterpret_cast<ET*>( A ), &lda, reinterpret_cast<ET*>( tau ),
290 reinterpret_cast<ET*>( work ), &lwork, info );
291}
292//*************************************************************************************************
293
294
295//*************************************************************************************************
345inline void geqlf( blas_int_t m, blas_int_t n, complex<double>* A, blas_int_t lda,
346 complex<double>* tau, complex<double>* work, 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 zgeqlf_( &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
Header file for the complex data type.
Compile time assertion.
Complex data type of the Blaze library.
void geqlf(DenseMatrix< MT, SO > &A, ElementType_t< MT > *tau)
LAPACK kernel for the QL decomposition of the given dense matrix.
Definition: geqlf.h:119
int32_t blas_int_t
Signed integer type used in the BLAS/LAPACK wrapper functions.
Definition: Types.h:64
#define BLAZE_STATIC_ASSERT(expr)
Compile time assertion macro.
Definition: StaticAssert.h:112
Header file for basic BLAS type definitions.