35 #ifndef _BLAZE_MATH_DENSE_EIGEN_H_ 36 #define _BLAZE_MATH_DENSE_EIGEN_H_ 76 template<
typename MT,
bool SO,
typename VT,
bool TF >
77 inline void eigen(
const DenseMatrix<MT,SO>& A, DenseVector<VT,TF>& w );
79 template<
typename MT1,
bool SO1,
typename VT,
bool TF,
typename MT2,
bool SO2 >
80 inline void eigen(
const DenseMatrix<MT1,SO1>& A, DenseVector<VT,TF>& w, DenseMatrix<MT2,SO2>& V );
104 template<
typename MT
108 inline auto eigen_backend(
const DenseMatrix<MT,SO>& A, DenseVector<VT,TF>& w )
109 -> EnableIf_t< IsSymmetric_v<MT> && IsFloatingPoint_v< ElementType_t<MT> > >
111 using ATmp = ResultType_t< RemoveAdaptor_t<MT> >;
120 syevd( Atmp, ~w,
'N',
'L' );
145 template<
typename MT
149 inline auto eigen_backend(
const DenseMatrix<MT,SO>& A, DenseVector<VT,TF>& w )
150 -> EnableIf_t< IsHermitian_v<MT> && IsComplex_v< ElementType_t<MT> > >
152 using ATmp = ResultType_t< RemoveAdaptor_t<MT> >;
161 heevd( Atmp, ~w,
'N',
'L' );
186 template<
typename MT
190 inline auto eigen_backend(
const DenseMatrix<MT,SO>& A, DenseVector<VT,TF>& w )
191 ->
DisableIf_t< ( IsSymmetric_v<MT> && IsFloatingPoint_v< ElementType_t<MT> > ) ||
192 ( IsHermitian_v<MT> &&
IsComplex_v< ElementType_t<MT> > ) >
194 using ATmp = ResultType_t< RemoveAdaptor_t<MT> >;
296 template<
typename MT
313 eigen_backend( ~A, wtmp );
315 if( IsContiguous_v<VT> ) {
343 template<
typename MT1
349 inline auto eigen_backend(
const DenseMatrix<MT1,SO1>& A, DenseVector<VT,TF>& w, DenseMatrix<MT2,SO2>& V )
350 -> EnableIf_t< IsSymmetric_v<MT1> && IsFloatingPoint_v< ElementType_t<MT1> > >
352 using ATmp = ResultType_t< RemoveAdaptor_t<MT1> >;
361 syevd( Atmp, ~w,
'V',
'L' );
390 template<
typename MT1
396 inline auto eigen_backend(
const DenseMatrix<MT1,SO1>& A, DenseVector<VT,TF>& w, DenseMatrix<MT2,SO2>& V )
397 -> EnableIf_t< IsHermitian_v<MT1> && IsComplex_v< ElementType_t<MT1> > >
399 using ATmp = ResultType_t< RemoveAdaptor_t<MT1> >;
408 heevd( Atmp, ~w,
'V',
'L' );
437 template<
typename MT1
443 inline auto eigen_backend(
const DenseMatrix<MT1,SO1>& A, DenseVector<VT,TF>& w, DenseMatrix<MT2,SO2>& V )
444 ->
DisableIf_t< ( IsSymmetric_v<MT1> && IsFloatingPoint_v< ElementType_t<MT1> > ) ||
445 ( IsHermitian_v<MT1> &&
IsComplex_v< ElementType_t<MT1> > ) >
447 using ATmp = ResultType_t< RemoveAdaptor_t<MT1> >;
456 if( IsRowMajorMatrix_v<MT1> )
457 geev( Atmp, ~V, ~w );
459 geev( Atmp, ~w, ~V );
566 template<
typename MT1
592 eigen_backend( ~A, wtmp, Vtmp );
594 if( !IsContiguous_v<VT> ) {
598 if( !IsContiguous_v<MT2> ) {
Constraint on the data type.
Header file for auxiliary alias declarations.
constexpr bool IsComplex_v
Auxiliary variable template for the IsComplex type trait.The IsComplex_v variable template provides a...
Definition: IsComplex.h:139
#define BLAZE_CONSTRAINT_MUST_HAVE_MUTABLE_DATA_ACCESS(T)
Constraint on the data type.In case the given data type T does not provide low-level data access to m...
Definition: MutableDataAccess.h:61
typename If< Condition, T1, T2 >::Type If_t
Auxiliary alias template for the If class template.The If_t alias template provides a convenient shor...
Definition: If.h:109
typename T::ResultType ResultType_t
Alias declaration for nested ResultType type definitions.The ResultType_t alias declaration provides ...
Definition: Aliases.h:390
void heevd(char jobz, char uplo, int n, complex< float > *A, int lda, float *w, complex< float > *work, int lwork, float *rwork, int lrwork, int *iwork, int liwork, int *info)
LAPACK kernel for computing the eigenvalues of the given dense Hermitian single precision column-majo...
Definition: heevd.h:140
#define BLAZE_CONSTRAINT_MUST_NOT_BE_COMPUTATION_TYPE(T)
Constraint on the data type.In case the given data type T is a computational expression (i....
Definition: Computation.h:81
Header file for the DenseVector base class.
Constraint on the data type.
Header file for the LAPACK general matrix eigenvalue functions (geev)
#define BLAZE_CONSTRAINT_MUST_NOT_BE_ADAPTOR_TYPE(T)
Constraint on the data type.In case the given data type T is an adaptor type (as for instance LowerMa...
Definition: Adaptor.h:81
Base class for dense matrices.The DenseMatrix class is a base class for all dense matrix classes....
Definition: DenseMatrix.h:81
typename T::ElementType ElementType_t
Alias declaration for nested ElementType type definitions.The ElementType_t alias declaration provide...
Definition: Aliases.h:170
Constraint on the data type.
Header file for the DisableIf class template.
Header file for the IsSymmetric type trait.
Namespace of the Blaze C++ math library.
Definition: Blaze.h:58
Header file for the If class template.
Header file for the IsFloatingPoint type trait.
void geev(char jobvl, char jobvr, int n, float *A, int lda, float *wr, float *wi, float *VL, int ldvl, float *VR, int ldvr, float *work, int lwork, int *info)
LAPACK kernel for computing the eigenvalues of the given dense general single precision column-major ...
Definition: geev.h:172
Header file for the DenseMatrix base class.
Base class for N-dimensional dense vectors.The DenseVector class is a base class for all arbitrarily ...
Definition: DenseVector.h:76
Header file for the RemoveAdaptor type trait.
Constraint on the data type.
Header file for the EnableIf class template.
Header file for the IsContiguous type trait.
Header file for the LAPACK Hermitian matrix eigenvalue functions (heevd)
#define BLAZE_CONSTRAINT_MUST_BE_BLAS_COMPATIBLE_TYPE(T)
Constraint on the data type.In case the given data type T is not a BLAS compatible data type (i....
Definition: BLASCompatible.h:61
Header file for the LAPACK symmetric matrix eigenvalue functions (syevd)
Header file for the IsRowMajorMatrix type trait.
Header file for the IsComplex type trait.
typename DisableIf< Condition, T >::Type DisableIf_t
Auxiliary type for the DisableIf class template.The DisableIf_t alias declaration provides a convenie...
Definition: DisableIf.h:138
Header file for the IsHermitian type trait.
void syevd(char jobz, char uplo, int n, float *A, int lda, float *w, float *work, int lwork, int *iwork, int liwork, int *info)
LAPACK kernel for computing the eigenvalues of the given dense symmetric single precision column-majo...
Definition: syevd.h:136
void eigen(const DenseMatrix< MT, SO > &A, DenseVector< VT, TF > &w)
Eigenvalue computation of the given dense matrix.
Definition: Eigen.h:300