• Home
  • Raw
  • Download

Lines Matching refs:Capacity

258   unsigned Capacity; // Size of allocated memory in BitWord.  variable
308 : Size(0), Capacity(0), Alloc(std::move(A)) {
316 Capacity = NumBitWords(s); in Size()
317 Bits = Alloc.allocate(Capacity); in Size()
318 init_words(Bits, Capacity, t); in Size()
327 Capacity = 0; in BitVectorTmpl()
331 Capacity = NumBitWords(RHS.size()); in BitVectorTmpl()
332 Bits = Alloc.allocate(Capacity); in BitVectorTmpl()
333 std::memcpy(Bits, RHS.Bits, Capacity * sizeof(BitWord)); in BitVectorTmpl()
337 : Bits(RHS.Bits), Size(RHS.Size), Capacity(RHS.Capacity), in BitVectorTmpl()
344 Alloc.deallocate(Bits, Capacity); in ~BitVectorTmpl()
423 if (N > Capacity * BITWORD_SIZE) {
424 unsigned OldCapacity = Capacity;
426 init_words(&Bits[OldCapacity], (Capacity - OldCapacity), t);
443 if (N > Capacity * BITWORD_SIZE) in reserve()
449 init_words(Bits, Capacity, true); in set()
491 init_words(Bits, Capacity, false); in reset()
657 if (Size <= Capacity * BITWORD_SIZE) {
668 assert(Capacity == 0);
671 const auto OldCapacity = Capacity;
672 Capacity = RHSWords;
673 assert(Capacity > 0 && "negative capacity?");
674 BitWord *NewBits = Alloc.allocate(Capacity);
675 std::memcpy(NewBits, RHS.Bits, Capacity * sizeof(BitWord));
688 Alloc.deallocate(Bits, Capacity);
691 Capacity = RHS.Capacity;
701 std::swap(Capacity, RHS.Capacity); in swap()
749 if (Capacity > UsedWords)
750 init_words(&Bits[UsedWords], (Capacity - UsedWords), t);
767 const auto OldCapacity = Capacity; in grow()
768 Capacity = std::max(NumBitWords(NewSize), Capacity * 2); in grow()
769 assert(Capacity > 0 && "realloc-ing zero space"); in grow()
770 auto *NewBits = Alloc.allocate(Capacity); in grow()