:heavy_check_mark: math/ceil_pow2.hpp

Required by

Verified with

Code

int ceil_pow2(int n) {
    int x = 0;
    while ((1U << x) < (unsigned int)(n)) x++;
    return x;
}
#line 1 "math/ceil_pow2.hpp"
int ceil_pow2(int n) {
    int x = 0;
    while ((1U << x) < (unsigned int)(n)) x++;
    return x;
}
Back to top page