Mesa (main): aco/util: replace DIV_ROUND_UP(n+1,m) by n/m+1
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Mon Jul 12 12:25:50 UTC 2021
Module: Mesa
Branch: main
Commit: 452c4c8ba1de89707b0ded466b9188eff2c80c73
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=452c4c8ba1de89707b0ded466b9188eff2c80c73
Author: Daniel Schürmann <daniel at schuermann.dev>
Date: Wed Jun 9 15:35:08 2021 +0200
aco/util: replace DIV_ROUND_UP(n+1,m) by n/m+1
Reviewed-by: Tony Wasserka <tony.wasserka at gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11271>
---
src/amd/compiler/aco_util.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/amd/compiler/aco_util.h b/src/amd/compiler/aco_util.h
index a4eb7aed2a2..af4addd5f72 100644
--- a/src/amd/compiler/aco_util.h
+++ b/src/amd/compiler/aco_util.h
@@ -283,7 +283,7 @@ struct IDSet {
std::pair<Iterator, bool> insert(uint32_t id) {
if (words.size() * 64u <= id)
- words.resize(DIV_ROUND_UP(id + 1, 64u));
+ words.resize(id / 64u + 1);
Iterator it;
it.set = this;
More information about the mesa-commit
mailing list