sytri.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_MATH_LAPACK_CLAPACK_SYTRI_H_
36 #define _BLAZE_MATH_LAPACK_CLAPACK_SYTRI_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 ssytri_( char* uplo, int* n, float* A, int* lda, int* ipiv, float* work, int* info );
59 void dsytri_( char* uplo, int* n, double* A, int* lda, int* ipiv, double* work, int* info );
60 void csytri_( char* uplo, int* n, float* A, int* lda, int* ipiv, float* work, int* info );
61 void zsytri_( char* uplo, int* n, double* A, int* lda, int* ipiv, double* work, int* info );
62 
63 }
64 #endif
65 
66 //*************************************************************************************************
67 
68 
69 
70 
71 namespace blaze {
72 
73 //=================================================================================================
74 //
75 // LAPACK LDLT-BASED INVERSION FUNCTIONS (SYTRI)
76 //
77 //=================================================================================================
78 
79 //*************************************************************************************************
82 inline void sytri( char uplo, int n, float* A, int lda, const int* ipiv, float* work, int* info );
83 
84 inline void sytri( char uplo, int n, double* A, int lda, const int* ipiv, double* work, int* info );
85 
86 inline void sytri( char uplo, int n, complex<float>* A, int lda,
87  const int* ipiv, complex<float>* work, int* info );
88 
89 inline void sytri( char uplo, int n, complex<double>* A, int lda,
90  const int* ipiv, complex<double>* work, int* info );
92 //*************************************************************************************************
93 
94 
95 //*************************************************************************************************
127 inline void sytri( char uplo, int n, float* A, int lda, const int* ipiv, float* work, int* info )
128 {
129 #if defined(INTEL_MKL_VERSION)
130  BLAZE_STATIC_ASSERT( sizeof( MKL_INT ) == sizeof( int ) );
131 #endif
132 
133  ssytri_( &uplo, &n, A, &lda, const_cast<int*>( ipiv ), work, info );
134 }
135 //*************************************************************************************************
136 
137 
138 //*************************************************************************************************
170 inline void sytri( char uplo, int n, double* A, int lda, const int* ipiv, double* work, int* info )
171 {
172 #if defined(INTEL_MKL_VERSION)
173  BLAZE_STATIC_ASSERT( sizeof( MKL_INT ) == sizeof( int ) );
174 #endif
175 
176  dsytri_( &uplo, &n, A, &lda, const_cast<int*>( ipiv ), work, info );
177 }
178 //*************************************************************************************************
179 
180 
181 //*************************************************************************************************
213 inline void sytri( char uplo, int n, complex<float>* A, int lda,
214  const int* ipiv, complex<float>* work, int* info )
215 {
216  BLAZE_STATIC_ASSERT( sizeof( complex<float> ) == 2UL*sizeof( float ) );
217 
218 #if defined(INTEL_MKL_VERSION)
219  BLAZE_STATIC_ASSERT( sizeof( MKL_INT ) == sizeof( int ) );
220  using ET = MKL_Complex8;
221 #else
222  using ET = float;
223 #endif
224 
225  csytri_( &uplo, &n, reinterpret_cast<ET*>( A ), &lda,
226  const_cast<int*>( ipiv ), reinterpret_cast<ET*>( work ), info );
227 }
228 //*************************************************************************************************
229 
230 
231 //*************************************************************************************************
263 inline void sytri( char uplo, int n, complex<double>* A, int lda,
264  const int* ipiv, complex<double>* work, int* info )
265 {
266  BLAZE_STATIC_ASSERT( sizeof( complex<double> ) == 2UL*sizeof( double ) );
267 
268 #if defined(INTEL_MKL_VERSION)
269  BLAZE_STATIC_ASSERT( sizeof( MKL_INT ) == sizeof( int ) );
270  using ET = MKL_Complex16;
271 #else
272  using ET = double;
273 #endif
274 
275  zsytri_( &uplo, &n, reinterpret_cast<ET*>( A ), &lda,
276  const_cast<int*>( ipiv ), reinterpret_cast<ET*>( work ), info );
277 }
278 //*************************************************************************************************
279 
280 } // namespace blaze
281 
282 #endif
void sytri(char uplo, int n, float *A, int lda, const int *ipiv, float *work, int *info)
LAPACK kernel for the inversion of the given dense symmetric indefinite single precision column-major...
Definition: sytri.h:127
Namespace of the Blaze C++ math library.
Definition: Blaze.h:58
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