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 //*************************************************************************************************
135 inline void posv( char uplo, int n, int nrhs, float* A, int lda, float* B, int ldb, int* info )
136 {
137  sposv_( &uplo, &n, &nrhs, A, &lda, B, &ldb, info );
138 }
139 //*************************************************************************************************
140 
141 
142 //*************************************************************************************************
186 inline void posv( char uplo, int n, int nrhs, double* A, int lda, double* B, int ldb, int* info )
187 {
188  dposv_( &uplo, &n, &nrhs, A, &lda, B, &ldb, info );
189 }
190 //*************************************************************************************************
191 
192 
193 //*************************************************************************************************
237 inline void posv( char uplo, int n, int nrhs, complex<float>* A, int lda, complex<float>* B, int ldb, int* info )
238 {
239  BLAZE_STATIC_ASSERT( sizeof( complex<float> ) == 2UL*sizeof( float ) );
240 
241  cposv_( &uplo, &n, &nrhs, reinterpret_cast<float*>( A ), &lda,
242  reinterpret_cast<float*>( B ), &ldb, info );
243 }
244 //*************************************************************************************************
245 
246 
247 //*************************************************************************************************
291 inline void posv( char uplo, int n, int nrhs, complex<double>* A, int lda, complex<double>* B, int ldb, int* info )
292 {
293  BLAZE_STATIC_ASSERT( sizeof( complex<double> ) == 2UL*sizeof( double ) );
294 
295  zposv_( &uplo, &n, &nrhs, reinterpret_cast<double*>( A ), &lda,
296  reinterpret_cast<double*>( B ), &ldb, info );
297 }
298 //*************************************************************************************************
299 
300 } // namespace blaze
301 
302 #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 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:135
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