Lines Matching refs:value
31 uint32_t value;
33 inline BitSet32() : value(0) { }
34 explicit inline BitSet32(uint32_t value) : value(value) { }
36 // Gets the value associated with a particular bit index.
40 inline void clear() { value = 0; }
43 inline uint32_t count() const { return __builtin_popcount(value); }
46 inline bool isEmpty() const { return ! value; }
49 inline bool isFull() const { return value == 0xffffffff; }
52 inline bool hasBit(uint32_t n) const { return value & valueForBit(n); }
55 inline void markBit(uint32_t n) { value |= valueForBit(n); }
58 inline void clearBit(uint32_t n) { value &= ~ valueForBit(n); }
62 inline uint32_t firstMarkedBit() const { return __builtin_clz(value); }
66 inline uint32_t firstUnmarkedBit() const { return __builtin_clz(~ value); }
70 inline uint32_t lastMarkedBit() const { return 31 - __builtin_ctz(value); }
99 return __builtin_popcount(value & ~(0xffffffffUL >> n));
102 inline bool operator== (const BitSet32& other) const { return value == other.value; }
103 inline bool operator!= (const BitSet32& other) const { return value != other.value; }