hetrf.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_MATH_LAPACK_CLAPACK_HETRF_H_
36 #define _BLAZE_MATH_LAPACK_CLAPACK_HETRF_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 chetrf_( char* uplo, int* n, float* A, int* lda, int* ipiv, float* work, int* lwork, int* info );
59 void zhetrf_( char* uplo, int* n, double* A, int* lda, int* ipiv, double* work, int* lwork, int* info );
60 
61 }
62 #endif
63 
64 //*************************************************************************************************
65 
66 
67 
68 
69 namespace blaze {
70 
71 //=================================================================================================
72 //
73 // LAPACK LDLH DECOMPOSITION FUNCTIONS (HETRF)
74 //
75 //=================================================================================================
76 
77 //*************************************************************************************************
80 inline void hetrf( char uplo, int n, complex<float>* A, int lda, int* ipiv,
81  complex<float>* work, int lwork, int* info );
82 
83 inline void hetrf( char uplo, int n, complex<double>* A, int lda, int* ipiv,
84  complex<double>* work, int lwork, int* info );
86 //*************************************************************************************************
87 
88 
89 //*************************************************************************************************
137 inline void hetrf( char uplo, int n, complex<float>* A, int lda, int* ipiv,
138  complex<float>* work, int lwork, int* info )
139 {
140  BLAZE_STATIC_ASSERT( sizeof( complex<float> ) == 2UL*sizeof( float ) );
141 
142 #if defined(INTEL_MKL_VERSION)
143  BLAZE_STATIC_ASSERT( sizeof( MKL_INT ) == sizeof( int ) );
144  using ET = MKL_Complex8;
145 #else
146  using ET = float;
147 #endif
148 
149  chetrf_( &uplo, &n, reinterpret_cast<ET*>( A ), &lda, ipiv,
150  reinterpret_cast<ET*>( work ), &lwork, info );
151 }
152 //*************************************************************************************************
153 
154 
155 //*************************************************************************************************
203 inline void hetrf( char uplo, int n, complex<double>* A, int lda, int* ipiv,
204  complex<double>* work, int lwork, int* info )
205 {
206  BLAZE_STATIC_ASSERT( sizeof( complex<double> ) == 2UL*sizeof( double ) );
207 
208 #if defined(INTEL_MKL_VERSION)
209  BLAZE_STATIC_ASSERT( sizeof( MKL_INT ) == sizeof( int ) );
210  using ET = MKL_Complex16;
211 #else
212  using ET = double;
213 #endif
214 
215  zhetrf_( &uplo, &n, reinterpret_cast<ET*>( A ), &lda, ipiv,
216  reinterpret_cast<ET*>( work ), &lwork, info );
217 }
218 //*************************************************************************************************
219 
220 } // namespace blaze
221 
222 #endif
void hetrf(char uplo, int n, complex< float > *A, int lda, int *ipiv, complex< float > *work, int lwork, int *info)
LAPACK kernel for the decomposition of the given dense Hermitian indefinite single precision complex ...
Definition: hetrf.h:137
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