aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Benoit Steiner <benoit.steiner.goog@gmail.com>2015-02-27 09:22:37 -0800
committerGravatar Benoit Steiner <benoit.steiner.goog@gmail.com>2015-02-27 09:22:37 -0800
commit90f4e90f1d8ff6efd3ee695cbb25b3d6d6ae4fee (patch)
treef3924f2f058947e0b3fbbc3381e3632bb0260294
parentf074bb4b5f6ddf0a67348365499a5c5c335a5e17 (diff)
Fixed off-by-one error that prevented the evaluation of small tensor expressions from being vectorized
-rw-r--r--unsupported/Eigen/CXX11/src/Tensor/TensorExecutor.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorExecutor.h b/unsupported/Eigen/CXX11/src/Tensor/TensorExecutor.h
index 1eb37bf1c..bb2f8b977 100644
--- a/unsupported/Eigen/CXX11/src/Tensor/TensorExecutor.h
+++ b/unsupported/Eigen/CXX11/src/Tensor/TensorExecutor.h
@@ -97,7 +97,7 @@ struct EvalRange<Evaluator, Index, true> {
Index i = first;
static const int PacketSize = unpacket_traits<typename Evaluator::PacketReturnType>::size;
- if (last - first > PacketSize) {
+ if (last - first >= PacketSize) {
eigen_assert(first % PacketSize == 0);
Index lastPacket = last - (last % PacketSize);
for (; i < lastPacket; i += PacketSize) {