Blaze 3.9
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
44#include <blaze/util/Complex.h>
46#include <blaze/util/Types.h>
47
48
49//=================================================================================================
50//
51// LAPACK FORWARD DECLARATIONS
52//
53//=================================================================================================
54
55//*************************************************************************************************
57#if !defined(BLAS_H)
58extern "C" {
59
60void strsv_( char* uplo, char* trans, char* diag, blaze::blas_int_t* n, float* A,
61 blaze::blas_int_t* lda, float* x, blaze::blas_int_t* incX,
64void dtrsv_( char* uplo, char* trans, char* diag, blaze::blas_int_t* n, double* A,
65 blaze::blas_int_t* lda, double* x, blaze::blas_int_t* incX,
68void ctrsv_( char* uplo, char* trans, char* diag, blaze::blas_int_t* n, float* A,
69 blaze::blas_int_t* lda, float* x, blaze::blas_int_t* incX,
72void ztrsv_( char* uplo, char* trans, char* diag, blaze::blas_int_t* n, double* A,
73 blaze::blas_int_t* lda, double* x, blaze::blas_int_t* incX,
76
77}
78#endif
80//*************************************************************************************************
81
82
83
84
85namespace blaze {
86
87//=================================================================================================
88//
89// LAPACK TRIANGULAR LINEAR SYSTEM FUNCTIONS (TRSV)
90//
91//=================================================================================================
92
93//*************************************************************************************************
96void trsv( char uplo, char trans, char diag, blas_int_t n, const float* A,
97 blas_int_t lda, float* x, blas_int_t incX );
98
99void trsv( char uplo, char trans, char diag, blas_int_t n, const double* A,
100 blas_int_t lda, double* x, blas_int_t incX );
101
102void trsv( char uplo, char trans, char diag, blas_int_t n, const complex<float>* A,
103 blas_int_t lda, complex<float>* x, blas_int_t incX );
104
105void trsv( char uplo, char trans, char diag, blas_int_t n, const complex<double>* A,
106 blas_int_t lda, complex<double>* x, blas_int_t incX );
108//*************************************************************************************************
109
110
111//*************************************************************************************************
146inline void trsv( char uplo, char trans, char diag, blas_int_t n, const float* A,
147 blas_int_t lda, float* x, blas_int_t incX )
148{
149 strsv_( &uplo, &trans, &diag, &n, const_cast<float*>( A ), &lda, x, &incX
150#if !defined(BLAS_H)
152#endif
153 );
154}
155//*************************************************************************************************
156
157
158//*************************************************************************************************
193inline void trsv( char uplo, char trans, char diag, blas_int_t n, const double* A,
194 blas_int_t lda, double* x, blas_int_t incX )
195{
196 dtrsv_( &uplo, &trans, &diag, &n, const_cast<double*>( A ), &lda, x, &incX
197#if !defined(BLAS_H)
199#endif
200 );
201}
202//*************************************************************************************************
203
204
205//*************************************************************************************************
240inline void trsv( char uplo, char trans, char diag, blas_int_t n, const complex<float>* A,
241 blas_int_t lda, complex<float>* x, blas_int_t incX )
242{
243 BLAZE_STATIC_ASSERT( sizeof( complex<float> ) == 2UL*sizeof( float ) );
244
245 ctrsv_( &uplo, &trans, &diag, &n, const_cast<float*>( reinterpret_cast<const float*>( A ) ),
246 &lda, reinterpret_cast<float*>( x ), &incX
247#if !defined(BLAS_H)
249#endif
250 );
251}
252//*************************************************************************************************
253
254
255//*************************************************************************************************
290inline void trsv( char uplo, char trans, char diag, blas_int_t n, const complex<double>* A,
291 blas_int_t lda, complex<double>* x, blas_int_t incX )
292{
293 BLAZE_STATIC_ASSERT( sizeof( complex<double> ) == 2UL*sizeof( double ) );
294
295 ztrsv_( &uplo, &trans, &diag, &n, const_cast<double*>( reinterpret_cast<const double*>( A ) ),
296 &lda, reinterpret_cast<double*>( x ), &incX
297#if !defined(BLAS_H)
299#endif
300 );
301}
302//*************************************************************************************************
303
304} // namespace blaze
305
306#endif
Header file for the complex data type.
Compile time assertion.
Complex data type of the Blaze library.
decltype(auto) trans(const DenseMatrix< MT, SO > &dm)
Calculation of the transpose of the given dense matrix.
Definition: DMatTransExpr.h:766
void trsv(const DenseMatrix< MT, SO > &A, DenseVector< VT, TF > &b, char uplo, char trans, char diag)
LAPACK kernel for solving a triangular linear system of equations ( ). ( ).
Definition: trsv.h:169
int32_t blas_int_t
Signed integer type used in the BLAS/LAPACK wrapper functions.
Definition: Types.h:64
#define BLAZE_STATIC_ASSERT(expr)
Compile time assertion macro.
Definition: StaticAssert.h:112
size_t fortran_charlen_t
Type of the hidden arguments of character type within a Fortran forward declaration.
Definition: Types.h:186
Header file for basic BLAS type definitions.
Header file for basic type definitions.