sysv.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_MATH_LAPACK_CLAPACK_SYSV_H_
36 #define _BLAZE_MATH_LAPACK_CLAPACK_SYSV_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 extern "C" {
56 
57 void ssysv_( char* uplo, int* n, int* nrhs, float* A, int* lda, int* ipiv, float* b, int* ldb, float* work, int* lwork, int* info );
58 void dsysv_( char* uplo, int* n, int* nrhs, double* A, int* lda, int* ipiv, double* b, int* ldb, double* work, int* lwork, int* info );
59 void csysv_( char* uplo, int* n, int* nrhs, float* A, int* lda, int* ipiv, float* b, int* ldb, float* work, int* lwork, int* info );
60 void zsysv_( char* uplo, int* n, int* nrhs, double* A, int* lda, int* ipiv, double* b, int* ldb, double* work, int* lwork, int* info );
61 
62 }
64 //*************************************************************************************************
65 
66 
67 
68 
69 namespace blaze {
70 
71 //=================================================================================================
72 //
73 // LAPACK SYMMETRIC INDEFINITE LINEAR SYSTEM FUNCTIONS (SYSV)
74 //
75 //=================================================================================================
76 
77 //*************************************************************************************************
80 inline void sysv( char uplo, int n, int nrhs, float* A, int lda, int* ipiv,
81  float* B, int ldb, float* work, int lwork, int* info );
82 
83 inline void sysv( char uplo, int n, int nrhs, double* A, int lda, int* ipiv,
84  double* B, int ldb, double* work, int lwork, int* info );
85 
86 inline void sysv( char uplo, int n, int nrhs, complex<float>* A, int lda, int* ipiv,
87  complex<float>* B, int ldb, complex<float>* work, int lwork, int* info );
88 
89 inline void sysv( char uplo, int n, int nrhs, complex<double>* A, int lda, int* ipiv,
90  complex<double>* B, int ldb, complex<double>* work, int lwork, int* info );
92 //*************************************************************************************************
93 
94 
95 //*************************************************************************************************
143 inline void sysv( char uplo, int n, int nrhs, float* A, int lda, int* ipiv,
144  float* B, int ldb, float* work, int lwork, int* info )
145 {
146  ssysv_( &uplo, &n, &nrhs, A, &lda, ipiv, B, &ldb, work, &lwork, info );
147 }
148 //*************************************************************************************************
149 
150 
151 //*************************************************************************************************
199 inline void sysv( char uplo, int n, int nrhs, double* A, int lda, int* ipiv,
200  double* B, int ldb, double* work, int lwork, int* info )
201 {
202  dsysv_( &uplo, &n, &nrhs, A, &lda, ipiv, B, &ldb, work, &lwork, info );
203 }
204 //*************************************************************************************************
205 
206 
207 //*************************************************************************************************
255 inline void sysv( char uplo, int n, int nrhs, complex<float>* A, int lda, int* ipiv,
256  complex<float>* B, int ldb, complex<float>* work, int lwork, int* info )
257 {
258  BLAZE_STATIC_ASSERT( sizeof( complex<float> ) == 2UL*sizeof( float ) );
259 
260  csysv_( &uplo, &n, &nrhs, reinterpret_cast<float*>( A ), &lda, ipiv,
261  reinterpret_cast<float*>( B ), &ldb, reinterpret_cast<float*>( work ), &lwork, info );
262 }
263 //*************************************************************************************************
264 
265 
266 //*************************************************************************************************
314 inline void sysv( char uplo, int n, int nrhs, complex<double>* A, int lda, int* ipiv,
315  complex<double>* B, int ldb, complex<double>* work, int lwork, int* info )
316 {
317  BLAZE_STATIC_ASSERT( sizeof( complex<double> ) == 2UL*sizeof( double ) );
318 
319  zsysv_( &uplo, &n, &nrhs, reinterpret_cast<double*>( A ), &lda, ipiv,
320  reinterpret_cast<double*>( B ), &ldb, reinterpret_cast<double*>( work ), &lwork, info );
321 }
322 //*************************************************************************************************
323 
324 } // namespace blaze
325 
326 #endif
Log level for high-level information.
Definition: LogLevel.h:80
Namespace of the Blaze C++ math library.
Definition: Blaze.h:57
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
void sysv(char uplo, int n, int nrhs, float *A, int lda, int *ipiv, float *B, int ldb, float *work, int lwork, int *info)
LAPACK kernel for solving a symmetric indefinite single precision linear system of equations ( )...
Definition: sysv.h:143