Lines Matching defs:BitSet32
35 struct BitSet32 { struct
38 inline BitSet32() : value(0UL) { } in BitSet32() argument
39 explicit inline BitSet32(uint32_t value) : value(value) { } in BitSet32() function
42 static inline uint32_t valueForBit(uint32_t n) { return 0x80000000UL >> n; } in valueForBit()
45 inline void clear() { clear(value); } in clear()
47 static inline void clear(uint32_t& value) { value = 0UL; } in clear()
50 inline uint32_t count() const { return count(value); } in count()
52 static inline uint32_t count(uint32_t value) { in count()
57 inline bool isEmpty() const { return isEmpty(value); } in isEmpty()
59 static inline bool isEmpty(uint32_t value) { return ! value; } in isEmpty()
62 inline bool isFull() const { return isFull(value); } in isFull()
64 static inline bool isFull(uint32_t value) { return value == 0xffffffffUL; } in isFull()
67 inline bool hasBit(uint32_t n) const { return hasBit(value, n); } in hasBit()
69 static inline bool hasBit(uint32_t value, uint32_t n) { return value & valueForBit(n); } in hasBit()
72 inline void markBit(uint32_t n) { markBit(value, n); } in markBit()
74 static inline void markBit (uint32_t& value, uint32_t n) { value |= valueForBit(n); } in markBit()
77 inline void clearBit(uint32_t n) { clearBit(value, n); } in clearBit()
79 static inline void clearBit(uint32_t& value, uint32_t n) { value &= ~ valueForBit(n); } in clearBit()
83 inline uint32_t firstMarkedBit() const { return firstMarkedBit(value); } in firstMarkedBit()
85 static uint32_t firstMarkedBit(uint32_t value) { return clz_checked(value); } in firstMarkedBit()
89 inline uint32_t firstUnmarkedBit() const { return firstUnmarkedBit(value); } in firstUnmarkedBit()
91 static inline uint32_t firstUnmarkedBit(uint32_t value) { return clz_checked(~ value); } in firstUnmarkedBit()
95 inline uint32_t lastMarkedBit() const { return lastMarkedBit(value); } in lastMarkedBit()
97 static inline uint32_t lastMarkedBit(uint32_t value) { return 31 - ctz_checked(value); } in lastMarkedBit()
101 inline uint32_t clearFirstMarkedBit() { return clearFirstMarkedBit(value); } in clearFirstMarkedBit()
103 static inline uint32_t clearFirstMarkedBit(uint32_t& value) { in clearFirstMarkedBit()
111 inline uint32_t markFirstUnmarkedBit() { return markFirstUnmarkedBit(value); } in markFirstUnmarkedBit()
113 static inline uint32_t markFirstUnmarkedBit(uint32_t& value) { in markFirstUnmarkedBit()
139 inline bool operator== (const BitSet32& other) const { return value == other.value; } argument
176 ANDROID_BASIC_TYPES_TRAITS(BitSet32) argument