hetri.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_MATH_LAPACK_CLAPACK_HETRI_H_
36 #define _BLAZE_MATH_LAPACK_CLAPACK_HETRI_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 chetri_( char* uplo, int* n, float* A, int* lda, int* ipiv, float* work, int* info );
59 void zhetri_( char* uplo, int* n, double* A, int* lda, int* ipiv, double* work, int* info );
60 
61 }
62 #endif
63 
64 //*************************************************************************************************
65 
66 
67 
68 
69 namespace blaze {
70 
71 //=================================================================================================
72 //
73 // LAPACK LDLH-BASED INVERSION FUNCTIONS (HETRI)
74 //
75 //=================================================================================================
76 
77 //*************************************************************************************************
80 inline void hetri( char uplo, int n, complex<float>* A, int lda,
81  const int* ipiv, complex<float>* work, int* info );
82 
83 inline void hetri( char uplo, int n, complex<double>* A, int lda,
84  const int* ipiv, complex<double>* work, int* info );
86 //*************************************************************************************************
87 
88 
89 //*************************************************************************************************
121 inline void hetri( char uplo, int n, complex<float>* A, int lda,
122  const int* ipiv, complex<float>* work, int* info )
123 {
124  BLAZE_STATIC_ASSERT( sizeof( complex<float> ) == 2UL*sizeof( float ) );
125 
126 #if defined(INTEL_MKL_VERSION)
127  BLAZE_STATIC_ASSERT( sizeof( MKL_INT ) == sizeof( int ) );
128  using ET = MKL_Complex8;
129 #else
130  using ET = float;
131 #endif
132 
133  chetri_( &uplo, &n, reinterpret_cast<ET*>( A ), &lda,
134  const_cast<int*>( ipiv ), reinterpret_cast<ET*>( work ), info );
135 }
136 //*************************************************************************************************
137 
138 
139 //*************************************************************************************************
171 inline void hetri( char uplo, int n, complex<double>* A, int lda,
172  const int* ipiv, complex<double>* work, int* info )
173 {
174  BLAZE_STATIC_ASSERT( sizeof( complex<double> ) == 2UL*sizeof( double ) );
175 
176 #if defined(INTEL_MKL_VERSION)
177  BLAZE_STATIC_ASSERT( sizeof( MKL_INT ) == sizeof( int ) );
178  using ET = MKL_Complex16;
179 #else
180  using ET = double;
181 #endif
182 
183  zhetri_( &uplo, &n, reinterpret_cast<ET*>( A ), &lda,
184  const_cast<int*>( ipiv ), reinterpret_cast<ET*>( work ), info );
185 }
186 //*************************************************************************************************
187 
188 } // namespace blaze
189 
190 #endif
void hetri(char uplo, int n, complex< float > *A, int lda, const int *ipiv, complex< float > *work, int *info)
LAPACK kernel for the inversion of the given dense Hermitian indefinite single precision complex colu...
Definition: hetri.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