Home
last modified time | relevance | path

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

/frameworks/base/include/utils/
DBitSet.h29 struct BitSet32 { struct
32 inline BitSet32() : value(0) { } in BitSet32() function
33 explicit inline BitSet32(uint32_t value) : value(value) { } in BitSet32() function
36 static inline uint32_t valueForBit(uint32_t n) { return 0x80000000 >> n; } in valueForBit()
39 inline void clear() { value = 0; } in clear()
42 inline uint32_t count() const { return __builtin_popcount(value); } in count()
45 inline bool isEmpty() const { return ! value; } in isEmpty()
48 inline bool isFull() const { return value == 0xffffffff; } in isFull()
51 inline bool hasBit(uint32_t n) const { return value & valueForBit(n); } in hasBit()
54 inline void markBit(uint32_t n) { value |= valueForBit(n); } in markBit()
[all …]