Skip to content
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

Add support for 32bit systems by falling back to std::unordered_map #56

Merged
merged 1 commit into from
May 27, 2024

Conversation

juntyr
Copy link
Contributor

@juntyr juntyr commented May 23, 2024

Compiling SZ3 on 32bit systems (wasm32 in my use case) fails because of the ska_hash implementation, which expects that size_t is 64b wide. While there have been attempts to port ska_hash to 32 bits, e.g. in skarupke/flat_hash_map#18, pulling in those changes would place the maintenance burden on SZ3.

In this PR, I'm instead suggesting a simpler solution by falling back to the std::unordered_map implementation on non-64bit systems, where ska::unordered_map is not available. This immediately unlocks 32bit support with a minimal code change.

@ayzk ayzk merged commit 3f47817 into szcompressor:master May 27, 2024
@ayzk
Copy link
Collaborator

ayzk commented May 27, 2024

Thanks for this PR.

@juntyr juntyr deleted the 32bit-hash branch May 27, 2024 18:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants