gesv.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_MATH_LAPACK_CLAPACK_GESV_H_
36 #define _BLAZE_MATH_LAPACK_CLAPACK_GESV_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 sgesv_( int* n, int* nrhs, float* A, int* lda, int* ipiv, float* b, int* ldb, int* info );
58 void dgesv_( int* n, int* nrhs, double* A, int* lda, int* ipiv, double* b, int* ldb, int* info );
59 void cgesv_( int* n, int* nrhs, float* A, int* lda, int* ipiv, float* b, int* ldb, int* info );
60 void zgesv_( int* n, int* nrhs, double* A, int* lda, int* ipiv, double* b, int* ldb, int* info );
61 
62 }
64 //*************************************************************************************************
65 
66 
67 
68 
69 namespace blaze {
70 
71 //=================================================================================================
72 //
73 // LAPACK GENERAL LINEAR SYSTEM FUNCTIONS (GESV)
74 //
75 //=================================================================================================
76 
77 //*************************************************************************************************
80 inline void gesv( int n, int nrhs, float* A, int lda, int* ipiv, float* B, int ldb, int* info );
81 
82 inline void gesv( int n, int nrhs, double* A, int lda, int* ipiv, double* B, int ldb, int* info );
83 
84 inline void gesv( int n, int nrhs, complex<float>* A, int lda, int* ipiv, complex<float>* B, int ldb, int* info );
85 
86 inline void gesv( int n, int nrhs, complex<double>* A, int lda, int* ipiv, complex<double>* B, int ldb, int* info );
88 //*************************************************************************************************
89 
90 
91 //*************************************************************************************************
134 inline void gesv( int n, int nrhs, float* A, int lda, int* ipiv, float* B, int ldb, int* info )
135 {
136  sgesv_( &n, &nrhs, A, &lda, ipiv, B, &ldb, info );
137 }
138 //*************************************************************************************************
139 
140 
141 //*************************************************************************************************
184 inline void gesv( int n, int nrhs, double* A, int lda, int* ipiv, double* B, int ldb, int* info )
185 {
186  dgesv_( &n, &nrhs, A, &lda, ipiv, B, &ldb, info );
187 }
188 //*************************************************************************************************
189 
190 
191 //*************************************************************************************************
234 inline void gesv( int n, int nrhs, complex<float>* A, int lda, int* ipiv, complex<float>* B, int ldb, int* info )
235 {
236  BLAZE_STATIC_ASSERT( sizeof( complex<float> ) == 2UL*sizeof( float ) );
237 
238  cgesv_( &n, &nrhs, reinterpret_cast<float*>( A ), &lda, ipiv,
239  reinterpret_cast<float*>( B ), &ldb, info );
240 }
241 //*************************************************************************************************
242 
243 
244 //*************************************************************************************************
287 inline void gesv( int n, int nrhs, complex<double>* A, int lda, int* ipiv, complex<double>* B, int ldb, int* info )
288 {
289  BLAZE_STATIC_ASSERT( sizeof( complex<double> ) == 2UL*sizeof( double ) );
290 
291  zgesv_( &n, &nrhs, reinterpret_cast<double*>( A ), &lda, ipiv,
292  reinterpret_cast<double*>( B ), &ldb, info );
293 }
294 //*************************************************************************************************
295 
296 } // namespace blaze
297 
298 #endif
void gesv(int n, int nrhs, float *A, int lda, int *ipiv, float *B, int ldb, int *info)
LAPACK kernel for solving a general single precision linear system of equations ( )...
Definition: gesv.h:134
Namespace of the Blaze C++ math library.
Definition: Blaze.h:57
Compile time assertion.
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