Home
last modified time | relevance | path

Searched refs:ConstexprLog2 (Results 1 – 2 of 2) sorted by relevance

/third_party/skia/third_party/externals/dawn/src/tests/unittests/
DMathTests.cpp57 static_assert(ConstexprLog2(1u) == 0u, ""); in TEST()
58 static_assert(ConstexprLog2(0xFFFFFFFFu) == 31u, ""); in TEST()
59 static_assert(ConstexprLog2(static_cast<uint64_t>(0xFFFFFFFFFFFFFFFF)) == 63u, ""); in TEST()
67 static_assert(ConstexprLog2(0x80000000u) == 31u, ""); in TEST()
68 static_assert(ConstexprLog2(0x7FFFFFFFu) == 30u, ""); in TEST()
69 static_assert(ConstexprLog2(static_cast<uint64_t>(0x8000000000000000)) == 63u, ""); in TEST()
70 static_assert(ConstexprLog2(static_cast<uint64_t>(0x7FFFFFFFFFFFFFFF)) == 62u, ""); in TEST()
75 static_assert(ConstexprLog2(16u) == 4u, ""); in TEST()
76 static_assert(ConstexprLog2(15u) == 3u, ""); in TEST()
/third_party/skia/third_party/externals/dawn/src/common/
DMath.h34 constexpr uint32_t ConstexprLog2(uint64_t v) { in ConstexprLog2() function
35 return v <= 1 ? 0 : 1 + ConstexprLog2(v / 2); in ConstexprLog2()
39 return v <= 1 ? 0 : ConstexprLog2(v - 1) + 1; in ConstexprLog2Ceil()