Skip to content

Commit 477763e

Browse files
committed
DivideRoundingUp
1 parent d06d039 commit 477763e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/Driver/Compilation.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1366,15 +1366,15 @@ namespace driver {
13661366
// be compiled in 2 batches. Integer division yields 26/25 = 1 batch, but
13671367
// a single batch of 26 exceeds the limit. The calculation must round up,
13681368
// which can be calculated using: `(x + y - 1) / y`
1369-
auto DivideUp = [](size_t Num, size_t Div) -> size_t {
1369+
auto DivideRoundingUp = [](size_t Num, size_t Div) -> size_t {
13701370
return (Num + Div - 1) / Div;
13711371
};
13721372

13731373
size_t DefaultSizeLimit = 25;
13741374
size_t NumTasks = TQ->getNumberOfParallelTasks();
13751375
size_t NumFiles = PendingExecution.size();
13761376
size_t SizeLimit = Comp.getBatchSizeLimit().getValueOr(DefaultSizeLimit);
1377-
return std::max(NumTasks, DivideUp(NumFiles, SizeLimit));
1377+
return std::max(NumTasks, DivideRoundingUp(NumFiles, SizeLimit));
13781378
}
13791379

13801380
/// Select jobs that are batch-combinable from \c PendingExecution, combine

0 commit comments

Comments
 (0)