From 6c5e915e9a6c79550e7e2db2b53648f163a1411d Mon Sep 17 00:00:00 2001 From: Gael Guennebaud Date: Tue, 3 Dec 2013 17:17:53 +0100 Subject: Enable use of evaluators for noalias and lazyProduct, add conversion to scalar for inner products --- Eigen/src/Core/NoAlias.h | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) (limited to 'Eigen/src/Core/NoAlias.h') 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 + EIGEN_DEVICE_FUNC + EIGEN_STRONG_INLINE ExpressionType& operator=(const StorageBase& other) + { + call_assignment(*this, other.derived(), internal::assign_op()); + return m_expression; + } + + template + EIGEN_DEVICE_FUNC + EIGEN_STRONG_INLINE ExpressionType& operator+=(const StorageBase& other) + { + call_assignment(*this, other.derived(), internal::add_assign_op()); + return m_expression; + } + + template + EIGEN_DEVICE_FUNC + EIGEN_STRONG_INLINE ExpressionType& operator-=(const StorageBase& other) + { + call_assignment(*this, other.derived(), internal::sub_assign_op()); + return m_expression; + } + +#else /** Behaves like MatrixBase::lazyAssign(other) * \sa MatrixBase::lazyAssign() */ @@ -91,6 +118,8 @@ class NoAlias template ExpressionType& operator=(const ReturnByValue& func) { return m_expression = func; } +#endif + #endif EIGEN_DEVICE_FUNC -- cgit v1.2.3