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 #if !defined(INTEL_MKL_VERSION)
56 extern "C" {
57 
58 void sposv_( char* uplo, int* n, int* nrhs, float* A, int* lda, float* b, int* ldb, int* info );
59 void dposv_( char* uplo, int* n, int* nrhs, double* A, int* lda, double* b, int* ldb, int* info );
60 void cposv_( char* uplo, int* n, int* nrhs, float* A, int* lda, float* b, int* ldb, int* info );
61 void zposv_( char* uplo, int* n, int* nrhs, double* A, int* lda, double* b, int* ldb, int* info );
62 
63 }
64 #endif
65 
66 //*************************************************************************************************
67 
68 
69 
70 
71 namespace blaze {
72 
73 //=================================================================================================
74 //
75 // LAPACK POSITIVE DEFINITE LINEAR SYSTEM FUNCTIONS (POSV)
76 //
77 //=================================================================================================
78 
79 //*************************************************************************************************
82 inline void posv( char uplo, int n, int nrhs, float* A, int lda, float* B, int ldb, int* info );
83 
84 inline void posv( char uplo, int n, int nrhs, double* A, int lda, double* B, int ldb, int* info );
85 
86 inline void posv( char uplo, int n, int nrhs, complex<float>* A, int lda, complex<float>* B, int ldb, int* info );
87 
88 inline void posv( char uplo, int n, int nrhs, complex<double>* A, int lda, complex<double>* B, int ldb, int* info );
90 //*************************************************************************************************
91 
92 
93 //*************************************************************************************************
138 inline void posv( char uplo, int n, int nrhs, float* A, int lda, float* B, int ldb, int* info )
139 {
140 #if defined(INTEL_MKL_VERSION)
141  BLAZE_STATIC_ASSERT( sizeof( MKL_INT ) == sizeof( int ) );
142 #endif
143 
144  sposv_( &uplo, &n, &nrhs, A, &lda, B, &ldb, info );
145 }
146 //*************************************************************************************************
147 
148 
149 //*************************************************************************************************
194 inline void posv( char uplo, int n, int nrhs, double* A, int lda, double* B, int ldb, int* info )
195 {
196 #if defined(INTEL_MKL_VERSION)
197  BLAZE_STATIC_ASSERT( sizeof( MKL_INT ) == sizeof( int ) );
198 #endif
199 
200  dposv_( &uplo, &n, &nrhs, A, &lda, B, &ldb, info );
201 }
202 //*************************************************************************************************
203 
204 
205 //*************************************************************************************************
250 inline void posv( char uplo, int n, int nrhs, complex<float>* A, int lda, complex<float>* B, int ldb, int* info )
251 {
252  BLAZE_STATIC_ASSERT( sizeof( complex<float> ) == 2UL*sizeof( float ) );
253 
254 #if defined(INTEL_MKL_VERSION)
255  BLAZE_STATIC_ASSERT( sizeof( MKL_INT ) == sizeof( int ) );
256  using ET = MKL_Complex8;
257 #else
258  using ET = float;
259 #endif
260 
261  cposv_( &uplo, &n, &nrhs, reinterpret_cast<ET*>( A ), &lda,
262  reinterpret_cast<ET*>( B ), &ldb, info );
263 }
264 //*************************************************************************************************
265 
266 
267 //*************************************************************************************************
312 inline void posv( char uplo, int n, int nrhs, complex<double>* A, int lda, complex<double>* B, int ldb, int* info )
313 {
314  BLAZE_STATIC_ASSERT( sizeof( complex<double> ) == 2UL*sizeof( double ) );
315 
316 #if defined(INTEL_MKL_VERSION)
317  BLAZE_STATIC_ASSERT( sizeof( MKL_INT ) == sizeof( int ) );
318  using ET = MKL_Complex16;
319 #else
320  using ET = double;
321 #endif
322 
323  zposv_( &uplo, &n, &nrhs, reinterpret_cast<ET*>( A ), &lda,
324  reinterpret_cast<ET*>( B ), &ldb, info );
325 }
326 //*************************************************************************************************
327 
328 } // namespace blaze
329 
330 #endif
Namespace of the Blaze C++ math library.
Definition: Blaze.h:58
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:138
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