getrf.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_MATH_LAPACK_CLAPACK_GETRF_H_
36 #define _BLAZE_MATH_LAPACK_CLAPACK_GETRF_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 sgetrf_( int* m, int* n, float* A, int* lda, int* ipiv, int* info );
58 void dgetrf_( int* m, int* n, double* A, int* lda, int* ipiv, int* info );
59 void cgetrf_( int* m, int* n, float* A, int* lda, int* ipiv, int* info );
60 void zgetrf_( int* m, int* n, double* A, int* lda, int* ipiv, int* info );
61 
62 }
64 //*************************************************************************************************
65 
66 
67 
68 
69 namespace blaze {
70 
71 //=================================================================================================
72 //
73 // LAPACK LU DECOMPOSITION FUNCTIONS (GETRF)
74 //
75 //=================================================================================================
76 
77 //*************************************************************************************************
80 inline void getrf( int m, int n, float* A, int lda, int* ipiv, int* info );
81 
82 inline void getrf( int m, int n, double* A, int lda, int* ipiv, int* info );
83 
84 inline void getrf( int m, int n, complex<float>* A, int lda, int* ipiv, int* info );
85 
86 inline void getrf( int m, int n, complex<double>* A, int lda, int* ipiv, int* info );
88 //*************************************************************************************************
89 
90 
91 //*************************************************************************************************
129 inline void getrf( int m, int n, float* A, int lda, int* ipiv, int* info )
130 {
131  sgetrf_( &m, &n, A, &lda, ipiv, info );
132 }
133 //*************************************************************************************************
134 
135 
136 //*************************************************************************************************
174 inline void getrf( int m, int n, double* A, int lda, int* ipiv, int* info )
175 {
176  dgetrf_( &m, &n, A, &lda, ipiv, info );
177 }
178 //*************************************************************************************************
179 
180 
181 //*************************************************************************************************
219 inline void getrf( int m, int n, complex<float>* A, int lda, int* ipiv, int* info )
220 {
221  BLAZE_STATIC_ASSERT( sizeof( complex<float> ) == 2UL*sizeof( float ) );
222 
223  cgetrf_( &m, &n, reinterpret_cast<float*>( A ), &lda, ipiv, info );
224 }
225 //*************************************************************************************************
226 
227 
228 //*************************************************************************************************
266 inline void getrf( int m, int n, complex<double>* A, int lda, int* ipiv, int* info )
267 {
268  BLAZE_STATIC_ASSERT( sizeof( complex<double> ) == 2UL*sizeof( double ) );
269 
270  zgetrf_( &m, &n, reinterpret_cast<double*>( A ), &lda, ipiv, info );
271 }
272 //*************************************************************************************************
273 
274 } // namespace blaze
275 
276 #endif
Namespace of the Blaze C++ math library.
Definition: Blaze.h:57
Compile time assertion.
void getrf(int m, int n, float *A, int lda, int *ipiv, int *info)
LAPACK kernel for the LU decomposition of the given dense general single precision column-major matri...
Definition: getrf.h:129
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