MCPcopy Create free account
hub / github.com/CppCXY/EmmyLuaCodeStyle / mi_bsr

Function mi_bsr

3rd/mimalloc-2.0.9/include/mimalloc-internal.h:1038–1040  ·  view source on GitHub ↗

"bit scan reverse": Return index of the highest bit (or MI_INTPTR_BITS if `x` is zero)

Source from the content-addressed store, hash-verified

1036
1037// "bit scan reverse": Return index of the highest bit (or MI_INTPTR_BITS if `x` is zero)
1038static inline size_t mi_bsr(uintptr_t x) {
1039 return (x==0 ? MI_INTPTR_BITS : MI_INTPTR_BITS - 1 - mi_clz(x));
1040}
1041
1042
1043// ---------------------------------------------------------------------------------

Callers 5

segment-cache.cFile · 0.85
mi_unix_mmapxFunction · 0.85
mi_slice_bin8Function · 0.85
mi_binFunction · 0.85

Calls 1

mi_clzFunction · 0.85

Tested by

no test coverage detected