|
libmoost
|
Functions | |
| template<typename T > | |
| unsigned | log2_compat (T arg) |
| template<typename T > | |
| unsigned | log2 (T arg) |
| unsigned moost::math::integer::log2 | ( | T | arg | ) | [inline] |
Fast base-2 integer logarithm implementation
There is no run-time check catching the case of passing in zero and the result is undefined if you actually do so.
There is, however, an assertion that checks arg > 0 for debug builds.
| arg | An unsigned integer argument. |
arg. Definition at line 94 of file log2.hpp.


| unsigned moost::math::integer::log2_compat | ( | T | arg | ) | [inline] |