Blaze
3.9
Toggle main menu visibility
Loading...
Searching...
No Matches
blaze
math
lapack
clapack
potrs.h
Go to the documentation of this file.
1
//=================================================================================================
33
//=================================================================================================
34
35
#ifndef _BLAZE_MATH_LAPACK_CLAPACK_POTRS_H_
36
#define _BLAZE_MATH_LAPACK_CLAPACK_POTRS_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
spotrs_(
char
* uplo,
blaze::blas_int_t
* n,
blaze::blas_int_t
* nrhs,
float
* A,
61
blaze::blas_int_t
* lda,
float
* B,
blaze::blas_int_t
* ldb,
62
blaze::blas_int_t
* info,
blaze::fortran_charlen_t
nuplo );
63
void
dpotrs_(
char
* uplo,
blaze::blas_int_t
* n,
blaze::blas_int_t
* nrhs,
double
* A,
64
blaze::blas_int_t
* lda,
double
* B,
blaze::blas_int_t
* ldb,
65
blaze::blas_int_t
* info,
blaze::fortran_charlen_t
nuplo );
66
void
cpotrs_(
char
* uplo,
blaze::blas_int_t
* n,
blaze::blas_int_t
* nrhs,
float
* A,
67
blaze::blas_int_t
* lda,
float
* B,
blaze::blas_int_t
* ldb,
68
blaze::blas_int_t
* info,
blaze::fortran_charlen_t
nuplo );
69
void
zpotrs_(
char
* uplo,
blaze::blas_int_t
* n,
blaze::blas_int_t
* nrhs,
double
* A,
70
blaze::blas_int_t
* lda,
double
* B,
blaze::blas_int_t
* ldb,
71
blaze::blas_int_t
* info,
blaze::fortran_charlen_t
nuplo );
72
73
}
74
#endif
76
//*************************************************************************************************
77
78
79
80
81
namespace
blaze {
82
83
//=================================================================================================
84
//
85
// LAPACK LLH-BASED SUBSTITUTION FUNCTIONS (POTRS)
86
//
87
//=================================================================================================
88
89
//*************************************************************************************************
92
void
potrs
(
char
uplo,
blas_int_t
n,
blas_int_t
nrhs,
const
float
* A,
blas_int_t
lda,
93
float
* B,
blas_int_t
ldb,
blas_int_t
* info );
94
95
void
potrs
(
char
uplo,
blas_int_t
n,
blas_int_t
nrhs,
const
double
* A,
blas_int_t
lda,
96
double
* B,
blas_int_t
ldb,
blas_int_t
* info );
97
98
void
potrs
(
char
uplo,
blas_int_t
n,
blas_int_t
nrhs,
const
complex<float>* A,
blas_int_t
lda,
99
complex<float>* B,
blas_int_t
ldb,
blas_int_t
* info );
100
101
void
potrs
(
char
uplo,
blas_int_t
n,
blas_int_t
nrhs,
const
complex<double>* A,
blas_int_t
lda,
102
complex<double>* B,
blas_int_t
ldb,
blas_int_t
* info );
104
//*************************************************************************************************
105
106
107
//*************************************************************************************************
140
inline
void
potrs
(
char
uplo,
blas_int_t
n,
blas_int_t
nrhs,
const
float
* A,
blas_int_t
lda,
141
float
* B,
blas_int_t
ldb,
blas_int_t
* info )
142
{
143
#if defined(INTEL_MKL_VERSION)
144
BLAZE_STATIC_ASSERT
(
sizeof
( MKL_INT ) ==
sizeof
(
blas_int_t
) );
145
#endif
146
147
spotrs_( &uplo, &n, &nrhs,
const_cast<
float
*
>
( A ), &lda, B, &ldb, info
148
#
if
!defined(INTEL_MKL_VERSION)
149
,
blaze::fortran_charlen_t
(1)
150
#endif
151
);
152
}
153
//*************************************************************************************************
154
155
156
//*************************************************************************************************
189
inline
void
potrs
(
char
uplo,
blas_int_t
n,
blas_int_t
nrhs,
const
double
* A,
blas_int_t
lda,
190
double
* B,
blas_int_t
ldb,
blas_int_t
* info )
191
{
192
#if defined(INTEL_MKL_VERSION)
193
BLAZE_STATIC_ASSERT
(
sizeof
( MKL_INT ) ==
sizeof
(
blas_int_t
) );
194
#endif
195
196
dpotrs_( &uplo, &n, &nrhs,
const_cast<
double
*
>
( A ), &lda, B, &ldb, info
197
#
if
!defined(INTEL_MKL_VERSION)
198
,
blaze::fortran_charlen_t
(1)
199
#endif
200
);
201
}
202
//*************************************************************************************************
203
204
205
//*************************************************************************************************
238
inline
void
potrs
(
char
uplo,
blas_int_t
n,
blas_int_t
nrhs,
const
complex<float>* A,
blas_int_t
lda,
239
complex<float>* B,
blas_int_t
ldb,
blas_int_t
* info )
240
{
241
BLAZE_STATIC_ASSERT
(
sizeof
( complex<float> ) == 2UL*
sizeof
(
float
) );
242
243
#if defined(INTEL_MKL_VERSION)
244
BLAZE_STATIC_ASSERT
(
sizeof
( MKL_INT ) ==
sizeof
(
blas_int_t
) );
245
BLAZE_STATIC_ASSERT
(
sizeof
( MKL_Complex8 ) ==
sizeof
( complex<float> ) );
246
using
ET = MKL_Complex8;
247
#else
248
using
ET = float;
249
#endif
250
251
cpotrs_( &uplo, &n, &nrhs,
const_cast<
ET*
>
(
reinterpret_cast<
const
ET*
>
( A ) ),
252
&lda,
reinterpret_cast<
ET*
>
( B ), &ldb, info
253
#
if
!defined(INTEL_MKL_VERSION)
254
,
blaze::fortran_charlen_t
(1)
255
#endif
256
);
257
}
258
//*************************************************************************************************
259
260
261
//*************************************************************************************************
294
inline
void
potrs
(
char
uplo,
blas_int_t
n,
blas_int_t
nrhs,
const
complex<double>* A,
blas_int_t
lda,
295
complex<double>* B,
blas_int_t
ldb,
blas_int_t
* info )
296
{
297
BLAZE_STATIC_ASSERT
(
sizeof
( complex<double> ) == 2UL*
sizeof
(
double
) );
298
299
#if defined(INTEL_MKL_VERSION)
300
BLAZE_STATIC_ASSERT
(
sizeof
( MKL_INT ) ==
sizeof
(
blas_int_t
) );
301
BLAZE_STATIC_ASSERT
(
sizeof
( MKL_Complex16 ) ==
sizeof
( complex<double> ) );
302
using
ET = MKL_Complex16;
303
#else
304
using
ET = double;
305
#endif
306
307
zpotrs_( &uplo, &n, &nrhs,
const_cast<
ET*
>
(
reinterpret_cast<
const
ET*
>
( A ) ),
308
&lda,
reinterpret_cast<
ET*
>
( B ), &ldb, info
309
#
if
!defined(INTEL_MKL_VERSION)
310
,
blaze::fortran_charlen_t
(1)
311
#endif
312
);
313
}
314
//*************************************************************************************************
315
316
}
// namespace blaze
317
318
#endif
Complex.h
Header file for the complex data type.
StaticAssert.h
Compile time assertion.
blaze::potrs
void potrs(char uplo, 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 positive definite single precision linear system...
Definition
potrs.h:140
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