Blaze  3.6
ung2l.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_MATH_LAPACK_CLAPACK_UNG2L_H_
36 #define _BLAZE_MATH_LAPACK_CLAPACK_UNG2L_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 cung2l_( int* m, int* n, int* k, float* A, int* lda, float* tau, float* work, int* info );
59 void zung2l_( int* m, int* n, int* k, double* A, int* lda, double* tau, double* work, int* info );
60 
61 }
62 #endif
63 
64 //*************************************************************************************************
65 
66 
67 
68 
69 namespace blaze {
70 
71 //=================================================================================================
72 //
73 // LAPACK FUNCTIONS TO RECONSTRUCT Q FROM A QL DECOMPOSITION (UNG2L)
74 //
75 //=================================================================================================
76 
77 //*************************************************************************************************
80 void ung2l( int m, int n, int k, complex<float>* A, int lda, const complex<float>* tau,
81  complex<float>* work, int* info );
82 
83 void ung2l( int m, int n, int k, complex<double>* A, int lda, const complex<double>* tau,
84  complex<double>* work, int* info );
86 //*************************************************************************************************
87 
88 
89 //*************************************************************************************************
119 inline void ung2l( int m, int n, int k, complex<float>* A, int lda, const complex<float>* tau,
120  complex<float>* work, int* info )
121 {
122  BLAZE_STATIC_ASSERT( sizeof( complex<float> ) == 2UL*sizeof( float ) );
123 
124 #if defined(INTEL_MKL_VERSION)
125  BLAZE_STATIC_ASSERT( sizeof( MKL_INT ) == sizeof( int ) );
126  using ET = MKL_Complex8;
127 #else
128  using ET = float;
129 #endif
130 
131  cung2l_( &m, &n, &k, reinterpret_cast<ET*>( A ), &lda,
132  const_cast<ET*>( reinterpret_cast<const ET*>( tau ) ),
133  reinterpret_cast<ET*>( work ), info );
134 }
135 //*************************************************************************************************
136 
137 
138 //*************************************************************************************************
168 inline void ung2l( int m, int n, int k, complex<double>* A, int lda, const complex<double>* tau,
169  complex<double>* work, int* info )
170 {
171  BLAZE_STATIC_ASSERT( sizeof( complex<double> ) == 2UL*sizeof( double ) );
172 
173 #if defined(INTEL_MKL_VERSION)
174  BLAZE_STATIC_ASSERT( sizeof( MKL_INT ) == sizeof( int ) );
175  using ET = MKL_Complex16;
176 #else
177  using ET = double;
178 #endif
179 
180  zung2l_( &m, &n, &k, reinterpret_cast<ET*>( A ), &lda,
181  const_cast<ET*>( reinterpret_cast<const ET*>( tau ) ),
182  reinterpret_cast<ET*>( work ), info );
183 }
184 //*************************************************************************************************
185 
186 } // namespace blaze
187 
188 #endif
Namespace of the Blaze C++ math library.
Definition: Blaze.h:58
Compile time assertion.
void ung2l(int m, int n, int k, complex< float > *A, int lda, const complex< float > *tau, complex< float > *work, int *info)
LAPACK kernel for the reconstruction of the orthogonal matrix Q from a QL decomposition.
Definition: ung2l.h:119
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