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 
46 
47 //=================================================================================================
48 //
49 // LAPACK FORWARD DECLARATIONS
50 //
51 //=================================================================================================
52 
53 //*************************************************************************************************
55 #if !defined(INTEL_MKL_VERSION)
56 extern "C" {
57 
58 void ssytrf_( char* uplo, int* n, float* A, int* lda, int* ipiv, float* work, int* lwork, int* info );
59 void dsytrf_( char* uplo, int* n, double* A, int* lda, int* ipiv, double* work, int* lwork, int* info );
60 void csytrf_( char* uplo, int* n, float* A, int* lda, int* ipiv, float* work, int* lwork, int* info );
61 void zsytrf_( char* uplo, int* n, double* A, int* lda, int* ipiv, double* work, int* lwork, int* info );
62 
63 }
64 #endif
65 
66 //*************************************************************************************************
67 
68 
69 
70 
71 namespace blaze {
72 
73 //=================================================================================================
74 //
75 // LAPACK LDLT DECOMPOSITION FUNCTIONS (SYTRF)
76 //
77 //=================================================================================================
78 
79 //*************************************************************************************************
82 inline void sytrf( char uplo, int n, float* A, int lda, int* ipiv,
83  float* work, int lwork, int* info );
84 
85 inline void sytrf( char uplo, int n, double* A, int lda, int* ipiv,
86  double* work, int lwork, int* info );
87 
88 inline void sytrf( char uplo, int n, complex<float>* A, int lda, int* ipiv,
89  complex<float>* work, int lwork, int* info );
90 
91 inline void sytrf( char uplo, int n, complex<double>* A, int lda, int* ipiv,
92  complex<double>* work, int lwork, int* info );
94 //*************************************************************************************************
95 
96 
97 //*************************************************************************************************
145 inline void sytrf( char uplo, int n, float* A, int lda, int* ipiv,
146  float* work, int lwork, int* info )
147 {
148 #if defined(INTEL_MKL_VERSION)
149  BLAZE_STATIC_ASSERT( sizeof( MKL_INT ) == sizeof( int ) );
150 #endif
151 
152  ssytrf_( &uplo, &n, A, &lda, ipiv, work, &lwork, info );
153 }
154 //*************************************************************************************************
155 
156 
157 //*************************************************************************************************
205 inline void sytrf( char uplo, int n, double* A, int lda, int* ipiv,
206  double* work, int lwork, int* info )
207 {
208 #if defined(INTEL_MKL_VERSION)
209  BLAZE_STATIC_ASSERT( sizeof( MKL_INT ) == sizeof( int ) );
210 #endif
211 
212  dsytrf_( &uplo, &n, A, &lda, ipiv, work, &lwork, info );
213 }
214 //*************************************************************************************************
215 
216 
217 //*************************************************************************************************
265 inline void sytrf( char uplo, int n, complex<float>* A, int lda, int* ipiv,
266  complex<float>* work, int lwork, int* info )
267 {
268  BLAZE_STATIC_ASSERT( sizeof( complex<float> ) == 2UL*sizeof( float ) );
269 
270 #if defined(INTEL_MKL_VERSION)
271  BLAZE_STATIC_ASSERT( sizeof( MKL_INT ) == sizeof( int ) );
272  using ET = MKL_Complex8;
273 #else
274  using ET = float;
275 #endif
276 
277  csytrf_( &uplo, &n, reinterpret_cast<ET*>( A ), &lda, ipiv,
278  reinterpret_cast<ET*>( work ), &lwork, info );
279 }
280 //*************************************************************************************************
281 
282 
283 //*************************************************************************************************
331 inline void sytrf( char uplo, int n, complex<double>* A, int lda, int* ipiv,
332  complex<double>* work, int lwork, int* info )
333 {
334  BLAZE_STATIC_ASSERT( sizeof( complex<double> ) == 2UL*sizeof( double ) );
335 
336 #if defined(INTEL_MKL_VERSION)
337  BLAZE_STATIC_ASSERT( sizeof( MKL_INT ) == sizeof( int ) );
338  using ET = MKL_Complex16;
339 #else
340  using ET = double;
341 #endif
342 
343  zsytrf_( &uplo, &n, reinterpret_cast<ET*>( A ), &lda, ipiv,
344  reinterpret_cast<ET*>( work ), &lwork, info );
345 }
346 //*************************************************************************************************
347 
348 } // namespace blaze
349 
350 #endif
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:145
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