From 0a07ac574ead83d314d518127d8d69595f6212b2 Mon Sep 17 00:00:00 2001 From: Benoit Steiner Date: Wed, 8 Oct 2014 13:32:41 -0700 Subject: [PATCH] Added support for the *= and /* operators to TensorBase --- unsupported/Eigen/CXX11/src/Tensor/TensorBase.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorBase.h b/unsupported/Eigen/CXX11/src/Tensor/TensorBase.h index 2f7c9ecda..90a9cc2c4 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorBase.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorBase.h @@ -307,11 +307,18 @@ class TensorBase : public TensorBase, const Derived, const OtherDerived>(derived(), other.derived()); } - template EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived& operator-=(const OtherDerived& other) { return derived() = TensorCwiseBinaryOp, const Derived, const OtherDerived>(derived(), other.derived()); } + template EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE + Derived& operator*=(const OtherDerived& other) { + return derived() = TensorCwiseBinaryOp, const Derived, const OtherDerived>(derived(), other.derived()); + } + template EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE + Derived& operator/=(const OtherDerived& other) { + return derived() = TensorCwiseBinaryOp, const Derived, const OtherDerived>(derived(), other.derived()); + } template EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorReshapingOp