Blaze  3.6
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 #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 chetri_( char* uplo, int* n, float* A, int* lda, int* ipiv, float* work,
60  int* info, blaze::fortran_charlen_t nuplo );
61 void zhetri_( char* uplo, int* n, double* A, int* lda, int* ipiv, double* work,
62  int* info, blaze::fortran_charlen_t nuplo );
63 
64 }
65 #endif
66 
67 //*************************************************************************************************
68 
69 
70 
71 
72 namespace blaze {
73 
74 //=================================================================================================
75 //
76 // LAPACK LDLH-BASED INVERSION FUNCTIONS (HETRI)
77 //
78 //=================================================================================================
79 
80 //*************************************************************************************************
83 void hetri( char uplo, int n, complex<float>* A, int lda,
84  const int* ipiv, complex<float>* work, int* info );
85 
86 void hetri( char uplo, int n, complex<double>* A, int lda,
87  const int* ipiv, complex<double>* work, int* info );
89 //*************************************************************************************************
90 
91 
92 //*************************************************************************************************
124 inline void hetri( char uplo, int n, complex<float>* A, int lda,
125  const int* ipiv, complex<float>* work, int* info )
126 {
127  BLAZE_STATIC_ASSERT( sizeof( complex<float> ) == 2UL*sizeof( float ) );
128 
129 #if defined(INTEL_MKL_VERSION)
130  BLAZE_STATIC_ASSERT( sizeof( MKL_INT ) == sizeof( int ) );
131  using ET = MKL_Complex8;
132 #else
133  using ET = float;
134 #endif
135 
136  chetri_( &uplo, &n, reinterpret_cast<ET*>( A ), &lda, const_cast<int*>( ipiv ),
137  reinterpret_cast<ET*>( work ), info, blaze::fortran_charlen_t(1) );
138 }
139 //*************************************************************************************************
140 
141 
142 //*************************************************************************************************
174 inline void hetri( char uplo, int n, complex<double>* A, int lda,
175  const int* ipiv, complex<double>* work, int* info )
176 {
177  BLAZE_STATIC_ASSERT( sizeof( complex<double> ) == 2UL*sizeof( double ) );
178 
179 #if defined(INTEL_MKL_VERSION)
180  BLAZE_STATIC_ASSERT( sizeof( MKL_INT ) == sizeof( int ) );
181  using ET = MKL_Complex16;
182 #else
183  using ET = double;
184 #endif
185 
186  zhetri_( &uplo, &n, reinterpret_cast<ET*>( A ), &lda, const_cast<int*>( ipiv ),
187  reinterpret_cast<ET*>( work ), info, blaze::fortran_charlen_t(1) );
188 }
189 //*************************************************************************************************
190 
191 } // namespace blaze
192 
193 #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:124
Header file for basic type definitions.
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.