mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-06-04 02:33:59 +08:00
- remove Eval/EvalOMP (moving them to a disabled/ subdir in order
to preserve SVN history). They are made useless by the new ei_eval_unless_lazy. - introduce a generic Eval member typedef so one can do e.g. T t; U u; Product<T, U>::Eval m; m = t*u;
This commit is contained in:
parent
cff5e3ce9c
commit
e74fbfb2bc
@ -20,7 +20,6 @@ namespace Eigen {
|
||||
#include "src/Core/OperatorEquals.h"
|
||||
#include "src/Core/MatrixStorage.h"
|
||||
#include "src/Core/Matrix.h"
|
||||
#include "src/Core/Eval.h"
|
||||
#include "src/Core/Lazy.h"
|
||||
#include "src/Core/CwiseBinaryOp.h"
|
||||
#include "src/Core/CwiseUnaryOp.h"
|
||||
@ -43,7 +42,6 @@ namespace Eigen {
|
||||
#include "src/Core/Swap.h"
|
||||
#include "src/Core/CommaInitializer.h"
|
||||
#include "src/Core/AssociativeFunctors.h"
|
||||
#include "src/Core/EvalOMP.h"
|
||||
|
||||
} // namespace Eigen
|
||||
|
||||
|
@ -86,11 +86,17 @@ template<typename T, bool value> struct ei_conditional_eval
|
||||
|
||||
template<typename T> struct ei_conditional_eval<T, true>
|
||||
{
|
||||
typedef Eval<T> Type;
|
||||
typedef Matrix<typename ei_traits<T>::Scalar,
|
||||
ei_traits<T>::RowsAtCompileTime,
|
||||
ei_traits<T>::ColsAtCompileTime,
|
||||
ei_traits<T>::Flags,
|
||||
ei_traits<T>::MaxRowsAtCompileTime,
|
||||
ei_traits<T>::MaxColsAtCompileTime> Type;
|
||||
};
|
||||
|
||||
template<typename T> struct ei_eval_unless_lazy
|
||||
{
|
||||
typedef typename ei_conditional_eval<T, !(ei_traits<T>::Flags & LazyBit)>::Type Type;
|
||||
};
|
||||
|
||||
#endif // EIGEN_FORWARDDECLARATIONS_H
|
||||
|
@ -356,8 +356,10 @@ template<typename Derived> class MatrixBase
|
||||
template<typename NewType>
|
||||
const CwiseUnaryOp<ei_scalar_cast_op<NewType>, Derived> cast() const;
|
||||
|
||||
const typename ei_eval_unless_lazy<Derived>::Type eval() const EIGEN_ALWAYS_INLINE;
|
||||
const EvalOMP<Derived> evalOMP() const EIGEN_ALWAYS_INLINE;
|
||||
const typename ei_eval_unless_lazy<Derived>::Type eval() const EIGEN_ALWAYS_INLINE
|
||||
{
|
||||
return typename ei_eval_unless_lazy<Derived>::Type(derived());
|
||||
}
|
||||
|
||||
template<typename OtherDerived>
|
||||
void swap(const MatrixBase<OtherDerived>& other);
|
||||
|
@ -117,7 +117,13 @@ enum { RowsAtCompileTime = Base::RowsAtCompileTime, \
|
||||
SizeAtCompileTime = Base::SizeAtCompileTime, \
|
||||
MaxSizeAtCompileTime = Base::MaxSizeAtCompileTime, \
|
||||
IsVectorAtCompileTime = Base::IsVectorAtCompileTime, \
|
||||
Flags = Base::Flags };
|
||||
Flags = Base::Flags }; \
|
||||
typedef Matrix<Scalar, \
|
||||
RowsAtCompileTime, \
|
||||
ColsAtCompileTime, \
|
||||
Flags, \
|
||||
MaxRowsAtCompileTime, \
|
||||
MaxColsAtCompileTime> Eval;
|
||||
|
||||
#define EIGEN_GENERIC_PUBLIC_INTERFACE(Derived) \
|
||||
_EIGEN_GENERIC_PUBLIC_INTERFACE(Derived, Eigen::MatrixBase<Derived>) \
|
||||
|
Loading…
x
Reference in New Issue
Block a user