From 8793a8caf89d07e2a470d06b365ee9065e8276f1 Mon Sep 17 00:00:00 2001 From: Sascha Roloff Date: Thu, 22 Feb 2024 16:10:02 +0100 Subject: Remove upper and lower bounds for FastCDC random-number generation --- src/buildtool/execution_api/execution_service/file_chunker.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src/buildtool/execution_api/execution_service/file_chunker.cpp') diff --git a/src/buildtool/execution_api/execution_service/file_chunker.cpp b/src/buildtool/execution_api/execution_service/file_chunker.cpp index 280b79a2..a4332110 100644 --- a/src/buildtool/execution_api/execution_service/file_chunker.cpp +++ b/src/buildtool/execution_api/execution_service/file_chunker.cpp @@ -28,8 +28,6 @@ constexpr std::uint64_t kMaskL{0x0000d90003530000ULL}; // 11 '1' bits // Predefined array of 256 random 64-bit integers, needs to be initialized. constexpr std::uint32_t kRandomTableSize{256}; -constexpr std::uint64_t kLowerBound{0x1000000000000000ULL}; -constexpr std::uint64_t kUpperBound{0xffffffffffffffffULL}; // NOLINTNEXTLINE(cppcoreguidelines-avoid-non-const-global-variables) std::array gear_table{}; @@ -37,9 +35,8 @@ std::array gear_table{}; auto FileChunker::Initialize(std::uint32_t seed) noexcept -> void { std::mt19937_64 gen64(seed); - std::uniform_int_distribution dist(kLowerBound, kUpperBound); for (auto& item : gear_table) { - item = dist(gen64); + item = gen64(); } } -- cgit v1.2.3