Searched defs:BitSet32 (Results 1 – 1 of 1) sorted by relevance
29 struct BitSet32 { struct32 inline BitSet32() : value(0) { } in BitSet32() function33 explicit inline BitSet32(uint32_t value) : value(value) { } in BitSet32() function36 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 …]