Skip to content

Conversation

@sleeepyjack
Copy link
Collaborator

This PR fixes some issues in the helper function for converting a hash value into a valid size.

Hash values are always unsigned, but the size type is set by the user and can thus be any integer type.
The problem occurs when the size type is signed and the hash value exceeds the range of the size type (see repro).

The proposed solution fixes this: https://godbolt.org/z/46fqEaaEx
The thread_rank parameter can be defaulted for non-CG probing, and I also double-checked that the compiler is able to use that information to apply optimizations: https://godbolt.org/z/x3b6c1aMh

@sleeepyjack sleeepyjack added the type: bug Something isn't working label Aug 31, 2023
@PointKernel
Copy link
Member

Can you please add a test exercising this?

@PointKernel PointKernel added the Needs Review Awaiting reviews before merging label Aug 31, 2023
@sleeepyjack sleeepyjack added In Progress Currently a work in progress and removed Needs Review Awaiting reviews before merging labels Oct 7, 2023
@sleeepyjack sleeepyjack marked this pull request as draft October 7, 2023 00:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

In Progress Currently a work in progress type: bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants