Blaze  3.6
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 #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 chetrf_( char* uplo, int* n, float* A, int* lda, int* ipiv, float* work, int* lwork,
60  int* info, blaze::fortran_charlen_t nuplo );
61 void zhetrf_( char* uplo, int* n, double* A, int* lda, int* ipiv, double* work, int* lwork,
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 DECOMPOSITION FUNCTIONS (HETRF)
77 //
78 //=================================================================================================
79 
80 //*************************************************************************************************
83 void hetrf( char uplo, int n, complex<float>* A, int lda, int* ipiv,
84  complex<float>* work, int lwork, int* info );
85 
86 void hetrf( char uplo, int n, complex<double>* A, int lda, int* ipiv,
87  complex<double>* work, int lwork, int* info );
89 //*************************************************************************************************
90 
91 
92 //*************************************************************************************************
140 inline void hetrf( char uplo, int n, complex<float>* A, int lda, int* ipiv,
141  complex<float>* work, int lwork, int* info )
142 {
143  BLAZE_STATIC_ASSERT( sizeof( complex<float> ) == 2UL*sizeof( float ) );
144 
145 #if defined(INTEL_MKL_VERSION)
146  BLAZE_STATIC_ASSERT( sizeof( MKL_INT ) == sizeof( int ) );
147  using ET = MKL_Complex8;
148 #else
149  using ET = float;
150 #endif
151 
152  chetrf_( &uplo, &n, reinterpret_cast<ET*>( A ), &lda, ipiv,
153  reinterpret_cast<ET*>( work ), &lwork, info, blaze::fortran_charlen_t(1) );
154 }
155 //*************************************************************************************************
156 
157 
158 //*************************************************************************************************
206 inline void hetrf( char uplo, int n, complex<double>* A, int lda, int* ipiv,
207  complex<double>* work, int lwork, int* info )
208 {
209  BLAZE_STATIC_ASSERT( sizeof( complex<double> ) == 2UL*sizeof( double ) );
210 
211 #if defined(INTEL_MKL_VERSION)
212  BLAZE_STATIC_ASSERT( sizeof( MKL_INT ) == sizeof( int ) );
213  using ET = MKL_Complex16;
214 #else
215  using ET = double;
216 #endif
217 
218  zhetrf_( &uplo, &n, reinterpret_cast<ET*>( A ), &lda, ipiv,
219  reinterpret_cast<ET*>( work ), &lwork, info, blaze::fortran_charlen_t(1) );
220 }
221 //*************************************************************************************************
222 
223 } // namespace blaze
224 
225 #endif
Header file for basic type definitions.
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:140
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.