ClickHouse/dbms/include/DB/Common/BitHelpers.h

7 lines
128 B
C++
Raw Normal View History

2016-03-07 06:18:06 +00:00
#pragma once
inline unsigned int bit_scan_reverse(unsigned int x)
{
return sizeof(unsigned int) * 8 - 1 - __builtin_clz(x);
}