posv.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_MATH_LAPACK_CLAPACK_POSV_H_
36 #define _BLAZE_MATH_LAPACK_CLAPACK_POSV_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 sposv_( char* uplo, int* n, int* nrhs, float* A, int* lda, float* b, int* ldb, int* info );
58 void dposv_( char* uplo, int* n, int* nrhs, double* A, int* lda, double* b, int* ldb, int* info );
59 void cposv_( char* uplo, int* n, int* nrhs, float* A, int* lda, float* b, int* ldb, int* info );
60 void zposv_( char* uplo, int* n, int* nrhs, double* A, int* lda, double* b, int* ldb, int* info );
61 
62 }
64 //*************************************************************************************************
65 
66 
67 
68 
69 namespace blaze {
70 
71 //=================================================================================================
72 //
73 // LAPACK POSITIVE DEFINITE LINEAR SYSTEM FUNCTIONS (POSV)
74 //
75 //=================================================================================================
76 
77 //*************************************************************************************************
80 inline void posv( char uplo, int n, int nrhs, float* A, int lda, float* B, int ldb, int* info );
81 
82 inline void posv( char uplo, int n, int nrhs, double* A, int lda, double* B, int ldb, int* info );
83 
84 inline void posv( char uplo, int n, int nrhs, complex<float>* A, int lda, complex<float>* B, int ldb, int* info );
85 
86 inline void posv( char uplo, int n, int nrhs, complex<double>* A, int lda, complex<double>* B, int ldb, int* info );
88 //*************************************************************************************************
89 
90 
91 //*************************************************************************************************
136 inline void posv( char uplo, int n, int nrhs, float* A, int lda, float* B, int ldb, int* info )
137 {
138  sposv_( &uplo, &n, &nrhs, A, &lda, B, &ldb, info );
139 }
140 //*************************************************************************************************
141 
142 
143 //*************************************************************************************************
188 inline void posv( char uplo, int n, int nrhs, double* A, int lda, double* B, int ldb, int* info )
189 {
190  dposv_( &uplo, &n, &nrhs, A, &lda, B, &ldb, info );
191 }
192 //*************************************************************************************************
193 
194 
195 //*************************************************************************************************
240 inline void posv( char uplo, int n, int nrhs, complex<float>* A, int lda, complex<float>* B, int ldb, int* info )
241 {
242  BLAZE_STATIC_ASSERT( sizeof( complex<float> ) == 2UL*sizeof( float ) );
243 
244  cposv_( &uplo, &n, &nrhs, reinterpret_cast<float*>( A ), &lda,
245  reinterpret_cast<float*>( B ), &ldb, info );
246 }
247 //*************************************************************************************************
248 
249 
250 //*************************************************************************************************
295 inline void posv( char uplo, int n, int nrhs, complex<double>* A, int lda, complex<double>* B, int ldb, int* info )
296 {
297  BLAZE_STATIC_ASSERT( sizeof( complex<double> ) == 2UL*sizeof( double ) );
298 
299  zposv_( &uplo, &n, &nrhs, reinterpret_cast<double*>( A ), &lda,
300  reinterpret_cast<double*>( B ), &ldb, info );
301 }
302 //*************************************************************************************************
303 
304 } // namespace blaze
305 
306 #endif
Namespace of the Blaze C++ math library.
Definition: Blaze.h:57
Compile time assertion.
void posv(char uplo, int n, int nrhs, float *A, int lda, float *B, int ldb, int *info)
LAPACK kernel for solving a positive definite single precision linear system of equations ( )...
Definition: posv.h:136
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