ClickHouse/dbms/include/DB/Common/BitHelpers.h
2016-06-07 11:23:15 +03:00

7 lines
128 B
C++

#pragma once
inline unsigned int bit_scan_reverse(unsigned int x)
{
return sizeof(unsigned int) * 8 - 1 - __builtin_clz(x);
}