diff options
author | MarcoFalke <falke.marco@gmail.com> | 2022-01-06 14:54:06 +0100 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2022-01-06 14:54:12 +0100 |
commit | 70395bab4ef597c4cf20fa5edd00332c84b8a81a (patch) | |
tree | e344ae2c9939571da0390d4fc4a438168d299c1e /src/test/fuzz | |
parent | 3917dff732b48e1b994dc199f91d11e9074e449f (diff) | |
parent | df2307cdc3d08233d17beb9a50c144baaef1f44e (diff) |
Merge bitcoin/bitcoin#23760: util: move MapIntoRange() for reuse in fuzz tests
df2307cdc3d08233d17beb9a50c144baaef1f44e util: move MapIntoRange() for reuse in fuzz tests (fanquake)
Pull request description:
ACKs for top commit:
shaavan:
ACK df2307cdc3d08233d17beb9a50c144baaef1f44e
Tree-SHA512: 31bf18f50a82e442ff025d6be0db5666b463a1fc16ec6b2112c77bb815515d27f8a537a0c9934c7daa3f4d526b47e8d6333f75a13b271e6efa550f8e71504b0a
Diffstat (limited to 'src/test/fuzz')
-rw-r--r-- | src/test/fuzz/golomb_rice.cpp | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/src/test/fuzz/golomb_rice.cpp b/src/test/fuzz/golomb_rice.cpp index d6879067b8..2d0b29953c 100644 --- a/src/test/fuzz/golomb_rice.cpp +++ b/src/test/fuzz/golomb_rice.cpp @@ -19,20 +19,6 @@ #include <vector> namespace { -uint64_t MapIntoRange(const uint64_t x, const uint64_t n) -{ - const uint64_t x_hi = x >> 32; - const uint64_t x_lo = x & 0xFFFFFFFF; - const uint64_t n_hi = n >> 32; - const uint64_t n_lo = n & 0xFFFFFFFF; - const uint64_t ac = x_hi * n_hi; - const uint64_t ad = x_hi * n_lo; - const uint64_t bc = x_lo * n_hi; - const uint64_t bd = x_lo * n_lo; - const uint64_t mid34 = (bd >> 32) + (bc & 0xFFFFFFFF) + (ad & 0xFFFFFFFF); - const uint64_t upper64 = ac + (bc >> 32) + (ad >> 32) + (mid34 >> 32); - return upper64; -} uint64_t HashToRange(const std::vector<uint8_t>& element, const uint64_t f) { |