Home | History | Annotate | Download | only in Support

Lines Matching defs:Capacity

66   /// The size of an allocated array is represented by a Capacity instance.
70 class Capacity {
72 explicit Capacity(uint8_t idx) : Index(idx) {}
75 Capacity() : Index(0) {}
77 /// Get the capacity of an array that can hold at least N elements.
78 static Capacity get(size_t N) {
79 return Capacity(N ? Log2_64_Ceil(N) : 0);
82 /// Get the number of elements in an array with this capacity.
85 /// Get the bucket number for this capacity.
88 /// Get the next larger capacity. Large capacities grow exponentially, so
91 Capacity getNext() const { return Capacity(Index + 1); }
118 /// Allocate an array of at least the requested capacity.
124 T *allocate(Capacity Cap, AllocatorType &Allocator) {
132 /// Deallocate an array with the specified Capacity.
134 /// Cap must be the same capacity that was given to allocate().
136 void deallocate(Capacity Cap, T *Ptr) {