Blaze
3.9
Toggle main menu visibility
Loading...
Searching...
No Matches
blaze
math
lapack
clapack
trtrs.h
Go to the documentation of this file.
1
//=================================================================================================
33
//=================================================================================================
34
35
#ifndef _BLAZE_MATH_LAPACK_CLAPACK_TRTRS_H_
36
#define _BLAZE_MATH_LAPACK_CLAPACK_TRTRS_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(INTEL_MKL_VERSION)
58
extern
"C"
{
59
60
void
strtrs_(
char
* uplo,
char
* trans,
char
* diag,
blaze::blas_int_t
* n,
blaze::blas_int_t
* nrhs,
61
float
* A,
blaze::blas_int_t
* lda,
float
* B,
blaze::blas_int_t
* ldb,
62
blaze::blas_int_t
* info,
blaze::fortran_charlen_t
nuplo,
63
blaze::fortran_charlen_t
ntrans,
blaze::fortran_charlen_t
ndiag );
64
void
dtrtrs_(
char
* uplo,
char
* trans,
char
* diag,
blaze::blas_int_t
* n,
blaze::blas_int_t
* nrhs,
65
double
* A,
blaze::blas_int_t
* lda,
double
* B,
blaze::blas_int_t
* ldb,
66
blaze::blas_int_t
* info,
blaze::fortran_charlen_t
nuplo,
67
blaze::fortran_charlen_t
ntrans,
blaze::fortran_charlen_t
ndiag );
68
void
ctrtrs_(
char
* uplo,
char
* trans,
char
* diag,
blaze::blas_int_t
* n,
blaze::blas_int_t
* nrhs,
69
float
* A,
blaze::blas_int_t
* lda,
float
* B,
blaze::blas_int_t
* ldb,
70
blaze::blas_int_t
* info,
blaze::fortran_charlen_t
nuplo,
71
blaze::fortran_charlen_t
ntrans,
blaze::fortran_charlen_t
ndiag );
72
void
ztrtrs_(
char
* uplo,
char
* trans,
char
* diag,
blaze::blas_int_t
* n,
blaze::blas_int_t
* nrhs,
73
double
* A,
blaze::blas_int_t
* lda,
double
* B,
blaze::blas_int_t
* ldb,
74
blaze::blas_int_t
* info,
blaze::fortran_charlen_t
nuplo,
75
blaze::fortran_charlen_t
ntrans,
blaze::fortran_charlen_t
ndiag );
76
77
}
78
#endif
80
//*************************************************************************************************
81
82
83
84
85
namespace
blaze {
86
87
//=================================================================================================
88
//
89
// LAPACK TRIANGULAR SUBSTITUTION FUNCTIONS (TRTRS)
90
//
91
//=================================================================================================
92
93
//*************************************************************************************************
96
void
trtrs
(
char
uplo,
char
trans
,
char
diag,
blas_int_t
n,
blas_int_t
nrhs,
97
const
float
* A,
blas_int_t
lda,
float
* B,
blas_int_t
ldb,
98
blas_int_t
* info );
99
100
void
trtrs
(
char
uplo,
char
trans
,
char
diag,
blas_int_t
n,
blas_int_t
nrhs,
101
const
double
* A,
blas_int_t
lda,
double
* B,
blas_int_t
ldb,
102
blas_int_t
* info );
103
104
void
trtrs
(
char
uplo,
char
trans
,
char
diag,
blas_int_t
n,
blas_int_t
nrhs,
105
const
complex<float>* A,
blas_int_t
lda, complex<float>* B,
106
blas_int_t
ldb,
blas_int_t
* info );
107
108
void
trtrs
(
char
uplo,
char
trans
,
char
diag,
blas_int_t
n,
blas_int_t
nrhs,
109
const
complex<double>* A,
blas_int_t
lda, complex<double>* B,
110
blas_int_t
ldb,
blas_int_t
* info );
112
//*************************************************************************************************
113
114
115
//*************************************************************************************************
155
inline
void
trtrs
(
char
uplo,
char
trans
,
char
diag,
blas_int_t
n,
blas_int_t
nrhs,
156
const
float
* A,
blas_int_t
lda,
float
* B,
blas_int_t
ldb,
157
blas_int_t
* info )
158
{
159
#if defined(INTEL_MKL_VERSION)
160
BLAZE_STATIC_ASSERT
(
sizeof
( MKL_INT ) ==
sizeof
(
blas_int_t
) );
161
#endif
162
163
strtrs_( &uplo, &
trans
, &diag, &n, &nrhs,
const_cast<
float
*
>
( A ), &lda, B, &ldb, info
164
#
if
!defined(INTEL_MKL_VERSION)
165
,
blaze::fortran_charlen_t
(1),
blaze::fortran_charlen_t
(1),
blaze::fortran_charlen_t
(1)
166
#endif
167
);
168
}
169
//*************************************************************************************************
170
171
172
//*************************************************************************************************
212
inline
void
trtrs
(
char
uplo,
char
trans
,
char
diag,
blas_int_t
n,
blas_int_t
nrhs,
213
const
double
* A,
blas_int_t
lda,
double
* B,
blas_int_t
ldb,
214
blas_int_t
* info )
215
{
216
#if defined(INTEL_MKL_VERSION)
217
BLAZE_STATIC_ASSERT
(
sizeof
( MKL_INT ) ==
sizeof
(
blas_int_t
) );
218
#endif
219
220
dtrtrs_( &uplo, &
trans
, &diag, &n, &nrhs,
const_cast<
double
*
>
( A ), &lda, B, &ldb, info
221
#
if
!defined(INTEL_MKL_VERSION)
222
,
blaze::fortran_charlen_t
(1),
blaze::fortran_charlen_t
(1),
blaze::fortran_charlen_t
(1)
223
#endif
224
);
225
}
226
//*************************************************************************************************
227
228
229
//*************************************************************************************************
269
inline
void
trtrs
(
char
uplo,
char
trans
,
char
diag,
blas_int_t
n,
blas_int_t
nrhs,
270
const
complex<float>* A,
blas_int_t
lda, complex<float>* B,
271
blas_int_t
ldb,
blas_int_t
* info )
272
{
273
BLAZE_STATIC_ASSERT
(
sizeof
( complex<float> ) == 2UL*
sizeof
(
float
) );
274
275
#if defined(INTEL_MKL_VERSION)
276
BLAZE_STATIC_ASSERT
(
sizeof
( MKL_INT ) ==
sizeof
(
blas_int_t
) );
277
BLAZE_STATIC_ASSERT
(
sizeof
( MKL_Complex8 ) ==
sizeof
( complex<float> ) );
278
using
ET = MKL_Complex8;
279
#else
280
using
ET = float;
281
#endif
282
283
ctrtrs_( &uplo, &
trans
, &diag, &n, &nrhs,
const_cast<
ET*
>
(
reinterpret_cast<
const
ET*
>
( A ) ),
284
&lda,
reinterpret_cast<
ET*
>
( B ), &ldb, info
285
#
if
!defined(INTEL_MKL_VERSION)
286
,
blaze::fortran_charlen_t
(1),
blaze::fortran_charlen_t
(1),
blaze::fortran_charlen_t
(1)
287
#endif
288
);
289
}
290
//*************************************************************************************************
291
292
293
//*************************************************************************************************
333
inline
void
trtrs
(
char
uplo,
char
trans
,
char
diag,
blas_int_t
n,
blas_int_t
nrhs,
334
const
complex<double>* A,
blas_int_t
lda, complex<double>* B,
335
blas_int_t
ldb,
blas_int_t
* info )
336
{
337
BLAZE_STATIC_ASSERT
(
sizeof
( complex<double> ) == 2UL*
sizeof
(
double
) );
338
339
#if defined(INTEL_MKL_VERSION)
340
BLAZE_STATIC_ASSERT
(
sizeof
( MKL_INT ) ==
sizeof
(
blas_int_t
) );
341
BLAZE_STATIC_ASSERT
(
sizeof
( MKL_Complex16 ) ==
sizeof
( complex<double> ) );
342
using
ET = MKL_Complex16;
343
#else
344
using
ET = double;
345
#endif
346
347
ztrtrs_( &uplo, &
trans
, &diag, &n, &nrhs,
const_cast<
ET*
>
(
reinterpret_cast<
const
ET*
>
( A ) ),
348
&lda,
reinterpret_cast<
ET*
>
( B ), &ldb, info
349
#
if
!defined(INTEL_MKL_VERSION)
350
,
blaze::fortran_charlen_t
(1),
blaze::fortran_charlen_t
(1),
blaze::fortran_charlen_t
(1)
351
#endif
352
);
353
}
354
//*************************************************************************************************
355
356
}
// namespace blaze
357
358
#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::trtrs
void trtrs(char uplo, char trans, char diag, blas_int_t n, blas_int_t nrhs, const float *A, blas_int_t lda, float *B, blas_int_t ldb, blas_int_t *info)
LAPACK kernel for the substitution step of solving a triangular single precision linear system of equ...
Definition
trtrs.h:155
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