diff options
author | Gael Guennebaud <g.gael@free.fr> | 2014-09-14 17:34:54 +0200 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2014-09-14 17:34:54 +0200 |
commit | 749b56f6af4f712ccc4235a4faf7c13e09b9f3a3 (patch) | |
tree | bf77d6d609fee4e8dcf3b354582906502a4b1b90 /Eigen/src/Core/SelfCwiseBinaryOp.h | |
parent | af9c9f7706bb7701a7224827e981ecc2f3bd9ac7 (diff) | |
parent | 9452eb38f812194a676edc1b9eb9d08b7bc0f297 (diff) |
merge with default branch
Diffstat (limited to 'Eigen/src/Core/SelfCwiseBinaryOp.h')
-rw-r--r-- | Eigen/src/Core/SelfCwiseBinaryOp.h | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/Eigen/src/Core/SelfCwiseBinaryOp.h b/Eigen/src/Core/SelfCwiseBinaryOp.h index ae7f9b887..87fcde323 100644 --- a/Eigen/src/Core/SelfCwiseBinaryOp.h +++ b/Eigen/src/Core/SelfCwiseBinaryOp.h @@ -256,15 +256,9 @@ inline Derived& ArrayBase<Derived>::operator-=(const Scalar& other) template<typename Derived> inline Derived& DenseBase<Derived>::operator/=(const Scalar& other) { - typedef typename internal::conditional<NumTraits<Scalar>::IsInteger, - internal::scalar_quotient_op<Scalar>, - internal::scalar_product_op<Scalar> >::type BinOp; typedef typename Derived::PlainObject PlainObject; - SelfCwiseBinaryOp<BinOp, Derived, typename PlainObject::ConstantReturnType> tmp(derived()); - Scalar actual_other; - if(NumTraits<Scalar>::IsInteger) actual_other = other; - else actual_other = Scalar(1)/other; - tmp = PlainObject::Constant(rows(),cols(), actual_other); + SelfCwiseBinaryOp<internal::scalar_quotient_op<Scalar>, Derived, typename PlainObject::ConstantReturnType> tmp(derived()); + tmp = PlainObject::Constant(rows(),cols(), other); return derived(); } #endif |