Blaze
3.9
Toggle main menu visibility
Loading...
Searching...
No Matches
blaze
math
lapack
clapack
posv.h
Go to the documentation of this file.
1
//=================================================================================================
33
//=================================================================================================
34
35
#ifndef _BLAZE_MATH_LAPACK_CLAPACK_POSV_H_
36
#define _BLAZE_MATH_LAPACK_CLAPACK_POSV_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
sposv_(
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
dposv_(
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
cposv_(
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
zposv_(
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 POSITIVE DEFINITE LINEAR SYSTEM FUNCTIONS (POSV)
86
//
87
//=================================================================================================
88
89
//*************************************************************************************************
92
void
posv
(
char
uplo,
blas_int_t
n,
blas_int_t
nrhs,
float
* A,
blas_int_t
lda,
93
float
* B,
blas_int_t
ldb,
blas_int_t
* info );
94
95
void
posv
(
char
uplo,
blas_int_t
n,
blas_int_t
nrhs,
double
* A,
blas_int_t
lda,
96
double
* B,
blas_int_t
ldb,
blas_int_t
* info );
97
98
void
posv
(
char
uplo,
blas_int_t
n,
blas_int_t
nrhs, complex<float>* A,
blas_int_t
lda,
99
complex<float>* B,
blas_int_t
ldb,
blas_int_t
* info );
100
101
void
posv
(
char
uplo,
blas_int_t
n,
blas_int_t
nrhs, complex<double>* A,
blas_int_t
lda,
102
complex<double>* B,
blas_int_t
ldb,
blas_int_t
* info );
104
//*************************************************************************************************
105
106
107
//*************************************************************************************************
152
inline
void
posv
(
char
uplo,
blas_int_t
n,
blas_int_t
nrhs,
float
* A,
blas_int_t
lda,
153
float
* B,
blas_int_t
ldb,
blas_int_t
* info )
154
{
155
#if defined(INTEL_MKL_VERSION)
156
BLAZE_STATIC_ASSERT
(
sizeof
( MKL_INT ) ==
sizeof
(
blas_int_t
) );
157
#endif
158
159
sposv_( &uplo, &n, &nrhs, A, &lda, B, &ldb, info
160
#
if
!defined(INTEL_MKL_VERSION)
161
,
blaze::fortran_charlen_t
(1)
162
#endif
163
);
164
}
165
//*************************************************************************************************
166
167
168
//*************************************************************************************************
213
inline
void
posv
(
char
uplo,
blas_int_t
n,
blas_int_t
nrhs,
double
* A,
blas_int_t
lda,
214
double
* B,
blas_int_t
ldb,
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
dposv_( &uplo, &n, &nrhs, A, &lda, B, &ldb, info
221
#
if
!defined(INTEL_MKL_VERSION)
222
,
blaze::fortran_charlen_t
(1)
223
#endif
224
);
225
}
226
//*************************************************************************************************
227
228
229
//*************************************************************************************************
274
inline
void
posv
(
char
uplo,
blas_int_t
n,
blas_int_t
nrhs, complex<float>* A,
blas_int_t
lda,
275
complex<float>* B,
blas_int_t
ldb,
blas_int_t
* info )
276
{
277
BLAZE_STATIC_ASSERT
(
sizeof
( complex<float> ) == 2UL*
sizeof
(
float
) );
278
279
#if defined(INTEL_MKL_VERSION)
280
BLAZE_STATIC_ASSERT
(
sizeof
( MKL_INT ) ==
sizeof
(
blas_int_t
) );
281
BLAZE_STATIC_ASSERT
(
sizeof
( MKL_Complex8 ) ==
sizeof
( complex<float> ) );
282
using
ET = MKL_Complex8;
283
#else
284
using
ET = float;
285
#endif
286
287
cposv_( &uplo, &n, &nrhs,
reinterpret_cast<
ET*
>
( A ), &lda,
288
reinterpret_cast<
ET*
>
( B ), &ldb, info
289
#
if
!defined(INTEL_MKL_VERSION)
290
,
blaze::fortran_charlen_t
(1)
291
#endif
292
);
293
}
294
//*************************************************************************************************
295
296
297
//*************************************************************************************************
342
inline
void
posv
(
char
uplo,
blas_int_t
n,
blas_int_t
nrhs, complex<double>* A,
blas_int_t
lda,
343
complex<double>* B,
blas_int_t
ldb,
blas_int_t
* info )
344
{
345
BLAZE_STATIC_ASSERT
(
sizeof
( complex<double> ) == 2UL*
sizeof
(
double
) );
346
347
#if defined(INTEL_MKL_VERSION)
348
BLAZE_STATIC_ASSERT
(
sizeof
( MKL_INT ) ==
sizeof
(
blas_int_t
) );
349
BLAZE_STATIC_ASSERT
(
sizeof
( MKL_Complex16 ) ==
sizeof
( complex<double> ) );
350
using
ET = MKL_Complex16;
351
#else
352
using
ET = double;
353
#endif
354
355
zposv_( &uplo, &n, &nrhs,
reinterpret_cast<
ET*
>
( A ), &lda,
356
reinterpret_cast<
ET*
>
( B ), &ldb, info
357
#
if
!defined(INTEL_MKL_VERSION)
358
,
blaze::fortran_charlen_t
(1)
359
#endif
360
);
361
}
362
//*************************************************************************************************
363
364
}
// namespace blaze
365
366
#endif
Complex.h
Header file for the complex data type.
StaticAssert.h
Compile time assertion.
blaze::posv
void posv(char uplo, blas_int_t n, blas_int_t nrhs, float *A, blas_int_t lda, float *B, blas_int_t ldb, blas_int_t *info)
LAPACK kernel for solving a positive definite single precision linear system of equations ( ).
Definition
posv.h:152
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