now works on 32 bit arm platforms, such as RPi#18
Open
zertyz wants to merge 3 commits intoskarupke:masterfrom
Open
now works on 32 bit arm platforms, such as RPi#18zertyz wants to merge 3 commits intoskarupke:masterfrom
zertyz wants to merge 3 commits intoskarupke:masterfrom
Conversation
Radfordhound
added a commit
to Radfordhound/HedgeLib
that referenced
this pull request
Jan 3, 2020
flat_hash_map 32-bit fixes adapted from this PR: skarupke/flat_hash_map#18
|
Thank you for your changes, I included them in my copy of the code. I had a small problem, though. Your check for 32 or 64 bit systems does not handle AArch64 correctly, which leads to segmentation faults on that platform. Since quite some people seem to copy the changes from this pull request, you might want to add this fix. |
saierd
reviewed
Feb 26, 2020
flat_hash_map.hpp
Outdated
|
|
||
| // Check GCC | ||
| #if __GNUC__ | ||
| #if __x86_64__ || __ppc64__ |
There was a problem hiding this comment.
Should be:
#if __x86_64__ || __ppc64__ || __aarch64__
william-silversmith
added a commit
to seung-lab/fastremap
that referenced
this pull request
May 25, 2022
william-silversmith
added a commit
to seung-lab/fastremap
that referenced
this pull request
May 25, 2022
* perf: switch to ska::flat_hash_map instead of std::unordered_map Small ~10% improvement to connectomics.npy renumber, but ~45% improvement to a random array. * fix: support 32-bit skarupke/flat_hash_map#18 * fix: allocate default table Avoids problems with dynamic library situations: skarupke/flat_hash_map#26 * fix: use more compatible definition of void_t * docs: update comment date
pps83
reviewed
Mar 12, 2023
| #pragma once | ||
|
|
||
| // Check windows | ||
| #if _WIN32 || _WIN64 |
There was a problem hiding this comment.
Suggested change
| #if _WIN32 || _WIN64 | |
| #if SIZE_MAX == UINT64_MAX |
same goes for every other place
ya-solnyshko
suggested changes
May 31, 2023
ya-solnyshko
left a comment
There was a problem hiding this comment.
This code:
int8_t next_size_over(size_t & size) const
{
size = std::max(size_t(2), detailv3::next_power_of_two(size));
return 64 - detailv3::log2(size);
}
void commit(int8_t shift)
{
this->shift = shift;
}
void reset()
{
shift = 63;
}
private:
int8_t shift = 63;
also shall be adapted for 32 bits, because shift by more than 32 bits is UB
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.