TensorReduction: replace divup with div_ceil

This commit is contained in:
Charles Schlosser 2023-10-25 16:44:34 +00:00 committed by Rasmus Munk Larsen
parent 5de0f2f89e
commit 1aac9332ce

View File

@ -271,7 +271,7 @@ struct InnerMostDimReducer<Self, Op, true, true> {
// Make sure the split point is aligned on a packet boundary. // Make sure the split point is aligned on a packet boundary.
const typename Self::Index split = const typename Self::Index split =
packetSize * packetSize *
divup(firstIndex + divup(numValuesToReduce, typename Self::Index(2)), numext::div_ceil(firstIndex + numext::div_ceil(numValuesToReduce, typename Self::Index(2)),
packetSize); packetSize);
const typename Self::Index num_left = const typename Self::Index num_left =
numext::mini(split - firstIndex, numValuesToReduce); numext::mini(split - firstIndex, numValuesToReduce);