Blaze 3.9
hesv.h
Go to the documentation of this file.
1//=================================================================================================
33//=================================================================================================
34
35#ifndef _BLAZE_MATH_LAPACK_CLAPACK_HESV_H_
36#define _BLAZE_MATH_LAPACK_CLAPACK_HESV_H_
37
38
39//*************************************************************************************************
40// Includes
41//*************************************************************************************************
42
44#include <blaze/util/Complex.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)
58extern "C" {
59
60void chesv_( 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,
64void zhesv_( 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,
68
69}
70#endif
72//*************************************************************************************************
73
74
75
76
77namespace blaze {
78
79//=================================================================================================
80//
81// LAPACK HERMITIAN INDEFINITE LINEAR SYSTEM FUNCTIONS (HESV)
82//
83//=================================================================================================
84
85//*************************************************************************************************
88void hesv( char uplo, blas_int_t n, blas_int_t nrhs, complex<float>* A, blas_int_t lda,
90 blas_int_t lwork, blas_int_t* info );
91
92void hesv( char uplo, blas_int_t n, blas_int_t nrhs, complex<double>* A, blas_int_t lda,
94 blas_int_t lwork, blas_int_t* info );
96//*************************************************************************************************
97
98
99//*************************************************************************************************
148inline void hesv( char uplo, blas_int_t n, blas_int_t nrhs, complex<float>* A, blas_int_t lda,
149 blas_int_t* ipiv, complex<float>* B, blas_int_t ldb, complex<float>* work,
150 blas_int_t lwork, blas_int_t* info )
151{
152 BLAZE_STATIC_ASSERT( sizeof( complex<float> ) == 2UL*sizeof( float ) );
153
154#if defined(INTEL_MKL_VERSION)
155 BLAZE_STATIC_ASSERT( sizeof( MKL_INT ) == sizeof( blas_int_t ) );
156 BLAZE_STATIC_ASSERT( sizeof( MKL_Complex8 ) == sizeof( complex<float> ) );
157 using ET = MKL_Complex8;
158#else
159 using ET = float;
160#endif
161
162 chesv_( &uplo, &n, &nrhs, reinterpret_cast<ET*>( A ), &lda, ipiv,
163 reinterpret_cast<ET*>( B ), &ldb, reinterpret_cast<ET*>( work ), &lwork, info
164#if !defined(INTEL_MKL_VERSION)
166#endif
167 );
168}
169//*************************************************************************************************
170
171
172//*************************************************************************************************
221inline void hesv( char uplo, blas_int_t n, blas_int_t nrhs, complex<double>* A, blas_int_t lda,
222 blas_int_t* ipiv, complex<double>* B, blas_int_t ldb, complex<double>* work,
223 blas_int_t lwork, blas_int_t* info )
224{
225 BLAZE_STATIC_ASSERT( sizeof( complex<double> ) == 2UL*sizeof( double ) );
226
227#if defined(INTEL_MKL_VERSION)
228 BLAZE_STATIC_ASSERT( sizeof( MKL_INT ) == sizeof( blas_int_t ) );
229 BLAZE_STATIC_ASSERT( sizeof( MKL_Complex16 ) == sizeof( complex<double> ) );
230 using ET = MKL_Complex16;
231#else
232 using ET = double;
233#endif
234
235 zhesv_( &uplo, &n, &nrhs, reinterpret_cast<ET*>( A ), &lda, ipiv,
236 reinterpret_cast<ET*>( B ), &ldb, reinterpret_cast<ET*>( work ), &lwork, info
237#if !defined(INTEL_MKL_VERSION)
239#endif
240 );
241}
242//*************************************************************************************************
243
244} // namespace blaze
245
246#endif
Header file for the complex data type.
Compile time assertion.
Complex data type of the Blaze library.
void hesv(DenseMatrix< MT1, SO1 > &A, DenseMatrix< MT2, SO2 > &B, char uplo, blas_int_t *ipiv)
LAPACK kernel for solving a Hermitian indefinite linear system of equations ( ).
Definition: hesv.h:264
int32_t blas_int_t
Signed integer type used in the BLAS/LAPACK wrapper functions.
Definition: Types.h:64
#define BLAZE_STATIC_ASSERT(expr)
Compile time assertion macro.
Definition: StaticAssert.h:112
size_t fortran_charlen_t
Type of the hidden arguments of character type within a Fortran forward declaration.
Definition: Types.h:186
Header file for basic BLAS type definitions.
Header file for basic type definitions.