MCPcopy Create free account
hub / github.com/SakuraEngine/SakuraEngine / countl_zero

Function countl_zero

modules/core/base/include/SkrBase/misc/bit.hpp:96–104  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

94// 得到 bit 中左(高位起)和右(低位起)的 0 个数
95template <typename T>
96SKR_INLINE constexpr T countl_zero(T v)
97{
98 static_assert(std::is_integral_v<T> && !std::is_signed_v<T>);
99#if SKR_CXX_VERSION >= 20
100 return std::countl_zero(v);
101#else
102 return detail::countl_zero_fallback(v);
103#endif
104}
105template <typename T>
106SKR_INLINE constexpr T countr_zero(T v)
107{

Callers 9

countr_zero_fallbackFunction · 0.85
countl_oneFunction · 0.85
bit_widthFunction · 0.85
bit_floorFunction · 0.85
bit_ceilFunction · 0.85
bit_floor_log2Function · 0.85
bit_ceil_log2Function · 0.85
bit.hFile · 0.85

Calls 1

countl_zero_fallbackFunction · 0.85

Tested by

no test coverage detected