Blaze  3.6
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/util/Complex.h>
45 #include <blaze/util/Types.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 cunmlq_( char* side, char* trans, int* m, int* n, int* k, float* A, int* lda,
60  float* tau, float* C, int* ldc, float* work, int* lwork, int* info,
62 void zunmlq_( char* side, char* trans, int* m, int* n, int* k, double* A, int* lda,
63  double* tau, double* C, int* ldc, double* work, int* lwork, int* info,
65 
66 }
67 #endif
68 
69 //*************************************************************************************************
70 
71 
72 
73 
74 namespace blaze {
75 
76 //=================================================================================================
77 //
78 // LAPACK FUNCTIONS TO MULTIPLY Q FROM A LQ DECOMPOSITION WITH A MATRIX (UNMLQ)
79 //
80 //=================================================================================================
81 
82 //*************************************************************************************************
85 void unmlq( char side, char trans, int m, int n, int k, const complex<float>* A, int lda,
86  const complex<float>* tau, complex<float>* C, int ldc, complex<float>* work,
87  int lwork, int* info );
88 
89 void unmlq( char side, char trans, int m, int n, int k, const complex<double>* A, int lda,
90  const complex<double>* tau, complex<double>* C, int ldc, complex<double>* work,
91  int lwork, int* info );
93 //*************************************************************************************************
94 
95 
96 //*************************************************************************************************
143 inline void unmlq( char side, char trans, int m, int n, int k, const complex<float>* A, int lda,
144  const complex<float>* tau, complex<float>* C, int ldc, complex<float>* work,
145  int lwork, int* info )
146 {
147  BLAZE_STATIC_ASSERT( sizeof( complex<float> ) == 2UL*sizeof( float ) );
148 
149 #if defined(INTEL_MKL_VERSION)
150  BLAZE_STATIC_ASSERT( sizeof( MKL_INT ) == sizeof( int ) );
151  using ET = MKL_Complex8;
152 #else
153  using ET = float;
154 #endif
155 
156  cunmlq_( &side, &trans, &m, &n, &k,
157  const_cast<ET*>( reinterpret_cast<const ET*>( A ) ), &lda,
158  const_cast<ET*>( reinterpret_cast<const ET*>( tau ) ),
159  reinterpret_cast<ET*>( C ), &ldc, reinterpret_cast<ET*>( work ),
160  &lwork, info, blaze::fortran_charlen_t(1), blaze::fortran_charlen_t(1) );
161 }
162 //*************************************************************************************************
163 
164 
165 //*************************************************************************************************
212 inline void unmlq( char side, char trans, int m, int n, int k, const complex<double>* A, int lda,
213  const complex<double>* tau, complex<double>* C, int ldc, complex<double>* work,
214  int lwork, int* info )
215 {
216  BLAZE_STATIC_ASSERT( sizeof( complex<double> ) == 2UL*sizeof( double ) );
217 
218 #if defined(INTEL_MKL_VERSION)
219  BLAZE_STATIC_ASSERT( sizeof( MKL_INT ) == sizeof( int ) );
220  using ET = MKL_Complex16;
221 #else
222  using ET = double;
223 #endif
224 
225  zunmlq_( &side, &trans, &m, &n, &k,
226  const_cast<ET*>( reinterpret_cast<const ET*>( A ) ), &lda,
227  const_cast<ET*>( reinterpret_cast<const ET*>( tau ) ),
228  reinterpret_cast<ET*>( C ), &ldc, reinterpret_cast<ET*>( work ),
229  &lwork, info, blaze::fortran_charlen_t(1), blaze::fortran_charlen_t(1) );
230 }
231 //*************************************************************************************************
232 
233 } // namespace blaze
234 
235 #endif
Header file for basic type definitions.
Namespace of the Blaze C++ math library.
Definition: Blaze.h:58
Compile time assertion.
void unmlq(char side, char trans, int m, int n, int k, const complex< float > *A, int lda, const complex< float > *tau, complex< float > *C, int ldc, complex< float > *work, int lwork, int *info)
LAPACK kernel for the multiplication of the single precision complex Q from a LQ decomposition with a...
Definition: unmlq.h:143
decltype(auto) trans(const DenseMatrix< MT, SO > &dm)
Calculation of the transpose of the given dense matrix.
Definition: DMatTransExpr.h:765
Header file for the complex data type.
#define BLAZE_STATIC_ASSERT(expr)
Compile time assertion macro.In case of an invalid compile time expression, a compilation error is cr...
Definition: StaticAssert.h:112
Size type of the Blaze library.