potri.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_MATH_LAPACK_CLAPACK_POTRI_H_
36 #define _BLAZE_MATH_LAPACK_CLAPACK_POTRI_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 spotri_( char* uplo, int* n, float* A, int* lda, int* info );
58 void dpotri_( char* uplo, int* n, double* A, int* lda, int* info );
59 void cpotri_( char* uplo, int* n, float* A, int* lda, int* info );
60 void zpotri_( char* uplo, int* n, double* A, int* lda, int* info );
61 
62 }
64 //*************************************************************************************************
65 
66 
67 
68 
69 namespace blaze {
70 
71 //=================================================================================================
72 //
73 // LAPACK LLH-BASED INVERSION FUNCTIONS (POTRI)
74 //
75 //=================================================================================================
76 
77 //*************************************************************************************************
80 inline void potri( char uplo, int n, float* A, int lda, int* info );
81 
82 inline void potri( char uplo, int n, double* A, int lda, int* info );
83 
84 inline void potri( char uplo, int n, complex<float>* A, int lda, int* info );
85 
86 inline void potri( char uplo, int n, complex<double>* A, int lda, int* info );
88 //*************************************************************************************************
89 
90 
91 //*************************************************************************************************
121 inline void potri( char uplo, int n, float* A, int lda, int* info )
122 {
123  spotri_( &uplo, &n, A, &lda, info );
124 }
125 //*************************************************************************************************
126 
127 
128 //*************************************************************************************************
158 inline void potri( char uplo, int n, double* A, int lda, int* info )
159 {
160  dpotri_( &uplo, &n, A, &lda, info );
161 }
162 //*************************************************************************************************
163 
164 
165 //*************************************************************************************************
195 inline void potri( char uplo, int n, complex<float>* A, int lda, int* info )
196 {
197  BLAZE_STATIC_ASSERT( sizeof( complex<float> ) == 2UL*sizeof( float ) );
198 
199  cpotri_( &uplo, &n, reinterpret_cast<float*>( A ), &lda, info );
200 }
201 //*************************************************************************************************
202 
203 
204 //*************************************************************************************************
234 inline void potri( char uplo, int n, complex<double>* A, int lda, int* info )
235 {
236  BLAZE_STATIC_ASSERT( sizeof( complex<double> ) == 2UL*sizeof( double ) );
237 
238  zpotri_( &uplo, &n, reinterpret_cast<double*>( A ), &lda, info );
239 }
240 //*************************************************************************************************
241 
242 } // namespace blaze
243 
244 #endif
Log level for high-level information.
Definition: LogLevel.h:80
void potri(char uplo, int n, float *A, int lda, int *info)
LAPACK kernel for the inversion of the given dense positive definite single precision column-major sq...
Definition: potri.h:121
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