Blaze  3.6
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 #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 chetrs_( char* uplo, int* n, int* nrhs, float* A, int* lda, int* ipiv,
60  float* B, int* ldb, int* info, blaze::fortran_charlen_t nuplo );
61 void zhetrs_( char* uplo, int* n, int* nrhs, double* A, int* lda, int* ipiv,
62  double* B, int* ldb, 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 SUBSTITUTION FUNCTIONS (HETRS)
77 //
78 //=================================================================================================
79 
80 //*************************************************************************************************
83 void hetrs( char uplo, int n, int nrhs, const complex<float>* A, int lda, const int* ipiv,
84  complex<float>* B, int ldb, int* info );
85 
86 void hetrs( char uplo, int n, int nrhs, const complex<double>* A, int lda, const int* ipiv,
87  complex<double>* B, int ldb, int* info );
89 //*************************************************************************************************
90 
91 
92 //*************************************************************************************************
126 inline void hetrs( char uplo, int n, int nrhs, const complex<float>* A, int lda,
127  const int* ipiv, complex<float>* B, int ldb, int* info )
128 {
129  BLAZE_STATIC_ASSERT( sizeof( complex<float> ) == 2UL*sizeof( float ) );
130 
131 #if defined(INTEL_MKL_VERSION)
132  BLAZE_STATIC_ASSERT( sizeof( MKL_INT ) == sizeof( int ) );
133  using ET = MKL_Complex8;
134 #else
135  using ET = float;
136 #endif
137 
138  chetrs_( &uplo, &n, &nrhs, const_cast<ET*>( reinterpret_cast<const ET*>( A ) ),
139  &lda, const_cast<int*>( ipiv ), reinterpret_cast<ET*>( B ), &ldb, info,
141 }
142 //*************************************************************************************************
143 
144 
145 //*************************************************************************************************
179 inline void hetrs( char uplo, int n, int nrhs, const complex<double>* A, int lda,
180  const int* ipiv, complex<double>* B, int ldb, int* info )
181 {
182  BLAZE_STATIC_ASSERT( sizeof( complex<double> ) == 2UL*sizeof( double ) );
183 
184 #if defined(INTEL_MKL_VERSION)
185  BLAZE_STATIC_ASSERT( sizeof( MKL_INT ) == sizeof( int ) );
186  using ET = MKL_Complex16;
187 #else
188  using ET = double;
189 #endif
190 
191  zhetrs_( &uplo, &n, &nrhs, const_cast<ET*>( reinterpret_cast<const ET*>( A ) ),
192  &lda, const_cast<int*>( ipiv ), reinterpret_cast<ET*>( B ), &ldb, info,
194 }
195 //*************************************************************************************************
196 
197 } // namespace blaze
198 
199 #endif
Header file for basic type definitions.
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:126
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.