diff options
author | Benoit Steiner <benoit.steiner.goog@gmail.com> | 2016-06-04 07:47:04 -0700 |
---|---|---|
committer | Benoit Steiner <benoit.steiner.goog@gmail.com> | 2016-06-04 07:47:04 -0700 |
commit | c21eaedce617de17666d5d92eef594eb10467cda (patch) | |
tree | 6062127bf533c366307f6a47241855aea62887d2 /unsupported/Eigen/CXX11/src/Tensor/TensorReduction.h | |
parent | 36a45008223ee9d086b9a4e8b885e8882ccf319d (diff) |
Use array_prod to compute the number of elements contained in the input tensor expression
Diffstat (limited to 'unsupported/Eigen/CXX11/src/Tensor/TensorReduction.h')
-rw-r--r-- | unsupported/Eigen/CXX11/src/Tensor/TensorReduction.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorReduction.h b/unsupported/Eigen/CXX11/src/Tensor/TensorReduction.h index 6ddf824e9..04ba45a8f 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorReduction.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorReduction.h @@ -558,7 +558,7 @@ struct TensorEvaluator<const TensorReductionOp<Op, Dims, ArgType>, Device> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE PacketReturnType packet(Index index) const { EIGEN_STATIC_ASSERT((PacketSize > 1), YOU_MADE_A_PROGRAMMING_MISTAKE) - eigen_assert(index + PacketSize - 1 < dimensions().TotalSize()); + eigen_assert(index + PacketSize - 1 < internal::array_prod(dimensions())); EIGEN_ALIGN_MAX typename internal::remove_const<CoeffReturnType>::type values[PacketSize]; if (ReducingInnerMostDims) { |