diff options
author | Gael Guennebaud <g.gael@free.fr> | 2009-11-17 16:04:19 +0100 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2009-11-17 16:04:19 +0100 |
commit | 1e62e0b0d823078aa2d9b8ed2c93f7bc889df177 (patch) | |
tree | baf0ebffcfc15fc56e293494c24d417a4807b74c /Eigen/src/Core/NoAlias.h | |
parent | 63bcc1c0fbd03042715caf40aa090385c8fe0043 (diff) |
more ET refactoring:
* extend Cwise for multiple storage base class
* a lot of cleaning in the Sparse module
Diffstat (limited to 'Eigen/src/Core/NoAlias.h')
-rw-r--r-- | Eigen/src/Core/NoAlias.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/Eigen/src/Core/NoAlias.h b/Eigen/src/Core/NoAlias.h index dc32c2f7b..7ed848bce 100644 --- a/Eigen/src/Core/NoAlias.h +++ b/Eigen/src/Core/NoAlias.h @@ -39,7 +39,7 @@ * * \sa MatrixBase::noalias() */ -template<typename ExpressionType> +template<typename ExpressionType, template <typename> class StorageBase> class NoAlias { public: @@ -48,17 +48,17 @@ class NoAlias /** Behaves like MatrixBase::lazyAssign(other) * \sa MatrixBase::lazyAssign() */ template<typename OtherDerived> - EIGEN_STRONG_INLINE ExpressionType& operator=(const MatrixBase<OtherDerived>& other) + EIGEN_STRONG_INLINE ExpressionType& operator=(const StorageBase<OtherDerived>& other) { return m_expression.lazyAssign(other.derived()); } /** \sa MatrixBase::operator+= */ template<typename OtherDerived> - EIGEN_STRONG_INLINE ExpressionType& operator+=(const MatrixBase<OtherDerived>& other) + EIGEN_STRONG_INLINE ExpressionType& operator+=(const StorageBase<OtherDerived>& other) { return m_expression.lazyAssign(m_expression + other.derived()); } /** \sa MatrixBase::operator-= */ template<typename OtherDerived> - EIGEN_STRONG_INLINE ExpressionType& operator-=(const MatrixBase<OtherDerived>& other) + EIGEN_STRONG_INLINE ExpressionType& operator-=(const StorageBase<OtherDerived>& other) { return m_expression.lazyAssign(m_expression - other.derived()); } #ifndef EIGEN_PARSED_BY_DOXYGEN @@ -80,12 +80,12 @@ class NoAlias /** \returns a pseudo expression of \c *this with an operator= assuming * no aliasing between \c *this and the source expression. - * + * * More precisely, noalias() allows to bypass the EvalBeforeAssignBit flag. * Currently, even though several expressions may alias, only product * expressions have this flag. Therefore, noalias() is only usefull when * the source expression contains a matrix product. - * + * * Here are some examples where noalias is usefull: * \code * D.noalias() = A * B; @@ -107,7 +107,7 @@ class NoAlias * \sa class NoAlias */ template<typename Derived> -NoAlias<Derived> MatrixBase<Derived>::noalias() +NoAlias<Derived,MatrixBase> MatrixBase<Derived>::noalias() { return derived(); } |