Skip to content

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

Merged
ayzk merged 1 commit intoszcompressor:masterfrom
juntyr:32bit-hash
May 27, 2024
Merged

Add support for 32bit systems by falling back to std::unordered_map#56
ayzk merged 1 commit intoszcompressor:masterfrom
juntyr:32bit-hash

Conversation

@juntyr
Copy link
Copy Markdown
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
Copy Markdown
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