MCPcopy Create free account
hub / github.com/GaijinEntertainment/daScript / das_clz

Function das_clz

include/daScript/misc/platform.h:157–161  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

155
156#if defined(_MSC_VER)
157 __forceinline uint32_t das_clz(uint32_t x) {
158 unsigned long r = 0;
159 _BitScanReverse(&r, x);
160 return uint32_t(31 - r);
161 }
162 __forceinline uint32_t das_ctz(uint32_t x) {
163 unsigned long r = 0;
164 _BitScanForward(&r, x);

Callers 2

uint32_clzFunction · 0.85
allocateMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected