Blaze  3.6
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/util/Complex.h>
45 #include <blaze/util/Types.h>
46 
47 
48 //=================================================================================================
49 //
50 // LAPACK FORWARD DECLARATIONS
51 //
52 //=================================================================================================
53 
54 //*************************************************************************************************
56 #if !defined(INTEL_MKL_VERSION)
57 extern "C" {
58 
59 void spotrs_( char* uplo, int* n, int* nrhs, float* A, int* lda, float* B, int* ldb,
60  int* info, blaze::fortran_charlen_t nuplo );
61 void dpotrs_( char* uplo, int* n, int* nrhs, double* A, int* lda, double* B, int* ldb,
62  int* info, blaze::fortran_charlen_t nuplo );
63 void cpotrs_( char* uplo, int* n, int* nrhs, float* A, int* lda, float* B, int* ldb,
64  int* info, blaze::fortran_charlen_t nuplo );
65 void zpotrs_( char* uplo, int* n, int* nrhs, double* A, int* lda, double* B, int* ldb,
66  int* info, blaze::fortran_charlen_t nuplo );
67 
68 }
69 #endif
70 
71 //*************************************************************************************************
72 
73 
74 
75 
76 namespace blaze {
77 
78 //=================================================================================================
79 //
80 // LAPACK LLH-BASED SUBSTITUTION FUNCTIONS (POTRS)
81 //
82 //=================================================================================================
83 
84 //*************************************************************************************************
87 void potrs( char uplo, int n, int nrhs, const float* A, int lda,
88  float* B, int ldb, int* info );
89 
90 void potrs( char uplo, int n, int nrhs, const double* A, int lda,
91  double* B, int ldb, int* info );
92 
93 void potrs( char uplo, int n, int nrhs, const complex<float>* A, int lda,
94  complex<float>* B, int ldb, int* info );
95 
96 void potrs( char uplo, int n, int nrhs, const complex<double>* A, int lda,
97  complex<double>* B, int ldb, int* info );
99 //*************************************************************************************************
100 
101 
102 //*************************************************************************************************
135 inline void potrs( char uplo, int n, int nrhs, const float* A, int lda, float* B, int ldb, int* info )
136 {
137 #if defined(INTEL_MKL_VERSION)
138  BLAZE_STATIC_ASSERT( sizeof( MKL_INT ) == sizeof( int ) );
139 #endif
140 
141  spotrs_( &uplo, &n, &nrhs, const_cast<float*>( A ), &lda, B, &ldb, info,
143 }
144 //*************************************************************************************************
145 
146 
147 //*************************************************************************************************
180 inline void potrs( char uplo, int n, int nrhs, const double* A, int lda, double* B, int ldb, int* info )
181 {
182 #if defined(INTEL_MKL_VERSION)
183  BLAZE_STATIC_ASSERT( sizeof( MKL_INT ) == sizeof( int ) );
184 #endif
185 
186  dpotrs_( &uplo, &n, &nrhs, const_cast<double*>( A ), &lda, B, &ldb, info,
188 }
189 //*************************************************************************************************
190 
191 
192 //*************************************************************************************************
225 inline void potrs( char uplo, int n, int nrhs, const complex<float>* A,
226  int lda, complex<float>* B, int ldb, int* info )
227 {
228  BLAZE_STATIC_ASSERT( sizeof( complex<float> ) == 2UL*sizeof( float ) );
229 
230 #if defined(INTEL_MKL_VERSION)
231  BLAZE_STATIC_ASSERT( sizeof( MKL_INT ) == sizeof( int ) );
232  using ET = MKL_Complex8;
233 #else
234  using ET = float;
235 #endif
236 
237  cpotrs_( &uplo, &n, &nrhs, const_cast<ET*>( reinterpret_cast<const ET*>( A ) ),
238  &lda, reinterpret_cast<ET*>( B ), &ldb, info, blaze::fortran_charlen_t(1) );
239 }
240 //*************************************************************************************************
241 
242 
243 //*************************************************************************************************
276 inline void potrs( char uplo, int n, int nrhs, const complex<double>* A,
277  int lda, complex<double>* B, int ldb, int* info )
278 {
279  BLAZE_STATIC_ASSERT( sizeof( complex<double> ) == 2UL*sizeof( double ) );
280 
281 #if defined(INTEL_MKL_VERSION)
282  BLAZE_STATIC_ASSERT( sizeof( MKL_INT ) == sizeof( int ) );
283  using ET = MKL_Complex16;
284 #else
285  using ET = double;
286 #endif
287 
288  zpotrs_( &uplo, &n, &nrhs, const_cast<ET*>( reinterpret_cast<const ET*>( A ) ),
289  &lda, reinterpret_cast<ET*>( B ), &ldb, info, blaze::fortran_charlen_t(1) );
290 }
291 //*************************************************************************************************
292 
293 } // namespace blaze
294 
295 #endif
Header file for basic type definitions.
void potrs(char uplo, int n, int nrhs, const float *A, int lda, float *B, int ldb, int *info)
LAPACK kernel for the substitution step of solving a positive definite single precision linear system...
Definition: potrs.h:135
Namespace of the Blaze C++ math library.
Definition: Blaze.h:58
Compile time assertion.
Header file for the complex data type.
#define BLAZE_STATIC_ASSERT(expr)
Compile time assertion macro.In case of an invalid compile time expression, a compilation error is cr...
Definition: StaticAssert.h:112
Size type of the Blaze library.