hesv.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_MATH_LAPACK_CLAPACK_HESV_H_
36 #define _BLAZE_MATH_LAPACK_CLAPACK_HESV_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 chesv_( char* uplo, int* n, int* nrhs, float* A, int* lda, int* ipiv, float* b, int* ldb, float* work, int* lwork, int* info );
59 void zhesv_( char* uplo, int* n, int* nrhs, double* A, int* lda, int* ipiv, double* b, int* ldb, double* work, int* lwork, int* info );
60 
61 }
62 #endif
63 
64 //*************************************************************************************************
65 
66 
67 
68 
69 namespace blaze {
70 
71 //=================================================================================================
72 //
73 // LAPACK HERMITIAN INDEFINITE LINEAR SYSTEM FUNCTIONS (HESV)
74 //
75 //=================================================================================================
76 
77 //*************************************************************************************************
80 inline void hesv( char uplo, int n, int nrhs, complex<float>* A, int lda, int* ipiv,
81  complex<float>* B, int ldb, complex<float>* work, int lwork, int* info );
82 
83 inline void hesv( char uplo, int n, int nrhs, complex<double>* A, int lda, int* ipiv,
84  complex<double>* B, int ldb, complex<double>* work, int lwork, int* info );
86 //*************************************************************************************************
87 
88 
89 //*************************************************************************************************
138 inline void hesv( char uplo, int n, int nrhs, complex<float>* A, int lda, int* ipiv,
139  complex<float>* B, int ldb, complex<float>* work, int lwork, int* info )
140 {
141  BLAZE_STATIC_ASSERT( sizeof( complex<float> ) == 2UL*sizeof( float ) );
142 
143 #if defined(INTEL_MKL_VERSION)
144  BLAZE_STATIC_ASSERT( sizeof( MKL_INT ) == sizeof( int ) );
145  using ET = MKL_Complex8;
146 #else
147  using ET = float;
148 #endif
149 
150  chesv_( &uplo, &n, &nrhs, reinterpret_cast<ET*>( A ), &lda, ipiv,
151  reinterpret_cast<ET*>( B ), &ldb, reinterpret_cast<ET*>( work ), &lwork, info );
152 }
153 //*************************************************************************************************
154 
155 
156 //*************************************************************************************************
205 inline void hesv( char uplo, int n, int nrhs, complex<double>* A, int lda, int* ipiv,
206  complex<double>* B, int ldb, complex<double>* work, int lwork, int* info )
207 {
208  BLAZE_STATIC_ASSERT( sizeof( complex<double> ) == 2UL*sizeof( double ) );
209 
210 #if defined(INTEL_MKL_VERSION)
211  BLAZE_STATIC_ASSERT( sizeof( MKL_INT ) == sizeof( int ) );
212  using ET = MKL_Complex16;
213 #else
214  using ET = double;
215 #endif
216 
217  zhesv_( &uplo, &n, &nrhs, reinterpret_cast<ET*>( A ), &lda, ipiv,
218  reinterpret_cast<ET*>( B ), &ldb, reinterpret_cast<ET*>( work ), &lwork, info );
219 }
220 //*************************************************************************************************
221 
222 } // namespace blaze
223 
224 #endif
Namespace of the Blaze C++ math library.
Definition: Blaze.h:58
Compile time assertion.
void hesv(char uplo, int n, int nrhs, complex< float > *A, int lda, int *ipiv, complex< float > *B, int ldb, complex< float > *work, int lwork, int *info)
LAPACK kernel for solving a Hermitian indefinite single precision complex linear system of equations ...
Definition: hesv.h:138
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