sytrs.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_MATH_LAPACK_CLAPACK_SYTRS_H_
36 #define _BLAZE_MATH_LAPACK_CLAPACK_SYTRS_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 ssytrs_( char* uplo, int* n, int* nrhs, float* A, int* lda, int* ipiv, float* B, int* ldb, int* info );
59 void dsytrs_( char* uplo, int* n, int* nrhs, double* A, int* lda, int* ipiv, double* B, int* ldb, int* info );
60 void csytrs_( char* uplo, int* n, int* nrhs, float* A, int* lda, int* ipiv, float* B, int* ldb, int* info );
61 void zsytrs_( char* uplo, int* n, int* nrhs, double* A, int* lda, int* ipiv, double* B, int* ldb, int* info );
62 
63 }
64 #endif
65 
66 //*************************************************************************************************
67 
68 
69 
70 
71 namespace blaze {
72 
73 //=================================================================================================
74 //
75 // LAPACK LDLT-BASED SUBSTITUTION FUNCTIONS (SYTRS)
76 //
77 //=================================================================================================
78 
79 //*************************************************************************************************
82 inline void sytrs( char uplo, int n, int nrhs, const float* A, int lda, const int* ipiv,
83  float* B, int ldb, int* info );
84 
85 inline void sytrs( char uplo, int n, int nrhs, const double* A, int lda, const int* ipiv,
86  double* B, int ldb, int* info );
87 
88 inline void sytrs( char uplo, int n, int nrhs, const complex<float>* A, int lda, const int* ipiv,
89  complex<float>* B, int ldb, int* info );
90 
91 inline void sytrs( char uplo, int n, int nrhs, const complex<double>* A, int lda, const int* ipiv,
92  complex<double>* B, int ldb, int* info );
94 //*************************************************************************************************
95 
96 
97 //*************************************************************************************************
131 inline void sytrs( char uplo, int n, int nrhs, const float* A, int lda, const int* ipiv,
132  float* B, int ldb, int* info )
133 {
134 #if defined(INTEL_MKL_VERSION)
135  BLAZE_STATIC_ASSERT( sizeof( MKL_INT ) == sizeof( int ) );
136 #endif
137 
138  ssytrs_( &uplo, &n, &nrhs, const_cast<float*>( A ), &lda,
139  const_cast<int*>( ipiv ), B, &ldb, info );
140 }
141 //*************************************************************************************************
142 
143 
144 //*************************************************************************************************
178 inline void sytrs( char uplo, int n, int nrhs, const double* A, int lda, const int* ipiv,
179  double* B, int ldb, int* info )
180 {
181 #if defined(INTEL_MKL_VERSION)
182  BLAZE_STATIC_ASSERT( sizeof( MKL_INT ) == sizeof( int ) );
183 #endif
184 
185  dsytrs_( &uplo, &n, &nrhs, const_cast<double*>( A ), &lda,
186  const_cast<int*>( ipiv ), B, &ldb, info );
187 }
188 //*************************************************************************************************
189 
190 
191 //*************************************************************************************************
225 inline void sytrs( char uplo, int n, int nrhs, const complex<float>* A, int lda,
226  const int* ipiv, complex<float>* B, int ldb, int* info )
227 {
228  BLAZE_STATIC_ASSERT( sizeof( complex<float> ) == 2UL*sizeof( float ) );
229 
230 #if defined(INTEL_MKL_VERSION)
231  BLAZE_STATIC_ASSERT( sizeof( MKL_INT ) == sizeof( int ) );
232  using ET = MKL_Complex8;
233 #else
234  using ET = float;
235 #endif
236 
237  csytrs_( &uplo, &n, &nrhs, const_cast<ET*>( reinterpret_cast<const ET*>( A ) ),
238  &lda, const_cast<int*>( ipiv ), reinterpret_cast<ET*>( B ), &ldb, info );
239 }
240 //*************************************************************************************************
241 
242 
243 //*************************************************************************************************
277 inline void sytrs( char uplo, int n, int nrhs, const complex<double>* A, int lda,
278  const int* ipiv, complex<double>* B, int ldb, int* info )
279 {
280  BLAZE_STATIC_ASSERT( sizeof( complex<double> ) == 2UL*sizeof( double ) );
281 
282 #if defined(INTEL_MKL_VERSION)
283  BLAZE_STATIC_ASSERT( sizeof( MKL_INT ) == sizeof( int ) );
284  using ET = MKL_Complex16;
285 #else
286  using ET = double;
287 #endif
288 
289  zsytrs_( &uplo, &n, &nrhs, const_cast<ET*>( reinterpret_cast<const ET*>( A ) ),
290  &lda, const_cast<int*>( ipiv ), reinterpret_cast<ET*>( B ), &ldb, info );
291 }
292 //*************************************************************************************************
293 
294 } // namespace blaze
295 
296 #endif
Namespace of the Blaze C++ math library.
Definition: Blaze.h:58
Compile time assertion.
void sytrs(char uplo, int n, int nrhs, const float *A, int lda, const int *ipiv, float *B, int ldb, int *info)
LAPACK kernel for the substitution step of solving a symmetric indefinite single precision linear sys...
Definition: sytrs.h:131
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