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 //*************************************************************************************************
128 inline void getrf( int m, int n, float* A, int lda, int* ipiv, int* info )
129 {
130  sgetrf_( &m, &n, A, &lda, ipiv, info );
131 }
132 //*************************************************************************************************
133 
134 
135 //*************************************************************************************************
172 inline void getrf( int m, int n, double* A, int lda, int* ipiv, int* info )
173 {
174  dgetrf_( &m, &n, A, &lda, ipiv, info );
175 }
176 //*************************************************************************************************
177 
178 
179 //*************************************************************************************************
216 inline void getrf( int m, int n, complex<float>* A, int lda, int* ipiv, int* info )
217 {
218  BLAZE_STATIC_ASSERT( sizeof( complex<float> ) == 2UL*sizeof( float ) );
219 
220  cgetrf_( &m, &n, reinterpret_cast<float*>( A ), &lda, ipiv, info );
221 }
222 //*************************************************************************************************
223 
224 
225 //*************************************************************************************************
262 inline void getrf( int m, int n, complex<double>* A, int lda, int* ipiv, int* info )
263 {
264  BLAZE_STATIC_ASSERT( sizeof( complex<double> ) == 2UL*sizeof( double ) );
265 
266  zgetrf_( &m, &n, reinterpret_cast<double*>( A ), &lda, ipiv, info );
267 }
268 //*************************************************************************************************
269 
270 } // namespace blaze
271 
272 #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 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:128
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