Skip to content

[ntuple] Adapt hashing to 32-bit #18749

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

enirolf
Copy link
Contributor

@enirolf enirolf commented May 16, 2025

On 32-bit platforms or platforms where std::size_t is 32-bit instead of 64-bit, the current mix function doesn't work. The alternative added with this change also originates from the boost::hash_combine writeup linked in the RCombinedJoinFieldValueHash class documentation.

On 32-bit platforms or platforms where `std::size_t` is 32-bit instead
of 64-bit, the current `mix` function doesn't work. The alternative
added with this change also originates from the `boost::hash_combine`
writeup linked in the class documentation.
@enirolf enirolf self-assigned this May 16, 2025
Comment on lines +128 to +132
init ^= init >> 32;
init *= 0xe9846af9b1a615d;
init ^= init >> 32;
init *= 0xe9846af9b1a615d;
init ^= init >> 28;
Copy link
Member

@bellenot bellenot May 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To disable compilation warnings on Windows:

Suggested change
init ^= init >> 32;
init *= 0xe9846af9b1a615d;
init ^= init >> 32;
init *= 0xe9846af9b1a615d;
init ^= init >> 28;
#ifdef _MSC_VER
#pragma warning(push)
#pragma warning(disable:4293)
#endif
init ^= init >> 32;
init *= 0xe9846af9b1a615d;
init ^= init >> 32;
init *= 0xe9846af9b1a615d;
init ^= init >> 28;
#ifdef _MSC_VER
#pragma warning(pop)
#endif

Copy link

Test Results

    19 files      19 suites   3d 16h 22m 22s ⏱️
 2 746 tests  2 740 ✅ 0 💤 6 ❌
50 692 runs  50 686 ✅ 0 💤 6 ❌

For more details on these failures, see this check.

Results for commit b4475e9.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants