Home
last modified time | relevance | path

Searched defs:BitSet32 (Results 1 – 1 of 1) sorted by relevance

/frameworks/native/include/utils/
DBitSet.h30 struct BitSet32 { struct
33 inline BitSet32() : value(0) { } in BitSet32() argument
34 explicit inline BitSet32(uint32_t value) : value(value) { } in BitSet32() argument
37 static inline uint32_t valueForBit(uint32_t n) { return 0x80000000 >> n; } in valueForBit()
40 inline void clear() { value = 0; } in clear()
43 inline uint32_t count() const { return __builtin_popcount(value); } in count()
46 inline bool isEmpty() const { return ! value; } in isEmpty()
49 inline bool isFull() const { return value == 0xffffffff; } in isFull()
52 inline bool hasBit(uint32_t n) const { return value & valueForBit(n); } in hasBit()
55 inline void markBit(uint32_t n) { value |= valueForBit(n); } in markBit()
[all …]