"bit scan reverse": Return index of the highest bit (or MI_INTPTR_BITS if `x` is zero)
| 1036 | |
| 1037 | // "bit scan reverse": Return index of the highest bit (or MI_INTPTR_BITS if `x` is zero) |
| 1038 | static 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 | // --------------------------------------------------------------------------------- |
no test coverage detected