aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Benoit Jacob <jacob.benoit.1@gmail.com>2008-03-31 17:24:09 +0000
committerGravatar Benoit Jacob <jacob.benoit.1@gmail.com>2008-03-31 17:24:09 +0000
commite74fbfb2bc13dee268950361a957aea73bcefc21 (patch)
tree5f059fd5ca63f1cf370235cee4c2490036db2f70
parentcff5e3ce9c1e09553125bce464b9c80f8bc2eb76 (diff)
- 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;
-rw-r--r--Eigen/Core2
-rw-r--r--Eigen/src/Core/ForwardDeclarations.h8
-rw-r--r--Eigen/src/Core/MatrixBase.h6
-rw-r--r--Eigen/src/Core/Util.h8
-rw-r--r--disabled/Eval.h (renamed from Eigen/src/Core/Eval.h)0
-rw-r--r--disabled/EvalOMP.h (renamed from Eigen/src/Core/EvalOMP.h)0
-rw-r--r--disabled/Eval_MatrixType.cpp (renamed from doc/snippets/Eval_MatrixType.cpp)0
-rw-r--r--disabled/class_Eval.cpp (renamed from doc/examples/class_Eval.cpp)0
8 files changed, 18 insertions, 6 deletions
diff --git a/Eigen/Core b/Eigen/Core
index c6185368d..bb4fc20c5 100644
--- a/Eigen/Core
+++ b/Eigen/Core
@@ -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
diff --git a/Eigen/src/Core/ForwardDeclarations.h b/Eigen/src/Core/ForwardDeclarations.h
index 3c9d9db70..58e1bf353 100644
--- a/Eigen/src/Core/ForwardDeclarations.h
+++ b/Eigen/src/Core/ForwardDeclarations.h
@@ -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
diff --git a/Eigen/src/Core/MatrixBase.h b/Eigen/src/Core/MatrixBase.h
index e1caa4c48..7f8283e9f 100644
--- a/Eigen/src/Core/MatrixBase.h
+++ b/Eigen/src/Core/MatrixBase.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);
diff --git a/Eigen/src/Core/Util.h b/Eigen/src/Core/Util.h
index ae9624aa1..9aaac9ae2 100644
--- a/Eigen/src/Core/Util.h
+++ b/Eigen/src/Core/Util.h
@@ -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>) \
diff --git a/Eigen/src/Core/Eval.h b/disabled/Eval.h
index 23e35a96a..23e35a96a 100644
--- a/Eigen/src/Core/Eval.h
+++ b/disabled/Eval.h
diff --git a/Eigen/src/Core/EvalOMP.h b/disabled/EvalOMP.h
index 32398b6be..32398b6be 100644
--- a/Eigen/src/Core/EvalOMP.h
+++ b/disabled/EvalOMP.h
diff --git a/doc/snippets/Eval_MatrixType.cpp b/disabled/Eval_MatrixType.cpp
index ccff677ac..ccff677ac 100644
--- a/doc/snippets/Eval_MatrixType.cpp
+++ b/disabled/Eval_MatrixType.cpp
diff --git a/doc/examples/class_Eval.cpp b/disabled/class_Eval.cpp
index ee6ee89d1..ee6ee89d1 100644
--- a/doc/examples/class_Eval.cpp
+++ b/disabled/class_Eval.cpp