Home
last modified time | relevance | path

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

/frameworks/av/media/libstagefright/foundation/include/media/stagefright/foundation/
DFlagged.h116 static constexpr Flag topBits(int num) { in topBits() function
173 shift >= 0 && (mask & topBits<Flag>(shift)) == 0 && in canCombine()
221 ((mask & topBits<Flag>(1)) || (mask < 0)) ? -1 : in getShift()
352 static_assert((_Flagged_helper::topBits<Flag>(SHIFT) & MASK) == 0, "SHIFT overflows MASK");
/frameworks/av/media/libstagefright/foundation/tests/
DFlagged_test.cpp290 static_assert(helper::topBits<u32>(0) == 0U, "top 0 bit"); in TEST_F()
291 static_assert(helper::topBits<u32>(1) == 0x80000000U, "top 1 bit"); in TEST_F()
292 static_assert(helper::topBits<u32>(2) == 0xC0000000U, "top 2 bits"); in TEST_F()
293 static_assert(helper::topBits<u32>(12) == 0xFFF00000U, "top 12 bits"); in TEST_F()
294 static_assert(helper::topBits<u32>(32) == 0xFFFFFFFFU, "all bits"); in TEST_F()
297 static_assert(helper::topBits<u8>(0) == 0U, "top 0 bit"); in TEST_F()
298 static_assert(helper::topBits<u8>(1) == 0x80U, "top 1 bit"); in TEST_F()
299 static_assert(helper::topBits<u8>(2) == 0xC0U, "top 2 bit"); in TEST_F()
300 static_assert(helper::topBits<u8>(8) == 0xFFU, "all bits"); in TEST_F()