Blaze  3.6
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 #include <blaze/util/Types.h>
46 
47 
48 //=================================================================================================
49 //
50 // LAPACK FORWARD DECLARATIONS
51 //
52 //=================================================================================================
53 
54 //*************************************************************************************************
56 #if !defined(BLAS_H)
57 extern "C" {
58 
59 void strsv_( char* uplo, char* trans, char* diag, int* n, float* A, int* lda,
60  float* x, int* incX, blaze::fortran_charlen_t nuplo,
62 void dtrsv_( char* uplo, char* trans, char* diag, int* n, double* A, int* lda,
63  double* x, int* incX, blaze::fortran_charlen_t nuplo,
65 void ctrsv_( char* uplo, char* trans, char* diag, int* n, float* A, int* lda,
66  float* x, int* incX, blaze::fortran_charlen_t nuplo,
68 void ztrsv_( char* uplo, char* trans, char* diag, int* n, double* A, int* lda,
69  double* x, int* incX, blaze::fortran_charlen_t nuplo,
71 
72 }
73 #endif
74 
75 //*************************************************************************************************
76 
77 
78 
79 
80 namespace blaze {
81 
82 //=================================================================================================
83 //
84 // LAPACK TRIANGULAR LINEAR SYSTEM FUNCTIONS (TRSV)
85 //
86 //=================================================================================================
87 
88 //*************************************************************************************************
91 void trsv( char uplo, char trans, char diag, int n, const float* A,
92  int lda, float* x, int incX );
93 
94 void trsv( char uplo, char trans, char diag, int n, const double* A,
95  int lda, double* x, int incX );
96 
97 void trsv( char uplo, char trans, char diag, int n, const complex<float>* A,
98  int lda, complex<float>* x, int incX );
99 
100 void trsv( char uplo, char trans, char diag, int n, const complex<double>* A,
101  int lda, complex<double>* x, int incX );
103 //*************************************************************************************************
104 
105 
106 //*************************************************************************************************
141 inline void trsv( char uplo, char trans, char diag, int n, const float* A,
142  int lda, float* x, int incX )
143 {
144  strsv_( &uplo, &trans, &diag, &n, const_cast<float*>( A ), &lda, x, &incX,
146 }
147 //*************************************************************************************************
148 
149 
150 //*************************************************************************************************
185 inline void trsv( char uplo, char trans, char diag, int n, const double* A,
186  int lda, double* x, int incX )
187 {
188  dtrsv_( &uplo, &trans, &diag, &n, const_cast<double*>( A ), &lda, x, &incX,
190 }
191 //*************************************************************************************************
192 
193 
194 //*************************************************************************************************
229 inline void trsv( char uplo, char trans, char diag, int n, const complex<float>* A,
230  int lda, complex<float>* x, int incX )
231 {
232  BLAZE_STATIC_ASSERT( sizeof( complex<float> ) == 2UL*sizeof( float ) );
233 
234  ctrsv_( &uplo, &trans, &diag, &n, const_cast<float*>( reinterpret_cast<const float*>( A ) ),
235  &lda, reinterpret_cast<float*>( x ), &incX, blaze::fortran_charlen_t(1),
237 }
238 //*************************************************************************************************
239 
240 
241 //*************************************************************************************************
276 inline void trsv( char uplo, char trans, char diag, int n, const complex<double>* A,
277  int lda, complex<double>* x, int incX )
278 {
279  BLAZE_STATIC_ASSERT( sizeof( complex<double> ) == 2UL*sizeof( double ) );
280 
281  ztrsv_( &uplo, &trans, &diag, &n, const_cast<double*>( reinterpret_cast<const double*>( A ) ),
282  &lda, reinterpret_cast<double*>( x ), &incX, blaze::fortran_charlen_t(1),
284 }
285 //*************************************************************************************************
286 
287 } // namespace blaze
288 
289 #endif
Header file for basic type definitions.
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:141
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
Size type of the Blaze library.