Blaze
3.9
Toggle main menu visibility
Loading...
Searching...
No Matches
blaze
math
lapack
clapack
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/math/blas/Types.h
>
44
#include <
blaze/util/Complex.h
>
45
#include <
blaze/util/StaticAssert.h
>
46
#include <
blaze/util/Types.h
>
47
48
49
//=================================================================================================
50
//
51
// LAPACK FORWARD DECLARATIONS
52
//
53
//=================================================================================================
54
55
//*************************************************************************************************
57
#if !defined(BLAS_H)
58
extern
"C"
{
59
60
void
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,
62
blaze::fortran_charlen_t
nuplo,
blaze::fortran_charlen_t
ntrans,
63
blaze::fortran_charlen_t
ndiag );
64
void
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,
66
blaze::fortran_charlen_t
nuplo,
blaze::fortran_charlen_t
ntrans,
67
blaze::fortran_charlen_t
ndiag );
68
void
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,
70
blaze::fortran_charlen_t
nuplo,
blaze::fortran_charlen_t
ntrans,
71
blaze::fortran_charlen_t
ndiag );
72
void
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,
74
blaze::fortran_charlen_t
nuplo,
blaze::fortran_charlen_t
ntrans,
75
blaze::fortran_charlen_t
ndiag );
76
77
}
78
#endif
80
//*************************************************************************************************
81
82
83
84
85
namespace
blaze {
86
87
//=================================================================================================
88
//
89
// LAPACK TRIANGULAR LINEAR SYSTEM FUNCTIONS (TRSV)
90
//
91
//=================================================================================================
92
93
//*************************************************************************************************
96
void
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
99
void
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
102
void
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
105
void
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
//*************************************************************************************************
146
inline
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)
151
,
blaze::fortran_charlen_t
(1),
blaze::fortran_charlen_t
(1),
blaze::fortran_charlen_t
(1)
152
#endif
153
);
154
}
155
//*************************************************************************************************
156
157
158
//*************************************************************************************************
193
inline
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)
198
,
blaze::fortran_charlen_t
(1),
blaze::fortran_charlen_t
(1),
blaze::fortran_charlen_t
(1)
199
#endif
200
);
201
}
202
//*************************************************************************************************
203
204
205
//*************************************************************************************************
240
inline
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)
248
,
blaze::fortran_charlen_t
(1),
blaze::fortran_charlen_t
(1),
blaze::fortran_charlen_t
(1)
249
#endif
250
);
251
}
252
//*************************************************************************************************
253
254
255
//*************************************************************************************************
290
inline
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)
298
,
blaze::fortran_charlen_t
(1),
blaze::fortran_charlen_t
(1),
blaze::fortran_charlen_t
(1)
299
#endif
300
);
301
}
302
//*************************************************************************************************
303
304
}
// namespace blaze
305
306
#endif
Complex.h
Header file for the complex data type.
StaticAssert.h
Compile time assertion.
blaze::trans
decltype(auto) trans(const DenseMatrix< MT, SO > &dm)
Calculation of the transpose of the given dense matrix.
Definition
DMatTransExpr.h:766
blaze::trsv
void trsv(char uplo, char trans, char diag, blas_int_t n, const float *A, blas_int_t lda, float *x, blas_int_t incX)
LAPACK kernel for solving a triangular single precision linear system of equations ( ).
Definition
trsv.h:146
blaze::blas_int_t
int32_t blas_int_t
Signed integer type used in the BLAS/LAPACK wrapper functions.
Definition
Types.h:64
BLAZE_STATIC_ASSERT
#define BLAZE_STATIC_ASSERT(expr)
Compile time assertion macro.
Definition
StaticAssert.h:112
blaze::fortran_charlen_t
size_t fortran_charlen_t
Type of the hidden arguments of character type within a Fortran forward declaration.
Definition
Types.h:186
Types.h
Header file for basic BLAS type definitions.
Types.h
Header file for basic type definitions.
Generated by
1.18.0