From 07597d64c2b6edbcd08f6cd7b39f9b8576348259 Mon Sep 17 00:00:00 2001 From: Kenneth Heafield Date: Sun, 22 Oct 2017 22:29:58 +0100 Subject: [PATCH] Change RoundBuckets to uint64_t Should fix #105 --- util/probing_hash_table.hh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/util/probing_hash_table.hh b/util/probing_hash_table.hh index 438de92fb..18cae85cd 100644 --- a/util/probing_hash_table.hh +++ b/util/probing_hash_table.hh @@ -30,7 +30,7 @@ class DivMod { public: explicit DivMod(std::size_t buckets) : buckets_(buckets) {} - static std::size_t RoundBuckets(std::size_t from) { + static std::uint64_t RoundBuckets(std::uint64_t from) { return from; } @@ -58,7 +58,7 @@ class Power2Mod { } // Round up to next power of 2. - static std::size_t RoundBuckets(std::size_t from) { + static std::uint64_t RoundBuckets(std::uint64_t from) { --from; from |= from >> 1; from |= from >> 2;