mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
Prevent potential overflow.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user