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 #if !defined(BLAS_H)
56 extern "C" {
57 
58 void strsv_( char* uplo, char* trans, char* diag, int* n, float* A, int* lda, float* x, int* incX );
59 void dtrsv_( char* uplo, char* trans, char* diag, int* n, double* A, int* lda, double* x, int* incX );
60 void ctrsv_( char* uplo, char* trans, char* diag, int* n, float* A, int* lda, float* x, int* incX );
61 void ztrsv_( char* uplo, char* trans, char* diag, int* n, double* A, int* lda, double* x, int* incX );
62 
63 }
64 #endif
65 
66 //*************************************************************************************************
67 
68 
69 
70 
71 namespace blaze {
72 
73 //=================================================================================================
74 //
75 // LAPACK TRIANGULAR LINEAR SYSTEM FUNCTIONS (TRSV)
76 //
77 //=================================================================================================
78 
79 //*************************************************************************************************
82 inline void trsv( char uplo, char trans, char diag, int n, const float* A,
83  int lda, float* x, int incX );
84 
85 inline void trsv( char uplo, char trans, char diag, int n, const double* A,
86  int lda, double* x, int incX );
87 
88 inline void trsv( char uplo, char trans, char diag, int n, const complex<float>* A,
89  int lda, complex<float>* x, int incX );
90 
91 inline void trsv( char uplo, char trans, char diag, int n, const complex<double>* A,
92  int lda, complex<double>* x, int incX );
94 //*************************************************************************************************
95 
96 
97 //*************************************************************************************************
132 inline void trsv( char uplo, char trans, char diag, int n, const float* A,
133  int lda, float* x, int incX )
134 {
135  strsv_( &uplo, &trans, &diag, &n, const_cast<float*>( A ), &lda, x, &incX );
136 }
137 //*************************************************************************************************
138 
139 
140 //*************************************************************************************************
175 inline void trsv( char uplo, char trans, char diag, int n, const double* A,
176  int lda, double* x, int incX )
177 {
178  dtrsv_( &uplo, &trans, &diag, &n, const_cast<double*>( A ), &lda, x, &incX );
179 }
180 //*************************************************************************************************
181 
182 
183 //*************************************************************************************************
218 inline void trsv( char uplo, char trans, char diag, int n, const complex<float>* A,
219  int lda, complex<float>* x, int incX )
220 {
221  BLAZE_STATIC_ASSERT( sizeof( complex<float> ) == 2UL*sizeof( float ) );
222 
223  ctrsv_( &uplo, &trans, &diag, &n, const_cast<float*>( reinterpret_cast<const float*>( A ) ),
224  &lda, reinterpret_cast<float*>( x ), &incX );
225 }
226 //*************************************************************************************************
227 
228 
229 //*************************************************************************************************
264 inline void trsv( char uplo, char trans, char diag, int n, const complex<double>* A,
265  int lda, complex<double>* x, int incX )
266 {
267  BLAZE_STATIC_ASSERT( sizeof( complex<double> ) == 2UL*sizeof( double ) );
268 
269  ztrsv_( &uplo, &trans, &diag, &n, const_cast<double*>( reinterpret_cast<const double*>( A ) ),
270  &lda, reinterpret_cast<double*>( x ), &incX );
271 }
272 //*************************************************************************************************
273 
274 } // namespace blaze
275 
276 #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:132
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:765
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