• Home
  • Raw
  • Download

Lines Matching defs:BitSet32

30 struct BitSet32 {  struct
33 inline BitSet32() : value(0UL) { } in BitSet32() function
34 explicit inline BitSet32(uint32_t value) : value(value) { } in BitSet32() function
37 static inline uint32_t valueForBit(uint32_t n) { return 0x80000000UL >> n; } in valueForBit()
40 inline void clear() { clear(value); } in clear()
42 static inline void clear(uint32_t& value) { value = 0UL; } in clear()
45 inline uint32_t count() const { return count(value); } in count()
47 static inline uint32_t count(uint32_t value) { return __builtin_popcountl(value); } in count()
50 inline bool isEmpty() const { return isEmpty(value); } in isEmpty()
52 static inline bool isEmpty(uint32_t value) { return ! value; } in isEmpty()
55 inline bool isFull() const { return isFull(value); } in isFull()
57 static inline bool isFull(uint32_t value) { return value == 0xffffffffUL; } in isFull()
60 inline bool hasBit(uint32_t n) const { return hasBit(value, n); } in hasBit()
62 static inline bool hasBit(uint32_t value, uint32_t n) { return value & valueForBit(n); } in hasBit()
65 inline void markBit(uint32_t n) { markBit(value, n); } in markBit()
67 static inline void markBit (uint32_t& value, uint32_t n) { value |= valueForBit(n); } in markBit()
70 inline void clearBit(uint32_t n) { clearBit(value, n); } in clearBit()
72 static inline void clearBit(uint32_t& value, uint32_t n) { value &= ~ valueForBit(n); } in clearBit()
76 inline uint32_t firstMarkedBit() const { return firstMarkedBit(value); } in firstMarkedBit()
78 static uint32_t firstMarkedBit(uint32_t value) { return clz_checked(value); } in firstMarkedBit()
82 inline uint32_t firstUnmarkedBit() const { return firstUnmarkedBit(value); } in firstUnmarkedBit()
84 static inline uint32_t firstUnmarkedBit(uint32_t value) { return clz_checked(~ value); } in firstUnmarkedBit()
88 inline uint32_t lastMarkedBit() const { return lastMarkedBit(value); } in lastMarkedBit()
90 static inline uint32_t lastMarkedBit(uint32_t value) { return 31 - ctz_checked(value); } in lastMarkedBit()
94 inline uint32_t clearFirstMarkedBit() { return clearFirstMarkedBit(value); } in clearFirstMarkedBit()
96 static inline uint32_t clearFirstMarkedBit(uint32_t& value) { in clearFirstMarkedBit()
104 inline uint32_t markFirstUnmarkedBit() { return markFirstUnmarkedBit(value); } in markFirstUnmarkedBit()
106 static inline uint32_t markFirstUnmarkedBit(uint32_t& value) { in markFirstUnmarkedBit()
132 inline bool operator== (const BitSet32& other) const { return value == other.value; } argument
169 ANDROID_BASIC_TYPES_TRAITS(BitSet32) argument