Home | History | Annotate | Download | only in ADT

Lines Matching defs:Bits

30 /// storing the elements that have non-zero bits set.  In order to make this
37 /// enormous amounts of time with a large amount of bits. Other structures that
55 BitWord Bits[BITWORDS_PER_ELEMENT];
59 memset(&Bits[0], 0, sizeof (BitWord) * BITWORDS_PER_ELEMENT);
65 memset(&Bits[0], 0, sizeof (BitWord) * BITWORDS_PER_ELEMENT);
73 if (Bits[i] != RHS.Bits[i])
82 // Return the bits that make up word Idx in our element.
85 return Bits[Idx];
94 if (Bits[i])
100 Bits[Idx / BITWORD_SIZE] |= 1L << (Idx % BITWORD_SIZE);
113 Bits[Idx / BITWORD_SIZE] &= ~(1L << (Idx % BITWORD_SIZE));
117 return Bits[Idx / BITWORD_SIZE] & (1L << (Idx % BITWORD_SIZE));
123 NumBits += countPopulation(Bits[i]);
130 if (Bits[i] != 0)
131 return i * BITWORD_SIZE + countTrailingZeros(Bits[i]);
139 if (Bits[Idx] != 0)
141 countLeadingZeros(Bits[Idx]) - 1;
154 BitWord Copy = Bits[WordPos];
158 // Mask off previous bits.
166 if (Bits[i] != 0)
167 return i * BITWORD_SIZE + countTrailingZeros(Bits[i]);
175 BitWord old = changed ? 0 : Bits[i];
177 Bits[i] |= RHS.Bits[i];
178 if (!changed && old != Bits[i])
184 // Return true if we have any bits in common with RHS
187 if (RHS.Bits[i] & Bits[i])
194 // BecameZero is set to true if this element became all-zero bits.
202 BitWord old = changed ? 0 : Bits[i];
204 Bits[i] &= RHS.Bits[i];
205 if (Bits[i] != 0)
208 if (!changed && old != Bits[i])
217 // bits.
225 BitWord old = changed ? 0 : Bits[i];
227 Bits[i] &= ~RHS.Bits[i];
228 if (Bits[i] != 0)
231 if (!changed && old != Bits[i])
247 Bits[i] = RHS1.Bits[i] & ~RHS2.Bits[i];
248 if (Bits[i] != 0)
299 // Iterator to walk set bits in the bitmap. This iterator is a lot uglier
316 // Current bits from the element.
317 typename SparseBitVectorElement<ElementSize>::BitWord Bits;
332 Bits = Iter->word(WordNumber);
333 Bits >>= BitPos % BITWORD_SIZE;
341 while (Bits && !(Bits & 1)) {
342 Bits >>= 1;
346 // See if we ran out of Bits in this word.
347 if (!Bits) {
349 // If we ran out of set bits in this element, move to next element.
364 Bits = Iter->word(WordNumber);
365 Bits >>= NextSetBitNumber % BITWORD_SIZE;
368 Bits = Iter->word(WordNumber);
369 Bits >>= NextSetBitNumber % BITWORD_SIZE;
383 Bits = 0;
392 Bits >>= 1;
738 // Return true if we share any bits in common with RHS
747 // Loop through, intersecting stopping when we hit bits in common.
766 // Return true iff all bits set in this SparseBitVector are
774 // Return the first set bit in the bitmap. Return -1 if no bits are set.
782 // Return the last set bit in the bitmap. Return -1 if no bits are set.