Lines Matching refs:value

36     uint32_t value;  member
38 inline BitSet32() : value(0UL) { } in BitSet32()
39 explicit inline BitSet32(uint32_t value) : value(value) { } in BitSet32()
45 inline void clear() { clear(value); } in clear()
47 static inline void clear(uint32_t& value) { value = 0UL; } in clear()
50 inline uint32_t count() const { return count(value); } in count()
52 static inline uint32_t count(uint32_t value) { in count()
53 return static_cast<uint32_t>(__builtin_popcountl(value)); in count()
57 inline bool isEmpty() const { return isEmpty(value); } in isEmpty()
59 static inline bool isEmpty(uint32_t value) { return ! value; } in isEmpty()
62 inline bool isFull() const { return isFull(value); } in isFull()
64 static inline bool isFull(uint32_t value) { return value == 0xffffffffUL; } in isFull()
67 inline bool hasBit(uint32_t n) const { return hasBit(value, n); } in hasBit()
69 static inline bool hasBit(uint32_t value, uint32_t n) { return value & valueForBit(n); } in hasBit()
72 inline void markBit(uint32_t n) { markBit(value, n); } in markBit()
74 static inline void markBit (uint32_t& value, uint32_t n) { value |= valueForBit(n); } in markBit()
77 inline void clearBit(uint32_t n) { clearBit(value, n); } in clearBit()
79 static inline void clearBit(uint32_t& value, uint32_t n) { value &= ~ valueForBit(n); } in clearBit()
83 inline uint32_t firstMarkedBit() const { return firstMarkedBit(value); } in firstMarkedBit()
85 static uint32_t firstMarkedBit(uint32_t value) { return clz_checked(value); } in firstMarkedBit()
89 inline uint32_t firstUnmarkedBit() const { return firstUnmarkedBit(value); } in firstUnmarkedBit()
91 static inline uint32_t firstUnmarkedBit(uint32_t value) { return clz_checked(~ value); } in firstUnmarkedBit()
95 inline uint32_t lastMarkedBit() const { return lastMarkedBit(value); } in lastMarkedBit()
97 static inline uint32_t lastMarkedBit(uint32_t value) { return 31 - ctz_checked(value); } in lastMarkedBit()
101 inline uint32_t clearFirstMarkedBit() { return clearFirstMarkedBit(value); } in clearFirstMarkedBit()
103 static inline uint32_t clearFirstMarkedBit(uint32_t& value) { in clearFirstMarkedBit()
104 uint32_t n = firstMarkedBit(value); in clearFirstMarkedBit()
105 clearBit(value, n); in clearFirstMarkedBit()
111 inline uint32_t markFirstUnmarkedBit() { return markFirstUnmarkedBit(value); } in markFirstUnmarkedBit()
113 static inline uint32_t markFirstUnmarkedBit(uint32_t& value) { in markFirstUnmarkedBit()
114 uint32_t n = firstUnmarkedBit(value); in markFirstUnmarkedBit()
115 markBit(value, n); in markFirstUnmarkedBit()
121 inline uint32_t clearLastMarkedBit() { return clearLastMarkedBit(value); } in clearLastMarkedBit()
123 static inline uint32_t clearLastMarkedBit(uint32_t& value) { in clearLastMarkedBit()
124 uint32_t n = lastMarkedBit(value); in clearLastMarkedBit()
125 clearBit(value, n); in clearLastMarkedBit()
132 return getIndexOfBit(value, n); in getIndexOfBit()
135 static inline uint32_t getIndexOfBit(uint32_t value, uint32_t n) { in getIndexOfBit()
136 return static_cast<uint32_t>(__builtin_popcountl(value & ~(0xffffffffUL >> n))); in getIndexOfBit()
139 inline bool operator== (const BitSet32& other) const { return value == other.value; }
140 inline bool operator!= (const BitSet32& other) const { return value != other.value; }
142 return BitSet32(value & other.value);
145 value &= other.value;
149 return BitSet32(value | other.value);
152 value |= other.value;
159 static inline uint32_t clz_checked(uint32_t value) { in clz_checked()
161 return static_cast<uint32_t>(__builtin_clz(value)); in clz_checked()
163 return static_cast<uint32_t>(__builtin_clzl(value)); in clz_checked()
167 static inline uint32_t ctz_checked(uint32_t value) { in ctz_checked()
169 return static_cast<uint32_t>(__builtin_ctz(value)); in ctz_checked()
171 return static_cast<uint32_t>(__builtin_ctzl(value)); in ctz_checked()
180 uint64_t value; member
182 inline BitSet64() : value(0ULL) { } in BitSet64()
183 explicit inline BitSet64(uint64_t value) : value(value) { } in BitSet64()
189 inline void clear() { clear(value); } in clear()
191 static inline void clear(uint64_t& value) { value = 0ULL; } in clear()
194 inline uint32_t count() const { return count(value); } in count()
196 static inline uint32_t count(uint64_t value) { in count()
197 return static_cast<uint32_t>(__builtin_popcountll(value)); in count()
201 inline bool isEmpty() const { return isEmpty(value); } in isEmpty()
203 static inline bool isEmpty(uint64_t value) { return ! value; } in isEmpty()
206 inline bool isFull() const { return isFull(value); } in isFull()
208 static inline bool isFull(uint64_t value) { return value == 0xffffffffffffffffULL; } in isFull()
211 inline bool hasBit(uint32_t n) const { return hasBit(value, n); } in hasBit()
213 static inline bool hasBit(uint64_t value, uint32_t n) { return value & valueForBit(n); } in hasBit()
216 inline void markBit(uint32_t n) { markBit(value, n); } in markBit()
218 static inline void markBit(uint64_t& value, uint32_t n) { value |= valueForBit(n); } in markBit()
221 inline void clearBit(uint32_t n) { clearBit(value, n); } in clearBit()
223 static inline void clearBit(uint64_t& value, uint32_t n) { value &= ~ valueForBit(n); } in clearBit()
227 inline uint32_t firstMarkedBit() const { return firstMarkedBit(value); } in firstMarkedBit()
229 static inline uint32_t firstMarkedBit(uint64_t value) { in firstMarkedBit()
230 return static_cast<uint32_t>(__builtin_clzll(value)); in firstMarkedBit()
235 inline uint32_t firstUnmarkedBit() const { return firstUnmarkedBit(value); } in firstUnmarkedBit()
237 static inline uint32_t firstUnmarkedBit(uint64_t value) { in firstUnmarkedBit()
238 return static_cast<uint32_t>(__builtin_clzll(~value)); in firstUnmarkedBit()
243 inline uint32_t lastMarkedBit() const { return lastMarkedBit(value); } in lastMarkedBit()
245 static inline uint32_t lastMarkedBit(uint64_t value) { in lastMarkedBit()
246 return static_cast<uint32_t>(63 - __builtin_ctzll(value)); in lastMarkedBit()
251 inline uint32_t clearFirstMarkedBit() { return clearFirstMarkedBit(value); } in clearFirstMarkedBit()
253 static inline uint32_t clearFirstMarkedBit(uint64_t& value) { in clearFirstMarkedBit()
254 uint32_t n = firstMarkedBit(value); in clearFirstMarkedBit()
255 clearBit(value, n); in clearFirstMarkedBit()
261 inline uint32_t markFirstUnmarkedBit() { return markFirstUnmarkedBit(value); } in markFirstUnmarkedBit()
263 static inline uint32_t markFirstUnmarkedBit(uint64_t& value) { in markFirstUnmarkedBit()
264 uint32_t n = firstUnmarkedBit(value); in markFirstUnmarkedBit()
265 markBit(value, n); in markFirstUnmarkedBit()
271 inline uint32_t clearLastMarkedBit() { return clearLastMarkedBit(value); } in clearLastMarkedBit()
273 static inline uint32_t clearLastMarkedBit(uint64_t& value) { in clearLastMarkedBit()
274 uint32_t n = lastMarkedBit(value); in clearLastMarkedBit()
275 clearBit(value, n); in clearLastMarkedBit()
281 inline uint32_t getIndexOfBit(uint32_t n) const { return getIndexOfBit(value, n); } in getIndexOfBit()
283 static inline uint32_t getIndexOfBit(uint64_t value, uint32_t n) { in getIndexOfBit()
284 return static_cast<uint32_t>(__builtin_popcountll(value & ~(0xffffffffffffffffULL >> n))); in getIndexOfBit()
287 inline bool operator== (const BitSet64& other) const { return value == other.value; }
288 inline bool operator!= (const BitSet64& other) const { return value != other.value; }
290 return BitSet64(value & other.value);
293 value &= other.value;
297 return BitSet64(value | other.value);
300 value |= other.value;