Blaze  3.6
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 #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 ssytrs_( 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 dsytrs_( 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 void csytrs_( char* uplo, int* n, int* nrhs, float* A, int* lda, int* ipiv,
64  float* B, int* ldb, int* info, blaze::fortran_charlen_t nuplo );
65 void zsytrs_( char* uplo, int* n, int* nrhs, double* A, int* lda, int* ipiv,
66  double* B, int* ldb, int* info, blaze::fortran_charlen_t nuplo );
67 
68 }
69 #endif
70 
71 //*************************************************************************************************
72 
73 
74 
75 
76 namespace blaze {
77 
78 //=================================================================================================
79 //
80 // LAPACK LDLT-BASED SUBSTITUTION FUNCTIONS (SYTRS)
81 //
82 //=================================================================================================
83 
84 //*************************************************************************************************
87 void sytrs( char uplo, int n, int nrhs, const float* A, int lda, const int* ipiv,
88  float* B, int ldb, int* info );
89 
90 void sytrs( char uplo, int n, int nrhs, const double* A, int lda, const int* ipiv,
91  double* B, int ldb, int* info );
92 
93 void sytrs( char uplo, int n, int nrhs, const complex<float>* A, int lda, const int* ipiv,
94  complex<float>* B, int ldb, int* info );
95 
96 void sytrs( char uplo, int n, int nrhs, const complex<double>* A, int lda, const int* ipiv,
97  complex<double>* B, int ldb, int* info );
99 //*************************************************************************************************
100 
101 
102 //*************************************************************************************************
136 inline void sytrs( char uplo, int n, int nrhs, const float* A, int lda, const int* ipiv,
137  float* B, int ldb, int* info )
138 {
139 #if defined(INTEL_MKL_VERSION)
140  BLAZE_STATIC_ASSERT( sizeof( MKL_INT ) == sizeof( int ) );
141 #endif
142 
143  ssytrs_( &uplo, &n, &nrhs, const_cast<float*>( A ), &lda,
144  const_cast<int*>( ipiv ), B, &ldb, info, blaze::fortran_charlen_t(1) );
145 }
146 //*************************************************************************************************
147 
148 
149 //*************************************************************************************************
183 inline void sytrs( char uplo, int n, int nrhs, const double* A, int lda, const int* ipiv,
184  double* B, int ldb, int* info )
185 {
186 #if defined(INTEL_MKL_VERSION)
187  BLAZE_STATIC_ASSERT( sizeof( MKL_INT ) == sizeof( int ) );
188 #endif
189 
190  dsytrs_( &uplo, &n, &nrhs, const_cast<double*>( A ), &lda,
191  const_cast<int*>( ipiv ), B, &ldb, info, blaze::fortran_charlen_t(1) );
192 }
193 //*************************************************************************************************
194 
195 
196 //*************************************************************************************************
230 inline void sytrs( char uplo, int n, int nrhs, const complex<float>* A, int lda,
231  const int* ipiv, complex<float>* B, int ldb, int* info )
232 {
233  BLAZE_STATIC_ASSERT( sizeof( complex<float> ) == 2UL*sizeof( float ) );
234 
235 #if defined(INTEL_MKL_VERSION)
236  BLAZE_STATIC_ASSERT( sizeof( MKL_INT ) == sizeof( int ) );
237  using ET = MKL_Complex8;
238 #else
239  using ET = float;
240 #endif
241 
242  csytrs_( &uplo, &n, &nrhs, const_cast<ET*>( reinterpret_cast<const ET*>( A ) ),
243  &lda, const_cast<int*>( ipiv ), reinterpret_cast<ET*>( B ), &ldb, info,
245 }
246 //*************************************************************************************************
247 
248 
249 //*************************************************************************************************
283 inline void sytrs( char uplo, int n, int nrhs, const complex<double>* A, int lda,
284  const int* ipiv, complex<double>* B, int ldb, int* info )
285 {
286  BLAZE_STATIC_ASSERT( sizeof( complex<double> ) == 2UL*sizeof( double ) );
287 
288 #if defined(INTEL_MKL_VERSION)
289  BLAZE_STATIC_ASSERT( sizeof( MKL_INT ) == sizeof( int ) );
290  using ET = MKL_Complex16;
291 #else
292  using ET = double;
293 #endif
294 
295  zsytrs_( &uplo, &n, &nrhs, const_cast<ET*>( reinterpret_cast<const ET*>( A ) ),
296  &lda, const_cast<int*>( ipiv ), reinterpret_cast<ET*>( B ), &ldb, info,
298 }
299 //*************************************************************************************************
300 
301 } // namespace blaze
302 
303 #endif
Header file for basic type definitions.
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:136
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.