Blaze  3.6
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 #include <blaze/util/Types.h>
46 
47 
48 //=================================================================================================
49 //
50 // LAPACK FORWARD DECLARATIONS
51 //
52 //=================================================================================================
53 
54 //*************************************************************************************************
56 #if !defined(INTEL_MKL_VERSION)
57 extern "C" {
58 
59 void ssytri_( char* uplo, int* n, float* A, int* lda, int* ipiv, float* work,
60  int* info, blaze::fortran_charlen_t nuplo );
61 void dsytri_( char* uplo, int* n, double* A, int* lda, int* ipiv, double* work,
62  int* info, blaze::fortran_charlen_t nuplo );
63 void csytri_( char* uplo, int* n, float* A, int* lda, int* ipiv, float* work,
64  int* info, blaze::fortran_charlen_t nuplo );
65 void zsytri_( char* uplo, int* n, double* A, int* lda, int* ipiv, double* work,
66  int* info, blaze::fortran_charlen_t nuplo );
67 
68 }
69 #endif
70 
71 //*************************************************************************************************
72 
73 
74 
75 
76 namespace blaze {
77 
78 //=================================================================================================
79 //
80 // LAPACK LDLT-BASED INVERSION FUNCTIONS (SYTRI)
81 //
82 //=================================================================================================
83 
84 //*************************************************************************************************
87 void sytri( char uplo, int n, float* A, int lda, const int* ipiv, float* work, int* info );
88 
89 void sytri( char uplo, int n, double* A, int lda, const int* ipiv, double* work, int* info );
90 
91 void sytri( char uplo, int n, complex<float>* A, int lda,
92  const int* ipiv, complex<float>* work, int* info );
93 
94 void sytri( char uplo, int n, complex<double>* A, int lda,
95  const int* ipiv, complex<double>* work, int* info );
97 //*************************************************************************************************
98 
99 
100 //*************************************************************************************************
132 inline void sytri( char uplo, int n, float* A, int lda, const int* ipiv, float* work, int* info )
133 {
134 #if defined(INTEL_MKL_VERSION)
135  BLAZE_STATIC_ASSERT( sizeof( MKL_INT ) == sizeof( int ) );
136 #endif
137 
138  ssytri_( &uplo, &n, A, &lda, const_cast<int*>( ipiv ), work, info, blaze::fortran_charlen_t(1) );
139 }
140 //*************************************************************************************************
141 
142 
143 //*************************************************************************************************
175 inline void sytri( char uplo, int n, double* A, int lda, const int* ipiv, double* work, int* info )
176 {
177 #if defined(INTEL_MKL_VERSION)
178  BLAZE_STATIC_ASSERT( sizeof( MKL_INT ) == sizeof( int ) );
179 #endif
180 
181  dsytri_( &uplo, &n, A, &lda, const_cast<int*>( ipiv ), work, info, blaze::fortran_charlen_t(1) );
182 }
183 //*************************************************************************************************
184 
185 
186 //*************************************************************************************************
218 inline void sytri( char uplo, int n, complex<float>* A, int lda,
219  const int* ipiv, complex<float>* work, int* info )
220 {
221  BLAZE_STATIC_ASSERT( sizeof( complex<float> ) == 2UL*sizeof( float ) );
222 
223 #if defined(INTEL_MKL_VERSION)
224  BLAZE_STATIC_ASSERT( sizeof( MKL_INT ) == sizeof( int ) );
225  using ET = MKL_Complex8;
226 #else
227  using ET = float;
228 #endif
229 
230  csytri_( &uplo, &n, reinterpret_cast<ET*>( A ), &lda,
231  const_cast<int*>( ipiv ), reinterpret_cast<ET*>( work ),
232  info, blaze::fortran_charlen_t(1) );
233 }
234 //*************************************************************************************************
235 
236 
237 //*************************************************************************************************
269 inline void sytri( char uplo, int n, complex<double>* A, int lda,
270  const int* ipiv, complex<double>* work, int* info )
271 {
272  BLAZE_STATIC_ASSERT( sizeof( complex<double> ) == 2UL*sizeof( double ) );
273 
274 #if defined(INTEL_MKL_VERSION)
275  BLAZE_STATIC_ASSERT( sizeof( MKL_INT ) == sizeof( int ) );
276  using ET = MKL_Complex16;
277 #else
278  using ET = double;
279 #endif
280 
281  zsytri_( &uplo, &n, reinterpret_cast<ET*>( A ), &lda,
282  const_cast<int*>( ipiv ), reinterpret_cast<ET*>( work ),
283  info, blaze::fortran_charlen_t(1) );
284 }
285 //*************************************************************************************************
286 
287 } // namespace blaze
288 
289 #endif
Header file for basic type definitions.
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:132
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
Size type of the Blaze library.