Blaze
3.9
Toggle main menu visibility
Loading...
Searching...
No Matches
blaze
math
lapack
clapack
sysv.h
Go to the documentation of this file.
1
//=================================================================================================
33
//=================================================================================================
34
35
#ifndef _BLAZE_MATH_LAPACK_CLAPACK_SYSV_H_
36
#define _BLAZE_MATH_LAPACK_CLAPACK_SYSV_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
ssysv_(
char
* uplo,
blaze::blas_int_t
* n,
blaze::blas_int_t
* nrhs,
float
* A,
61
blaze::blas_int_t
* lda,
blaze::blas_int_t
* ipiv,
float
* b,
blaze::blas_int_t
* ldb,
62
float
* work,
blaze::blas_int_t
* lwork,
blaze::blas_int_t
* info,
63
blaze::fortran_charlen_t
nuplo );
64
void
dsysv_(
char
* uplo,
blaze::blas_int_t
* n,
blaze::blas_int_t
* nrhs,
double
* A,
65
blaze::blas_int_t
* lda,
blaze::blas_int_t
* ipiv,
double
* b,
blaze::blas_int_t
* ldb,
66
double
* work,
blaze::blas_int_t
* lwork,
blaze::blas_int_t
* info,
67
blaze::fortran_charlen_t
nuplo );
68
void
csysv_(
char
* uplo,
blaze::blas_int_t
* n,
blaze::blas_int_t
* nrhs,
float
* A,
69
blaze::blas_int_t
* lda,
blaze::blas_int_t
* ipiv,
float
* b,
blaze::blas_int_t
* ldb,
70
float
* work,
blaze::blas_int_t
* lwork,
blaze::blas_int_t
* info,
71
blaze::fortran_charlen_t
nuplo );
72
void
zsysv_(
char
* uplo,
blaze::blas_int_t
* n,
blaze::blas_int_t
* nrhs,
double
* A,
73
blaze::blas_int_t
* lda,
blaze::blas_int_t
* ipiv,
double
* b,
blaze::blas_int_t
* ldb,
74
double
* work,
blaze::blas_int_t
* lwork,
blaze::blas_int_t
* info,
75
blaze::fortran_charlen_t
nuplo );
76
77
}
78
#endif
80
//*************************************************************************************************
81
82
83
84
85
namespace
blaze {
86
87
//=================================================================================================
88
//
89
// LAPACK SYMMETRIC INDEFINITE LINEAR SYSTEM FUNCTIONS (SYSV)
90
//
91
//=================================================================================================
92
93
//*************************************************************************************************
96
void
sysv
(
char
uplo,
blas_int_t
n,
blas_int_t
nrhs,
float
* A,
blas_int_t
lda,
97
blas_int_t
* ipiv,
float
* B,
blas_int_t
ldb,
float
* work,
blas_int_t
lwork,
98
blas_int_t
* info );
99
100
void
sysv
(
char
uplo,
blas_int_t
n,
blas_int_t
nrhs,
double
* A,
blas_int_t
lda,
101
blas_int_t
* ipiv,
double
* B,
blas_int_t
ldb,
double
* work,
blas_int_t
lwork,
102
blas_int_t
* info );
103
104
void
sysv
(
char
uplo,
blas_int_t
n,
blas_int_t
nrhs, complex<float>* A,
blas_int_t
lda,
105
blas_int_t
* ipiv, complex<float>* B,
blas_int_t
ldb, complex<float>* work,
106
blas_int_t
lwork,
blas_int_t
* info );
107
108
void
sysv
(
char
uplo,
blas_int_t
n,
blas_int_t
nrhs, complex<double>* A,
blas_int_t
lda,
109
blas_int_t
* ipiv, complex<double>* B,
blas_int_t
ldb, complex<double>* work,
110
blas_int_t
lwork,
blas_int_t
* info );
112
//*************************************************************************************************
113
114
115
//*************************************************************************************************
164
inline
void
sysv
(
char
uplo,
blas_int_t
n,
blas_int_t
nrhs,
float
* A,
blas_int_t
lda,
165
blas_int_t
* ipiv,
float
* B,
blas_int_t
ldb,
float
* work,
blas_int_t
lwork,
166
blas_int_t
* info )
167
{
168
#if defined(INTEL_MKL_VERSION)
169
BLAZE_STATIC_ASSERT
(
sizeof
( MKL_INT ) ==
sizeof
(
blas_int_t
) );
170
#endif
171
172
ssysv_( &uplo, &n, &nrhs, A, &lda, ipiv, B, &ldb, work, &lwork, info
173
#
if
!defined(INTEL_MKL_VERSION)
174
,
blaze::fortran_charlen_t
(1)
175
#endif
176
);
177
}
178
//*************************************************************************************************
179
180
181
//*************************************************************************************************
230
inline
void
sysv
(
char
uplo,
blas_int_t
n,
blas_int_t
nrhs,
double
* A,
blas_int_t
lda,
231
blas_int_t
* ipiv,
double
* B,
blas_int_t
ldb,
double
* work,
blas_int_t
lwork,
232
blas_int_t
* info )
233
{
234
#if defined(INTEL_MKL_VERSION)
235
BLAZE_STATIC_ASSERT
(
sizeof
( MKL_INT ) ==
sizeof
(
blas_int_t
) );
236
#endif
237
238
dsysv_( &uplo, &n, &nrhs, A, &lda, ipiv, B, &ldb, work, &lwork, info
239
#
if
!defined(INTEL_MKL_VERSION)
240
,
blaze::fortran_charlen_t
(1)
241
#endif
242
);
243
}
244
//*************************************************************************************************
245
246
247
//*************************************************************************************************
296
inline
void
sysv
(
char
uplo,
blas_int_t
n,
blas_int_t
nrhs, complex<float>* A,
blas_int_t
lda,
297
blas_int_t
* ipiv, complex<float>* B,
blas_int_t
ldb, complex<float>* work,
298
blas_int_t
lwork,
blas_int_t
* info )
299
{
300
BLAZE_STATIC_ASSERT
(
sizeof
( complex<float> ) == 2UL*
sizeof
(
float
) );
301
302
#if defined(INTEL_MKL_VERSION)
303
BLAZE_STATIC_ASSERT
(
sizeof
( MKL_INT ) ==
sizeof
(
blas_int_t
) );
304
BLAZE_STATIC_ASSERT
(
sizeof
( MKL_Complex8 ) ==
sizeof
( complex<float> ) );
305
using
ET = MKL_Complex8;
306
#else
307
using
ET = float;
308
#endif
309
310
csysv_( &uplo, &n, &nrhs,
reinterpret_cast<
ET*
>
( A ), &lda, ipiv,
311
reinterpret_cast<
ET*
>
( B ), &ldb,
reinterpret_cast<
ET*
>
( work ), &lwork, info
312
#
if
!defined(INTEL_MKL_VERSION)
313
,
blaze::fortran_charlen_t
(1)
314
#endif
315
);
316
}
317
//*************************************************************************************************
318
319
320
//*************************************************************************************************
369
inline
void
sysv
(
char
uplo,
blas_int_t
n,
blas_int_t
nrhs, complex<double>* A,
blas_int_t
lda,
370
blas_int_t
* ipiv, complex<double>* B,
blas_int_t
ldb, complex<double>* work,
371
blas_int_t
lwork,
blas_int_t
* info )
372
{
373
BLAZE_STATIC_ASSERT
(
sizeof
( complex<double> ) == 2UL*
sizeof
(
double
) );
374
375
#if defined(INTEL_MKL_VERSION)
376
BLAZE_STATIC_ASSERT
(
sizeof
( MKL_INT ) ==
sizeof
(
blas_int_t
) );
377
BLAZE_STATIC_ASSERT
(
sizeof
( MKL_Complex16 ) ==
sizeof
( complex<double> ) );
378
using
ET = MKL_Complex16;
379
#else
380
using
ET = double;
381
#endif
382
383
zsysv_( &uplo, &n, &nrhs,
reinterpret_cast<
ET*
>
( A ), &lda, ipiv,
384
reinterpret_cast<
ET*
>
( B ), &ldb,
reinterpret_cast<
ET*
>
( work ), &lwork, info
385
#
if
!defined(INTEL_MKL_VERSION)
386
,
blaze::fortran_charlen_t
(1)
387
#endif
388
);
389
}
390
//*************************************************************************************************
391
392
}
// namespace blaze
393
394
#endif
Complex.h
Header file for the complex data type.
StaticAssert.h
Compile time assertion.
blaze::sysv
void sysv(char uplo, blas_int_t n, blas_int_t nrhs, float *A, blas_int_t lda, blas_int_t *ipiv, float *B, blas_int_t ldb, float *work, blas_int_t lwork, blas_int_t *info)
LAPACK kernel for solving a symmetric indefinite single precision linear system of equations ( ).
Definition
sysv.h:164
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