aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen/src/Core/NoAlias.h
diff options
context:
space:
mode:
authorGravatar Gael Guennebaud <g.gael@free.fr>2013-12-03 17:17:53 +0100
committerGravatar Gael Guennebaud <g.gael@free.fr>2013-12-03 17:17:53 +0100
commit6c5e915e9a6c79550e7e2db2b53648f163a1411d (patch)
treeaab5c0a07616fcd028d2839f402edcadc0e53d81 /Eigen/src/Core/NoAlias.h
parentf0b82c3ab972a1eafd6aa4f08f4eaffa0d6f1e55 (diff)
Enable use of evaluators for noalias and lazyProduct, add conversion to scalar for inner products
Diffstat (limited to 'Eigen/src/Core/NoAlias.h')
-rw-r--r--Eigen/src/Core/NoAlias.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/Eigen/src/Core/NoAlias.h b/Eigen/src/Core/NoAlias.h
index 65117a806..6ac525336 100644
--- a/Eigen/src/Core/NoAlias.h
+++ b/Eigen/src/Core/NoAlias.h
@@ -34,6 +34,33 @@ class NoAlias
typedef typename ExpressionType::Scalar Scalar;
NoAlias(ExpressionType& expression) : m_expression(expression) {}
+
+#ifdef EIGEN_TEST_EVALUATORS
+ template<typename OtherDerived>
+ EIGEN_DEVICE_FUNC
+ EIGEN_STRONG_INLINE ExpressionType& operator=(const StorageBase<OtherDerived>& other)
+ {
+ call_assignment(*this, other.derived(), internal::assign_op<Scalar>());
+ return m_expression;
+ }
+
+ template<typename OtherDerived>
+ EIGEN_DEVICE_FUNC
+ EIGEN_STRONG_INLINE ExpressionType& operator+=(const StorageBase<OtherDerived>& other)
+ {
+ call_assignment(*this, other.derived(), internal::add_assign_op<Scalar>());
+ return m_expression;
+ }
+
+ template<typename OtherDerived>
+ EIGEN_DEVICE_FUNC
+ EIGEN_STRONG_INLINE ExpressionType& operator-=(const StorageBase<OtherDerived>& other)
+ {
+ call_assignment(*this, other.derived(), internal::sub_assign_op<Scalar>());
+ return m_expression;
+ }
+
+#else
/** Behaves like MatrixBase::lazyAssign(other)
* \sa MatrixBase::lazyAssign() */
@@ -93,6 +120,8 @@ class NoAlias
{ return m_expression = func; }
#endif
+#endif
+
EIGEN_DEVICE_FUNC
ExpressionType& expression() const
{