Lines Matching refs:Capacity
34 unsigned Capacity; // Size of allocated memory in BitWord. variable
75 BitVector() : Size(0), Capacity(0) { in BitVector()
82 Capacity = NumBitWords(s); in Size()
83 Bits = (BitWord *)std::malloc(Capacity * sizeof(BitWord)); in Size()
84 init_words(Bits, Capacity, t); in Size()
93 Capacity = 0; in BitVector()
97 Capacity = NumBitWords(RHS.size()); in BitVector()
98 Bits = (BitWord *)std::malloc(Capacity * sizeof(BitWord)); in BitVector()
99 std::memcpy(Bits, RHS.Bits, Capacity * sizeof(BitWord)); in BitVector()
103 : Bits(RHS.Bits), Size(RHS.Size), Capacity(RHS.Capacity) { in BitVector()
210 if (N > Capacity * BITWORD_SIZE) {
211 unsigned OldCapacity = Capacity;
213 init_words(&Bits[OldCapacity], (Capacity-OldCapacity), t);
230 if (N > Capacity * BITWORD_SIZE) in reserve()
236 init_words(Bits, Capacity, true); in set()
276 init_words(Bits, Capacity, false); in reset()
444 if (Size <= Capacity * BITWORD_SIZE) {
452 Capacity = RHSWords;
453 BitWord *NewBits = (BitWord *)std::malloc(Capacity * sizeof(BitWord));
454 std::memcpy(NewBits, RHS.Bits, Capacity * sizeof(BitWord));
469 Capacity = RHS.Capacity;
479 std::swap(Capacity, RHS.Capacity); in swap()
527 if (Capacity > UsedWords)
528 init_words(&Bits[UsedWords], (Capacity-UsedWords), t);
547 Capacity = std::max(NumBitWords(NewSize), Capacity * 2); in grow()
548 Bits = (BitWord *)std::realloc(Bits, Capacity * sizeof(BitWord)); in grow()