mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-08-10 10:49:04 +08:00
Fixed off-by-one error that prevented the evaluation of small tensor expressions from being vectorized
This commit is contained in:
parent
f074bb4b5f
commit
90f4e90f1d
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user