Blaze 3.9
syev.h
Go to the documentation of this file.
1//=================================================================================================
33//=================================================================================================
34
35#ifndef _BLAZE_MATH_LAPACK_CLAPACK_SYEV_H_
36#define _BLAZE_MATH_LAPACK_CLAPACK_SYEV_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 ssyev_( char* jobz, char* uplo, blaze::blas_int_t* n, float* A, blaze::blas_int_t* lda,
61 float* w, float* work, blaze::blas_int_t* lwork, blaze::blas_int_t* info,
63void dsyev_( char* jobz, char* uplo, blaze::blas_int_t* n, double* A, blaze::blas_int_t* lda,
64 double* w, double* work, blaze::blas_int_t* lwork, blaze::blas_int_t* info,
66
67}
68#endif
70//*************************************************************************************************
71
72
73
74
75namespace blaze {
76
77//=================================================================================================
78//
79// LAPACK SYMMETRIC MATRIX EIGENVALUE FUNCTIONS (SYEV)
80//
81//=================================================================================================
82
83//*************************************************************************************************
86void syev( char jobz, char uplo, blas_int_t n, float* A, blas_int_t lda,
87 float* w, float* work, blas_int_t lwork, blas_int_t* info );
88
89void syev( char jobz, char uplo, blas_int_t n, double* A, blas_int_t lda,
90 double* w, double* work, blas_int_t lwork, blas_int_t* info );
92//*************************************************************************************************
93
94
95//*************************************************************************************************
135inline void syev( char jobz, char uplo, blas_int_t n, float* A, blas_int_t lda,
136 float* w, float* work, blas_int_t lwork, blas_int_t* info )
137{
138#if defined(INTEL_MKL_VERSION)
139 BLAZE_STATIC_ASSERT( sizeof( MKL_INT ) == sizeof( blas_int_t ) );
140#endif
141
142 ssyev_( &jobz, &uplo, &n, A, &lda, w, work, &lwork, info
143#if !defined(INTEL_MKL_VERSION)
145#endif
146 );
147}
148//*************************************************************************************************
149
150
151//*************************************************************************************************
191inline void syev( char jobz, char uplo, blas_int_t n, double* A, blas_int_t lda,
192 double* w, double* work, blas_int_t lwork, blas_int_t* info )
193{
194#if defined(INTEL_MKL_VERSION)
195 BLAZE_STATIC_ASSERT( sizeof( MKL_INT ) == sizeof( blas_int_t ) );
196#endif
197
198 dsyev_( &jobz, &uplo, &n, A, &lda, w, work, &lwork, info
199#if !defined(INTEL_MKL_VERSION)
201#endif
202 );
203}
204//*************************************************************************************************
205
206} // namespace blaze
207
208#endif
Header file for the complex data type.
Compile time assertion.
void syev(DenseMatrix< MT, SO > &A, DenseVector< VT, TF > &w, char jobz, char uplo)
LAPACK kernel for computing the eigenvalues of the given dense symmetric matrix.
Definition: syev.h:139
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.