We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 213071e commit 0ba4684Copy full SHA for 0ba4684
src/EntityComponentManager.cc
@@ -945,7 +945,8 @@ void EntityComponentManager::CalculateComponentThreadLoad() const
945
// Set the number of threads to spawn to the min of the calculated thread
946
// count or max threads that the hardware supports
947
this->dataPtr->numComponentThreads = std::min(numThreads, maxThreads);
948
- int componentsPerThread = numComponents / this->dataPtr->numComponentThreads;
+ int componentsPerThread = std::ceil(static_cast<double>(numComponents) /
949
+ this->dataPtr->numComponentThreads);
950
951
// Push back the starting iterator
952
this->dataPtr->entityComponentIterators.push_back(startIt);
0 commit comments