Consolidate multiple implementations of divup/div_up/div_ceil.

This commit is contained in:
Rasmus Munk Larsen
2023-10-10 17:16:59 +00:00
parent e8515f78ac
commit a96545777b
12 changed files with 71 additions and 79 deletions

View File

@@ -215,7 +215,7 @@ EIGEN_STRONG_INLINE Index AdjustBlockSize(Index item_size, Index block_size) {
EIGEN_CONSTEXPR Index kBlockAlignment = 128;
const Index items_per_cacheline =
numext::maxi<Index>(1, kBlockAlignment / item_size);
return items_per_cacheline * divup(block_size, items_per_cacheline);
return items_per_cacheline * numext::div_ceil(block_size, items_per_cacheline);
}
template <typename Self>