mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-25 05:24:02 +08:00
Add Math::divideAndRoundUp helper function
Add usage of the function where applicable Change-Id: I9c41ad37009d1f088fa1917d30525194a10d3061 Signed-off-by: Filip Hazubski <filip.hazubski@intel.com>
This commit is contained in:
committed by
sys_ocldev
parent
e0594d4716
commit
81cd28e0f4
@@ -175,4 +175,8 @@ constexpr T ffs(T v) {
|
||||
std::abort();
|
||||
}
|
||||
|
||||
constexpr size_t divideAndRoundUp(size_t dividend, size_t divisor) {
|
||||
return (dividend + divisor - 1) / divisor;
|
||||
}
|
||||
|
||||
} // namespace Math
|
||||
|
||||
Reference in New Issue
Block a user