hetrs.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_MATH_LAPACK_CLAPACK_HETRS_H_
36 #define _BLAZE_MATH_LAPACK_CLAPACK_HETRS_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 chetrs_( char* uplo, int* n, int* nrhs, float* A, int* lda, int* ipiv, float* B, int* ldb, int* info );
59 void zhetrs_( char* uplo, int* n, int* nrhs, double* A, int* lda, int* ipiv, double* B, int* ldb, int* info );
60 
61 }
62 #endif
63 
64 //*************************************************************************************************
65 
66 
67 
68 
69 namespace blaze {
70 
71 //=================================================================================================
72 //
73 // LAPACK LDLH-BASED SUBSTITUTION FUNCTIONS (HETRS)
74 //
75 //=================================================================================================
76 
77 //*************************************************************************************************
80 inline void hetrs( char uplo, int n, int nrhs, const complex<float>* A, int lda, const int* ipiv,
81  complex<float>* B, int ldb, int* info );
82 
83 inline void hetrs( char uplo, int n, int nrhs, const complex<double>* A, int lda, const int* ipiv,
84  complex<double>* B, int ldb, int* info );
86 //*************************************************************************************************
87 
88 
89 //*************************************************************************************************
123 inline void hetrs( char uplo, int n, int nrhs, const complex<float>* A, int lda,
124  const int* ipiv, complex<float>* B, int ldb, int* info )
125 {
126  BLAZE_STATIC_ASSERT( sizeof( complex<float> ) == 2UL*sizeof( float ) );
127 
128 #if defined(INTEL_MKL_VERSION)
129  BLAZE_STATIC_ASSERT( sizeof( MKL_INT ) == sizeof( int ) );
130  using ET = MKL_Complex8;
131 #else
132  using ET = float;
133 #endif
134 
135  chetrs_( &uplo, &n, &nrhs, const_cast<ET*>( reinterpret_cast<const ET*>( A ) ),
136  &lda, const_cast<int*>( ipiv ), reinterpret_cast<ET*>( B ), &ldb, info );
137 }
138 //*************************************************************************************************
139 
140 
141 //*************************************************************************************************
175 inline void hetrs( char uplo, int n, int nrhs, const complex<double>* A, int lda,
176  const int* ipiv, complex<double>* B, int ldb, int* info )
177 {
178  BLAZE_STATIC_ASSERT( sizeof( complex<double> ) == 2UL*sizeof( double ) );
179 
180 #if defined(INTEL_MKL_VERSION)
181  BLAZE_STATIC_ASSERT( sizeof( MKL_INT ) == sizeof( int ) );
182  using ET = MKL_Complex16;
183 #else
184  using ET = double;
185 #endif
186 
187  zhetrs_( &uplo, &n, &nrhs, const_cast<ET*>( reinterpret_cast<const ET*>( A ) ),
188  &lda, const_cast<int*>( ipiv ), reinterpret_cast<ET*>( B ), &ldb, info );
189 }
190 //*************************************************************************************************
191 
192 } // namespace blaze
193 
194 #endif
void hetrs(char uplo, int n, int nrhs, const complex< float > *A, int lda, const int *ipiv, complex< float > *B, int ldb, int *info)
LAPACK kernel for the substitution step of solving a symmetric indefinite single precision complex li...
Definition: hetrs.h:123
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