MCPcopy Create free account
hub / github.com/CodingGay/BlackDex / JAVASTYLE_CLZ

Function JAVASTYLE_CLZ

Bcore/src/main/cpp/base/bit_utils.h:61–65  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

59// Similar to CLZ except that on zero input it returns bitwidth and supports signed integers.
60template<typename T>
61constexpr int JAVASTYLE_CLZ(T x) {
62 static_assert(std::is_integral<T>::value, "T must be integral");
63 using unsigned_type = typename std::make_unsigned<T>::type;
64 return (x == 0) ? BitSizeOf<T>() : CLZ(static_cast<unsigned_type>(x));
65}
66
67template<typename T>
68constexpr int CTZ(T x) {

Callers

nothing calls this directly

Calls 1

CLZFunction · 0.85

Tested by

no test coverage detected