mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-05-01 08:14:10 +08:00
Prevent potential overflow.
This commit is contained in:
parent
74f91ed06c
commit
78f83d6f6a
@ -132,7 +132,7 @@ class TensorExecutor<Expression, ThreadPoolDevice, Vectorizable>
|
||||
device.enqueue_with_barrier(&barrier, &EvalRange<Evaluator, Index, Vectorizable>::run, evaluator, i*blocksize, (i+1)*blocksize);
|
||||
}
|
||||
|
||||
if (numblocks * blocksize < size) {
|
||||
if (static_cast<Index>(numblocks) * blocksize < size) {
|
||||
EvalRange<Evaluator, Index, Vectorizable>::run(evaluator, numblocks * blocksize, size);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user