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 //*************************************************************************************************
130 inline void trsv( char uplo, char trans, char diag, int n, const float* A,
131  int lda, float* x, int incX )
132 {
133  strsv_( &uplo, &trans, &diag, &n, const_cast<float*>( A ), &lda, x, &incX );
134 }
135 //*************************************************************************************************
136 
137 
138 //*************************************************************************************************
173 inline void trsv( char uplo, char trans, char diag, int n, const double* A,
174  int lda, double* x, int incX )
175 {
176  dtrsv_( &uplo, &trans, &diag, &n, const_cast<double*>( A ), &lda, x, &incX );
177 }
178 //*************************************************************************************************
179 
180 
181 //*************************************************************************************************
216 inline void trsv( char uplo, char trans, char diag, int n, const complex<float>* A,
217  int lda, complex<float>* x, int incX )
218 {
219  BLAZE_STATIC_ASSERT( sizeof( complex<float> ) == 2UL*sizeof( float ) );
220 
221  ctrsv_( &uplo, &trans, &diag, &n, const_cast<float*>( reinterpret_cast<const float*>( A ) ),
222  &lda, reinterpret_cast<float*>( x ), &incX );
223 }
224 //*************************************************************************************************
225 
226 
227 //*************************************************************************************************
262 inline void trsv( char uplo, char trans, char diag, int n, const complex<double>* A,
263  int lda, complex<double>* x, int incX )
264 {
265  BLAZE_STATIC_ASSERT( sizeof( complex<double> ) == 2UL*sizeof( double ) );
266 
267  ztrsv_( &uplo, &trans, &diag, &n, const_cast<double*>( reinterpret_cast<const double*>( A ) ),
268  &lda, reinterpret_cast<double*>( x ), &incX );
269 }
270 //*************************************************************************************************
271 
272 } // namespace blaze
273 
274 #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:130
Namespace of the Blaze C++ math library.
Definition: Blaze.h:58
Compile time assertion.
decltype(auto) trans(const DenseMatrix< MT, SO > &dm)
Calculation of the transpose of the given dense matrix.
Definition: DMatTransExpr.h:789
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