Skip to content

Commit e517f39

Browse files
committed
1 parent a2d64d2 commit e517f39

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

include/gaia/external/robin_hood.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -933,7 +933,7 @@ namespace robin_hood {
933933
static constexpr uint32_t InitialInfoNumBits = 5;
934934
static constexpr uint8_t InitialInfoInc = 1U << InitialInfoNumBits;
935935
static constexpr size_t InfoMask = InitialInfoInc - 1U;
936-
static constexpr uint8_t InitialInfoHashShift = 0;
936+
static constexpr uint8_t InitialInfoHashShift = 64U - InitialInfoNumBits;
937937
using DataPool = detail::NodeAllocator<value_type, 4, 16384, IsFlat>;
938938

939939
// type needs to be wider than uint8_t.
@@ -1331,8 +1331,8 @@ namespace robin_hood {
13311331
h ^= h >> 33U;
13321332

13331333
// the lower InitialInfoNumBits are reserved for info.
1334-
*info = mInfoInc + static_cast<InfoType>((h & InfoMask) >> mInfoHashShift);
1335-
*idx = (static_cast<size_t>(h) >> InitialInfoNumBits) & mMask;
1334+
*info = mInfoInc + static_cast<InfoType>(h >> mInfoHashShift);
1335+
*idx = (static_cast<size_t>(h)) & mMask;
13361336
}
13371337

13381338
// forwards the index by one, wrapping around at the end

0 commit comments

Comments
 (0)