Blaze  3.6
sytrf.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_MATH_LAPACK_CLAPACK_SYTRF_H_
36 #define _BLAZE_MATH_LAPACK_CLAPACK_SYTRF_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 ssytrf_( char* uplo, int* n, float* A, int* lda, int* ipiv, float* work,
60  int* lwork, int* info, blaze::fortran_charlen_t nuplo );
61 void dsytrf_( char* uplo, int* n, double* A, int* lda, int* ipiv, double* work,
62  int* lwork, int* info, blaze::fortran_charlen_t nuplo );
63 void csytrf_( char* uplo, int* n, float* A, int* lda, int* ipiv, float* work,
64  int* lwork, int* info, blaze::fortran_charlen_t nuplo );
65 void zsytrf_( char* uplo, int* n, double* A, int* lda, int* ipiv, double* work,
66  int* lwork, 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 DECOMPOSITION FUNCTIONS (SYTRF)
81 //
82 //=================================================================================================
83 
84 //*************************************************************************************************
87 void sytrf( char uplo, int n, float* A, int lda, int* ipiv,
88  float* work, int lwork, int* info );
89 
90 void sytrf( char uplo, int n, double* A, int lda, int* ipiv,
91  double* work, int lwork, int* info );
92 
93 void sytrf( char uplo, int n, complex<float>* A, int lda, int* ipiv,
94  complex<float>* work, int lwork, int* info );
95 
96 void sytrf( char uplo, int n, complex<double>* A, int lda, int* ipiv,
97  complex<double>* work, int lwork, int* info );
99 //*************************************************************************************************
100 
101 
102 //*************************************************************************************************
150 inline void sytrf( char uplo, int n, float* A, int lda, int* ipiv,
151  float* work, int lwork, int* info )
152 {
153 #if defined(INTEL_MKL_VERSION)
154  BLAZE_STATIC_ASSERT( sizeof( MKL_INT ) == sizeof( int ) );
155 #endif
156 
157  ssytrf_( &uplo, &n, A, &lda, ipiv, work, &lwork, info, blaze::fortran_charlen_t(1) );
158 }
159 //*************************************************************************************************
160 
161 
162 //*************************************************************************************************
210 inline void sytrf( char uplo, int n, double* A, int lda, int* ipiv,
211  double* work, int lwork, int* info )
212 {
213 #if defined(INTEL_MKL_VERSION)
214  BLAZE_STATIC_ASSERT( sizeof( MKL_INT ) == sizeof( int ) );
215 #endif
216 
217  dsytrf_( &uplo, &n, A, &lda, ipiv, work, &lwork, info, blaze::fortran_charlen_t(1) );
218 }
219 //*************************************************************************************************
220 
221 
222 //*************************************************************************************************
270 inline void sytrf( char uplo, int n, complex<float>* A, int lda, int* ipiv,
271  complex<float>* work, int lwork, int* info )
272 {
273  BLAZE_STATIC_ASSERT( sizeof( complex<float> ) == 2UL*sizeof( float ) );
274 
275 #if defined(INTEL_MKL_VERSION)
276  BLAZE_STATIC_ASSERT( sizeof( MKL_INT ) == sizeof( int ) );
277  using ET = MKL_Complex8;
278 #else
279  using ET = float;
280 #endif
281 
282  csytrf_( &uplo, &n, reinterpret_cast<ET*>( A ), &lda, ipiv,
283  reinterpret_cast<ET*>( work ), &lwork, info, blaze::fortran_charlen_t(1) );
284 }
285 //*************************************************************************************************
286 
287 
288 //*************************************************************************************************
336 inline void sytrf( char uplo, int n, complex<double>* A, int lda, int* ipiv,
337  complex<double>* work, int lwork, int* info )
338 {
339  BLAZE_STATIC_ASSERT( sizeof( complex<double> ) == 2UL*sizeof( double ) );
340 
341 #if defined(INTEL_MKL_VERSION)
342  BLAZE_STATIC_ASSERT( sizeof( MKL_INT ) == sizeof( int ) );
343  using ET = MKL_Complex16;
344 #else
345  using ET = double;
346 #endif
347 
348  zsytrf_( &uplo, &n, reinterpret_cast<ET*>( A ), &lda, ipiv,
349  reinterpret_cast<ET*>( work ), &lwork, info, blaze::fortran_charlen_t(1) );
350 }
351 //*************************************************************************************************
352 
353 } // namespace blaze
354 
355 #endif
Header file for basic type definitions.
void sytrf(char uplo, int n, float *A, int lda, int *ipiv, float *work, int lwork, int *info)
LAPACK kernel for the decomposition of the given dense symmetric indefinite single precision column-m...
Definition: sytrf.h:150
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.