trtrs.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_MATH_LAPACK_CLAPACK_TRTRS_H_
36 #define _BLAZE_MATH_LAPACK_CLAPACK_TRTRS_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 strtrs_( char* uplo, char* trans, char* diag, int* n, int* nrhs, float* A, int* lda, float* B, int* ldb, int* info );
58 void dtrtrs_( char* uplo, char* trans, char* diag, int* n, int* nrhs, double* A, int* lda, double* B, int* ldb, int* info );
59 void ctrtrs_( char* uplo, char* trans, char* diag, int* n, int* nrhs, float* A, int* lda, float* B, int* ldb, int* info );
60 void ztrtrs_( char* uplo, char* trans, char* diag, 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 TRIANGULAR SUBSTITUTION FUNCTIONS (TRTRS)
74 //
75 //=================================================================================================
76 
77 //*************************************************************************************************
80 inline void trtrs( char uplo, char trans, char diag, int n, int nrhs, const float* A,
81  int lda, float* B, int ldb, int* info );
82 
83 inline void trtrs( char uplo, char trans, char diag, int n, int nrhs, const double* A,
84  int lda, double* B, int ldb, int* info );
85 
86 inline void trtrs( char uplo, char trans, char diag, int n, int nrhs, const complex<float>* A,
87  int lda, complex<float>* B, int ldb, int* info );
88 
89 inline void trtrs( char uplo, char trans, char diag, int n, int nrhs, const complex<double>* A,
90  int lda, complex<double>* B, int ldb, int* info );
92 //*************************************************************************************************
93 
94 
95 //*************************************************************************************************
133 inline void trtrs( char uplo, char trans, char diag, int n, int nrhs, const float* A, int lda,
134  float* B, int ldb, int* info )
135 {
136  strtrs_( &uplo, &trans, &diag, &n, &nrhs, const_cast<float*>( A ), &lda, B, &ldb, info );
137 }
138 //*************************************************************************************************
139 
140 
141 //*************************************************************************************************
179 inline void trtrs( char uplo, char trans, char diag, int n, int nrhs, const double* A, int lda,
180  double* B, int ldb, int* info )
181 {
182  dtrtrs_( &uplo, &trans, &diag, &n, &nrhs, const_cast<double*>( A ), &lda, B, &ldb, info );
183 }
184 //*************************************************************************************************
185 
186 
187 //*************************************************************************************************
225 inline void trtrs( char uplo, char trans, char diag, int n, int nrhs, const complex<float>* A,
226  int lda, complex<float>* B, int ldb, int* info )
227 {
228  BLAZE_STATIC_ASSERT( sizeof( complex<float> ) == 2UL*sizeof( float ) );
229 
230  ctrtrs_( &uplo, &trans, &diag, &n, &nrhs, const_cast<float*>( reinterpret_cast<const float*>( A ) ),
231  &lda, reinterpret_cast<float*>( B ), &ldb, info );
232 }
233 //*************************************************************************************************
234 
235 
236 //*************************************************************************************************
274 inline void trtrs( char uplo, char trans, char diag, int n, int nrhs, const complex<double>* A,
275  int lda, complex<double>* B, int ldb, int* info )
276 {
277  BLAZE_STATIC_ASSERT( sizeof( complex<double> ) == 2UL*sizeof( double ) );
278 
279  ztrtrs_( &uplo, &trans, &diag, &n, &nrhs, const_cast<double*>( reinterpret_cast<const double*>( A ) ),
280  &lda, reinterpret_cast<double*>( B ), &ldb, info );
281 }
282 //*************************************************************************************************
283 
284 } // namespace blaze
285 
286 #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 trtrs(char uplo, char trans, char diag, int n, int nrhs, const float *A, int lda, float *B, int ldb, int *info)
LAPACK kernel for the substitution step of solving a triangular single precision linear system of equ...
Definition: trtrs.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