diff options
| author | Kimplul <kimi.h.kuparinen@gmail.com> | 2025-10-16 21:02:04 +0300 |
|---|---|---|
| committer | Kimplul <kimi.h.kuparinen@gmail.com> | 2025-10-16 21:02:04 +0300 |
| commit | 717eb9512cbd98e965c1b842cbc9d84e218c37c2 (patch) | |
| tree | a3e57144af6c9325e8ea77b30f582ff905e571f2 /include | |
| parent | 2176169257505d22021fc9a739c9f2090c514cb4 (diff) | |
| download | conts-717eb9512cbd98e965c1b842cbc9d84e218c37c2.tar.gz conts-717eb9512cbd98e965c1b842cbc9d84e218c37c2.zip | |
fix bucket calculation on 32bit
Diffstat (limited to 'include')
| -rw-r--r-- | include/conts/spvec.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/conts/spvec.h b/include/conts/spvec.h index d557fa8..92105b3 100644 --- a/include/conts/spvec.h +++ b/include/conts/spvec.h @@ -40,9 +40,9 @@ static inline size_t conts_spvec_bucket(size_t i) if (i < 64) return 0; - /** @todo fallback for __builtin_clzll, C23 has std_count_leading_zeroes + /** @todo fallback for __builtin_clzll, C23 has stdc_leading_zeroes * but might want to go for a simple loop for maximum compatibility? */ - return (8 * sizeof(size_t)) - __builtin_clzll(i) - 6; + return (8 * sizeof(unsigned long long)) - __builtin_clzll(i) - 6; } static inline size_t conts_spvec_size(size_t b) |
