trsv.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_MATH_LAPACK_CLAPACK_TRSV_H_
36 #define _BLAZE_MATH_LAPACK_CLAPACK_TRSV_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 strsv_( char* uplo, char* trans, char* diag, int* n, float* A, int* lda, float* x, int* incX );
58 void dtrsv_( char* uplo, char* trans, char* diag, int* n, double* A, int* lda, double* x, int* incX );
59 void ctrsv_( char* uplo, char* trans, char* diag, int* n, float* A, int* lda, float* x, int* incX );
60 void ztrsv_( char* uplo, char* trans, char* diag, int* n, double* A, int* lda, double* x, int* incX );
61 
62 }
64 //*************************************************************************************************
65 
66 
67 
68 
69 namespace blaze {
70 
71 //=================================================================================================
72 //
73 // LAPACK TRIANGULAR LINEAR SYSTEM FUNCTIONS (TRSV)
74 //
75 //=================================================================================================
76 
77 //*************************************************************************************************
80 inline void trsv( char uplo, char trans, char diag, int n, const float* A,
81  int lda, float* x, int incX );
82 
83 inline void trsv( char uplo, char trans, char diag, int n, const double* A,
84  int lda, double* x, int incX );
85 
86 inline void trsv( char uplo, char trans, char diag, int n, const complex<float>* A,
87  int lda, complex<float>* x, int incX );
88 
89 inline void trsv( char uplo, char trans, char diag, int n, const complex<double>* A,
90  int lda, complex<double>* x, int incX );
92 //*************************************************************************************************
93 
94 
95 //*************************************************************************************************
129 inline void trsv( char uplo, char trans, char diag, int n, const float* A,
130  int lda, float* x, int incX )
131 {
132  strsv_( &uplo, &trans, &diag, &n, const_cast<float*>( A ), &lda, x, &incX );
133 }
134 //*************************************************************************************************
135 
136 
137 //*************************************************************************************************
171 inline void trsv( char uplo, char trans, char diag, int n, const double* A,
172  int lda, double* x, int incX )
173 {
174  dtrsv_( &uplo, &trans, &diag, &n, const_cast<double*>( A ), &lda, x, &incX );
175 }
176 //*************************************************************************************************
177 
178 
179 //*************************************************************************************************
213 inline void trsv( char uplo, char trans, char diag, int n, const complex<float>* A,
214  int lda, complex<float>* x, int incX )
215 {
216  BLAZE_STATIC_ASSERT( sizeof( complex<float> ) == 2UL*sizeof( float ) );
217 
218  ctrsv_( &uplo, &trans, &diag, &n, const_cast<float*>( reinterpret_cast<const float*>( A ) ),
219  &lda, reinterpret_cast<float*>( x ), &incX );
220 }
221 //*************************************************************************************************
222 
223 
224 //*************************************************************************************************
258 inline void trsv( char uplo, char trans, char diag, int n, const complex<double>* A,
259  int lda, complex<double>* x, int incX )
260 {
261  BLAZE_STATIC_ASSERT( sizeof( complex<double> ) == 2UL*sizeof( double ) );
262 
263  ztrsv_( &uplo, &trans, &diag, &n, const_cast<double*>( reinterpret_cast<const double*>( A ) ),
264  &lda, reinterpret_cast<double*>( x ), &incX );
265 }
266 //*************************************************************************************************
267 
268 } // namespace blaze
269 
270 #endif
void trsv(char uplo, char trans, char diag, int n, const float *A, int lda, float *x, int incX)
LAPACK kernel for solving a triangular single precision linear system of equations ( )...
Definition: trsv.h:129
Namespace of the Blaze C++ math library.
Definition: Blaze.h:57
Compile time assertion.
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