potrs.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_MATH_LAPACK_CLAPACK_POTRS_H_
36 #define _BLAZE_MATH_LAPACK_CLAPACK_POTRS_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 spotrs_( char* uplo, int* n, int* nrhs, float* A, int* lda, float* B, int* ldb, int* info );
58 void dpotrs_( char* uplo, int* n, int* nrhs, double* A, int* lda, double* B, int* ldb, int* info );
59 void cpotrs_( char* uplo, int* n, int* nrhs, float* A, int* lda, float* B, int* ldb, int* info );
60 void zpotrs_( char* uplo, int* n, int* nrhs, double* A, int* lda, double* B, int* ldb, int* info );
61 
62 }
64 //*************************************************************************************************
65 
66 
67 
68 
69 namespace blaze {
70 
71 //=================================================================================================
72 //
73 // LAPACK LLH-BASED SUBSTITUTION FUNCTIONS (POTRS)
74 //
75 //=================================================================================================
76 
77 //*************************************************************************************************
80 inline void potrs( char uplo, int n, int nrhs, const float* A, int lda, float* B, int ldb, int* info );
81 
82 inline void potrs( char uplo, int n, int nrhs, const double* A, int lda, double* B, int ldb, int* info );
83 
84 inline void potrs( char uplo, int n, int nrhs, const complex<float>* A, int lda, complex<float>* B, int ldb, int* info );
85 
86 inline void potrs( char uplo, int n, int nrhs, const complex<double>* A, int lda, complex<double>* B, int ldb, int* info );
88 //*************************************************************************************************
89 
90 
91 //*************************************************************************************************
123 inline void potrs( char uplo, int n, int nrhs, const float* A, int lda, float* B, int ldb, int* info )
124 {
125  spotrs_( &uplo, &n, &nrhs, const_cast<float*>( A ), &lda, B, &ldb, info );
126 }
127 //*************************************************************************************************
128 
129 
130 //*************************************************************************************************
162 inline void potrs( char uplo, int n, int nrhs, const double* A, int lda, double* B, int ldb, int* info )
163 {
164  dpotrs_( &uplo, &n, &nrhs, const_cast<double*>( A ), &lda, B, &ldb, info );
165 }
166 //*************************************************************************************************
167 
168 
169 //*************************************************************************************************
201 inline void potrs( char uplo, int n, int nrhs, const complex<float>* A,
202  int lda, complex<float>* B, int ldb, int* info )
203 {
204  BLAZE_STATIC_ASSERT( sizeof( complex<float> ) == 2UL*sizeof( float ) );
205 
206  cpotrs_( &uplo, &n, &nrhs, const_cast<float*>( reinterpret_cast<const float*>( A ) ),
207  &lda, reinterpret_cast<float*>( B ), &ldb, info );
208 }
209 //*************************************************************************************************
210 
211 
212 //*************************************************************************************************
244 inline void potrs( char uplo, int n, int nrhs, const complex<double>* A,
245  int lda, complex<double>* B, int ldb, int* info )
246 {
247  BLAZE_STATIC_ASSERT( sizeof( complex<double> ) == 2UL*sizeof( double ) );
248 
249  zpotrs_( &uplo, &n, &nrhs, const_cast<double*>( reinterpret_cast<const double*>( A ) ),
250  &lda, reinterpret_cast<double*>( B ), &ldb, info );
251 }
252 //*************************************************************************************************
253 
254 } // namespace blaze
255 
256 #endif
Log level for high-level information.
Definition: LogLevel.h:80
void potrs(char uplo, int n, int nrhs, const float *A, int lda, float *B, int ldb, int *info)
LAPACK kernel for the substitution step of solving a positive definite single precision linear system...
Definition: potrs.h:123
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