mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-25 00:52:02 +00:00
Update libdivide to the latest master
This commit is contained in:
parent
c696354dd4
commit
c5cf7199d8
@ -290,10 +290,17 @@ static inline int32_t libdivide_count_leading_zeros32(uint32_t val) {
|
|||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
#else
|
#else
|
||||||
int32_t result = 0;
|
if (val == 0)
|
||||||
uint32_t hi = 1U << 31;
|
return 32;
|
||||||
for (; ~val & hi; hi >>= 1) {
|
int32_t result = 8;
|
||||||
result++;
|
uint32_t hi = 0xFFU << 24;
|
||||||
|
while ((val & hi) == 0) {
|
||||||
|
hi >>= 8;
|
||||||
|
result += 8;
|
||||||
|
}
|
||||||
|
while (val & hi) {
|
||||||
|
result -= 1;
|
||||||
|
hi <<= 1;
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user