getrs.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_MATH_LAPACK_CLAPACK_GETRS_H_
36 #define _BLAZE_MATH_LAPACK_CLAPACK_GETRS_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 sgetrs_( char* trans, int* n, int* nrhs, float* A, int* lda, int* ipiv, float* B, int* ldb, int* info );
58 void dgetrs_( char* trans, int* n, int* nrhs, double* A, int* lda, int* ipiv, double* B, int* ldb, int* info );
59 void cgetrs_( char* trans, int* n, int* nrhs, float* A, int* lda, int* ipiv, float* B, int* ldb, int* info );
60 void zgetrs_( char* trans, int* n, int* nrhs, double* A, int* lda, int* ipiv, double* B, int* ldb, int* info );
61 
62 }
64 //*************************************************************************************************
65 
66 
67 
68 
69 namespace blaze {
70 
71 //=================================================================================================
72 //
73 // LAPACK LU-BASED SUBSTITUTION FUNCTIONS (GETRS)
74 //
75 //=================================================================================================
76 
77 //*************************************************************************************************
80 inline void getrs( char trans, int n, int nrhs, const float* A, int lda, const int* ipiv,
81  float* B, int ldb, int* info );
82 
83 inline void getrs( char trans, int n, int nrhs, const double* A, int lda, const int* ipiv,
84  double* B, int ldb, int* info );
85 
86 inline void getrs( char trans, int n, int nrhs, const complex<float>* A, int lda,
87  const int* ipiv, complex<float>* B, int ldb, int* info );
88 
89 inline void getrs( char trans, int n, int nrhs, const complex<double>* A, int lda,
90  const int* ipiv, complex<double>* B, int ldb, int* info );
92 //*************************************************************************************************
93 
94 
95 //*************************************************************************************************
133 inline void getrs( char trans, int n, int nrhs, const float* A, int lda,
134  const int* ipiv, float* B, int ldb, int* info )
135 {
136  sgetrs_( &trans, &n, &nrhs, const_cast<float*>( A ), &lda,
137  const_cast<int*>( ipiv ), B, &ldb, info );
138 }
139 //*************************************************************************************************
140 
141 
142 //*************************************************************************************************
180 inline void getrs( char trans, int n, int nrhs, const double* A, int lda,
181  const int* ipiv, double* B, int ldb, int* info )
182 {
183  dgetrs_( &trans, &n, &nrhs, const_cast<double*>( A ), &lda,
184  const_cast<int*>( ipiv ), B, &ldb, info );
185 }
186 //*************************************************************************************************
187 
188 
189 //*************************************************************************************************
227 inline void getrs( char trans, int n, int nrhs, const complex<float>* A, int lda,
228  const int* ipiv, complex<float>* B, int ldb, int* info )
229 {
230  BLAZE_STATIC_ASSERT( sizeof( complex<float> ) == 2UL*sizeof( float ) );
231 
232  cgetrs_( &trans, &n, &nrhs, const_cast<float*>( reinterpret_cast<const float*>( A ) ),
233  &lda, const_cast<int*>( ipiv ), reinterpret_cast<float*>( B ), &ldb, info );
234 }
235 //*************************************************************************************************
236 
237 
238 //*************************************************************************************************
276 inline void getrs( char trans, int n, int nrhs, const complex<double>* A, int lda,
277  const int* ipiv, complex<double>* B, int ldb, int* info )
278 {
279  BLAZE_STATIC_ASSERT( sizeof( complex<double> ) == 2UL*sizeof( double ) );
280 
281  zgetrs_( &trans, &n, &nrhs, const_cast<double*>( reinterpret_cast<const double*>( A ) ),
282  &lda, const_cast<int*>( ipiv ), reinterpret_cast<double*>( B ), &ldb, info );
283 }
284 //*************************************************************************************************
285 
286 } // namespace blaze
287 
288 #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.
void getrs(char trans, 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 general single precision linear system of equati...
Definition: getrs.h:133
const DMatTransExpr< MT,!SO > trans(const DenseMatrix< MT, SO > &dm)
Calculation of the transpose of the given dense matrix.
Definition: DMatTransExpr.h:950
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