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 
46 
47 //=================================================================================================
48 //
49 // LAPACK FORWARD DECLARATIONS
50 //
51 //=================================================================================================
52 
53 //*************************************************************************************************
55 #if !defined(INTEL_MKL_VERSION)
56 extern "C" {
57 
58 void cunmlq_( char* side, char* trans, int* m, int* n, int* k, float* A, int* lda, float* tau, float* C, int* ldc, float* work, int* lwork, int* info );
59 void zunmlq_( char* side, char* trans, int* m, int* n, int* k, double* A, int* lda, double* tau, double* C, int* ldc, double* work, int* lwork, int* info );
60 
61 }
62 #endif
63 
64 //*************************************************************************************************
65 
66 
67 
68 
69 namespace blaze {
70 
71 //=================================================================================================
72 //
73 // LAPACK FUNCTIONS TO MULTIPLY Q FROM A LQ DECOMPOSITION WITH A MATRIX (UNMLQ)
74 //
75 //=================================================================================================
76 
77 //*************************************************************************************************
80 inline void unmlq( char side, char trans, int m, int n, int k, const complex<float>* A, int lda,
81  const complex<float>* tau, complex<float>* C, int ldc, complex<float>* work,
82  int lwork, int* info );
83 
84 inline void unmlq( char side, char trans, int m, int n, int k, const complex<double>* A, int lda,
85  const complex<double>* tau, complex<double>* C, int ldc, complex<double>* work,
86  int lwork, int* info );
88 //*************************************************************************************************
89 
90 
91 //*************************************************************************************************
138 inline void unmlq( char side, char trans, int m, int n, int k, const complex<float>* A, int lda,
139  const complex<float>* tau, complex<float>* C, int ldc, complex<float>* work,
140  int lwork, int* info )
141 {
142  BLAZE_STATIC_ASSERT( sizeof( complex<float> ) == 2UL*sizeof( float ) );
143 
144 #if defined(INTEL_MKL_VERSION)
145  BLAZE_STATIC_ASSERT( sizeof( MKL_INT ) == sizeof( int ) );
146  using ET = MKL_Complex8;
147 #else
148  using ET = float;
149 #endif
150 
151  cunmlq_( &side, &trans, &m, &n, &k,
152  const_cast<ET*>( reinterpret_cast<const ET*>( A ) ), &lda,
153  const_cast<ET*>( reinterpret_cast<const ET*>( tau ) ),
154  reinterpret_cast<ET*>( C ), &ldc, reinterpret_cast<ET*>( work ),
155  &lwork, info );
156 }
157 //*************************************************************************************************
158 
159 
160 //*************************************************************************************************
207 inline void unmlq( char side, char trans, int m, int n, int k, const complex<double>* A, int lda,
208  const complex<double>* tau, complex<double>* C, int ldc, complex<double>* work,
209  int lwork, int* info )
210 {
211  BLAZE_STATIC_ASSERT( sizeof( complex<double> ) == 2UL*sizeof( double ) );
212 
213 #if defined(INTEL_MKL_VERSION)
214  BLAZE_STATIC_ASSERT( sizeof( MKL_INT ) == sizeof( int ) );
215  using ET = MKL_Complex16;
216 #else
217  using ET = double;
218 #endif
219 
220  zunmlq_( &side, &trans, &m, &n, &k,
221  const_cast<ET*>( reinterpret_cast<const ET*>( A ) ), &lda,
222  const_cast<ET*>( reinterpret_cast<const ET*>( tau ) ),
223  reinterpret_cast<ET*>( C ), &ldc, reinterpret_cast<ET*>( work ),
224  &lwork, info );
225 }
226 //*************************************************************************************************
227 
228 } // namespace blaze
229 
230 #endif
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:138
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