Home | History | Annotate | Download | only in Support

Lines Matching refs:Capacity

65   /// The size of an allocated array is represented by a Capacity instance.
69 class Capacity {
71 explicit Capacity(uint8_t idx) : Index(idx) {}
74 Capacity() : Index(0) {}
76 /// Get the capacity of an array that can hold at least N elements.
77 static Capacity get(size_t N) {
78 return Capacity(N ? Log2_64_Ceil(N) : 0);
81 /// Get the number of elements in an array with this capacity.
84 /// Get the bucket number for this capacity.
87 /// Get the next larger capacity. Large capacities grow exponentially, so
90 Capacity getNext() const { return Capacity(Index + 1); }
117 /// Allocate an array of at least the requested capacity.
123 T *allocate(Capacity Cap, AllocatorType &Allocator) {
131 /// Deallocate an array with the specified Capacity.
133 /// Cap must be the same capacity that was given to allocate().
135 void deallocate(Capacity Cap, T *Ptr) {