ungql.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_MATH_LAPACK_CLAPACK_UNGQL_H_
36 #define _BLAZE_MATH_LAPACK_CLAPACK_UNGQL_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 extern "C" {
56 
57 void cungql_( int* m, int* n, int* k, float* A, int* lda, float* tau, float* work, int* lwork, int* info );
58 void zungql_( int* m, int* n, int* k, double* A, int* lda, double* tau, double* work, int* lwork, int* info );
59 
60 }
62 //*************************************************************************************************
63 
64 
65 
66 
67 namespace blaze {
68 
69 //=================================================================================================
70 //
71 // LAPACK FUNCTIONS TO RECONSTRUCT Q FROM A QL DECOMPOSITION (UNGQL)
72 //
73 //=================================================================================================
74 
75 //*************************************************************************************************
78 inline void ungql( int m, int n, int k, complex<float>* A, int lda, const complex<float>* tau,
79  complex<float>* work, int lwork, int* info );
80 
81 inline void ungql( int m, int n, int k, complex<double>* A, int lda, const complex<double>* tau,
82  complex<double>* work, int lwork, int* info );
84 //*************************************************************************************************
85 
86 
87 //*************************************************************************************************
117 inline void ungql( int m, int n, int k, complex<float>* A, int lda, const complex<float>* tau,
118  complex<float>* work, int lwork, int* info )
119 {
120  BLAZE_STATIC_ASSERT( sizeof( complex<float> ) == 2UL*sizeof( float ) );
121 
122  cungql_( &m, &n, &k, reinterpret_cast<float*>( A ), &lda,
123  const_cast<float*>( reinterpret_cast<const float*>( tau ) ),
124  reinterpret_cast<float*>( work ), &lwork, info );
125 }
126 //*************************************************************************************************
127 
128 
129 //*************************************************************************************************
159 inline void ungql( int m, int n, int k, complex<double>* A, int lda, const complex<double>* tau,
160  complex<double>* work, int lwork, int* info )
161 {
162  BLAZE_STATIC_ASSERT( sizeof( complex<double> ) == 2UL*sizeof( double ) );
163 
164  zungql_( &m, &n, &k, reinterpret_cast<double*>( A ), &lda,
165  const_cast<double*>( reinterpret_cast<const double*>( tau ) ),
166  reinterpret_cast<double*>( work ), &lwork, info );
167 }
168 //*************************************************************************************************
169 
170 } // namespace blaze
171 
172 #endif
Log level for high-level information.
Definition: LogLevel.h:80
Namespace of the Blaze C++ math library.
Definition: Blaze.h:57
Compile time assertion.
void ungql(int m, int n, int k, complex< float > *A, int lda, const complex< float > *tau, complex< float > *work, int lwork, int *info)
LAPACK kernel for the reconstruction of the orthogonal matrix Q from a QL decomposition.
Definition: ungql.h:117
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