From c21eaedce617de17666d5d92eef594eb10467cda Mon Sep 17 00:00:00 2001 From: Benoit Steiner Date: Sat, 4 Jun 2016 07:47:04 -0700 Subject: [PATCH] Use array_prod to compute the number of elements contained in the input tensor expression --- unsupported/Eigen/CXX11/src/Tensor/TensorReduction.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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, 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::type values[PacketSize]; if (ReducingInnerMostDims) {