Blaze 3.9
hetrs.h
Go to the documentation of this file.
1//=================================================================================================
33//=================================================================================================
34
35#ifndef _BLAZE_MATH_LAPACK_CLAPACK_HETRS_H_
36#define _BLAZE_MATH_LAPACK_CLAPACK_HETRS_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 chetrs_( 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,
63void zhetrs_( char* uplo, blaze::blas_int_t* n, blaze::blas_int_t* nrhs, double* A,
64 blaze::blas_int_t* lda, blaze::blas_int_t* ipiv, double* B, blaze::blas_int_t* ldb,
66
67}
68#endif
70//*************************************************************************************************
71
72
73
74
75namespace blaze {
76
77//=================================================================================================
78//
79// LAPACK LDLH-BASED SUBSTITUTION FUNCTIONS (HETRS)
80//
81//=================================================================================================
82
83//*************************************************************************************************
86void hetrs( char uplo, blas_int_t n, blas_int_t nrhs, const complex<float>* A,
87 blas_int_t lda, const blas_int_t* ipiv, complex<float>* B,
88 blas_int_t ldb, blas_int_t* info );
89
90void hetrs( char uplo, blas_int_t n, blas_int_t nrhs, const complex<double>* A,
91 blas_int_t lda, const blas_int_t* ipiv, complex<double>* B,
92 blas_int_t ldb, blas_int_t* info );
94//*************************************************************************************************
95
96
97//*************************************************************************************************
131inline void hetrs( char uplo, blas_int_t n, blas_int_t nrhs, const complex<float>* A,
132 blas_int_t lda, const blas_int_t* ipiv, complex<float>* B,
133 blas_int_t ldb, blas_int_t* info )
134{
135 BLAZE_STATIC_ASSERT( sizeof( complex<float> ) == 2UL*sizeof( float ) );
136
137#if defined(INTEL_MKL_VERSION)
138 BLAZE_STATIC_ASSERT( sizeof( MKL_INT ) == sizeof( blas_int_t ) );
139 BLAZE_STATIC_ASSERT( sizeof( MKL_Complex8 ) == sizeof( complex<float> ) );
140 using ET = MKL_Complex8;
141#else
142 using ET = float;
143#endif
144
145 chetrs_( &uplo, &n, &nrhs, const_cast<ET*>( reinterpret_cast<const ET*>( A ) ),
146 &lda, const_cast<blas_int_t*>( ipiv ), reinterpret_cast<ET*>( B ), &ldb, info
147#if !defined(INTEL_MKL_VERSION)
149#endif
150 );
151}
152//*************************************************************************************************
153
154
155//*************************************************************************************************
189inline void hetrs( char uplo, blas_int_t n, blas_int_t nrhs, const complex<double>* A,
190 blas_int_t lda, const blas_int_t* ipiv, complex<double>* B,
191 blas_int_t ldb, blas_int_t* info )
192{
193 BLAZE_STATIC_ASSERT( sizeof( complex<double> ) == 2UL*sizeof( double ) );
194
195#if defined(INTEL_MKL_VERSION)
196 BLAZE_STATIC_ASSERT( sizeof( MKL_INT ) == sizeof( blas_int_t ) );
197 BLAZE_STATIC_ASSERT( sizeof( MKL_Complex16 ) == sizeof( complex<double> ) );
198 using ET = MKL_Complex16;
199#else
200 using ET = double;
201#endif
202
203 zhetrs_( &uplo, &n, &nrhs, const_cast<ET*>( reinterpret_cast<const ET*>( A ) ),
204 &lda, const_cast<blas_int_t*>( ipiv ), reinterpret_cast<ET*>( B ), &ldb, info
205#if !defined(INTEL_MKL_VERSION)
207#endif
208 );
209}
210//*************************************************************************************************
211
212} // namespace blaze
213
214#endif
Header file for the complex data type.
Compile time assertion.
Complex data type of the Blaze library.
void hetrs(const DenseMatrix< MT1, SO1 > &A, DenseMatrix< MT2, SO2 > &B, char uplo, const blas_int_t *ipiv)
LAPACK kernel for the substitution step of solving a symmetric indefinite linear system of equations ...
Definition: hetrs.h:311
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.