* Returns 0 - based position of the most significant bit (compile time) * 0 for 0. */
| 318 | * 0 for 0. |
| 319 | */ |
| 320 | constexpr ui64 MostSignificantBitCT(ui64 x) { |
| 321 | return x > 1 ? 1 + MostSignificantBitCT(x >> 1) : 0; |
| 322 | } |
| 323 | |
| 324 | /* |
| 325 | * Return rounded up binary logarithm of `x`. |