/third_party/boost/libs/container/test/ |
D | small_vector_options_test.cpp | 61 std::size_t new_capacity = v.capacity(); in test_growth_factor_50() local 62 BOOST_TEST(new_capacity == old_capacity + old_capacity/2); in test_growth_factor_50() 80 std::size_t new_capacity = v.capacity(); in test_growth_factor_60() local 81 BOOST_TEST(new_capacity == old_capacity + 3*old_capacity/5); in test_growth_factor_60() 99 std::size_t new_capacity = v.capacity(); in test_growth_factor_100() local 100 BOOST_TEST(new_capacity == 2*old_capacity); in test_growth_factor_100()
|
D | vector_options_test.cpp | 71 std::size_t new_capacity = v.capacity(); in test_growth_factor_50() local 72 BOOST_TEST(new_capacity == old_capacity + old_capacity/2); in test_growth_factor_50() 90 std::size_t new_capacity = v.capacity(); in test_growth_factor_60() local 91 BOOST_TEST(new_capacity == old_capacity + 3*old_capacity/5); in test_growth_factor_60() 109 std::size_t new_capacity = v.capacity(); in test_growth_factor_100() local 110 BOOST_TEST(new_capacity == 2*old_capacity); in test_growth_factor_100()
|
/third_party/boost/boost/circular_buffer/ |
D | space_optimized.hpp | 1534 size_type ensure_reserve(size_type new_capacity, size_type buffer_size) const { in ensure_reserve() argument 1535 if (buffer_size + new_capacity / 5 >= new_capacity) in ensure_reserve() 1536 new_capacity *= 2; // ensure at least 20% reserve in ensure_reserve() 1537 if (new_capacity > m_capacity_ctrl) in ensure_reserve() 1539 return new_capacity; in ensure_reserve() 1545 size_type new_capacity = circular_buffer<T, Alloc>::capacity(); in check_low_capacity() local 1546 if (new_size > new_capacity) { in check_low_capacity() 1547 if (new_capacity == 0) in check_low_capacity() 1548 new_capacity = 1; in check_low_capacity() 1549 for (; new_size > new_capacity; new_capacity *= 2) {} in check_low_capacity() [all …]
|
D | base.hpp | 876 void set_capacity(capacity_type new_capacity) { in set_capacity() argument 877 if (new_capacity == capacity()) in set_capacity() 879 pointer buff = allocate(new_capacity); in set_capacity() 883 …cb_details::uninitialized_move_if_noexcept(b, b + (std::min)(new_capacity, size()), buff, alloc()), in set_capacity() 884 new_capacity); in set_capacity() 886 deallocate(buff, new_capacity); in set_capacity() 952 void rset_capacity(capacity_type new_capacity) { in rset_capacity() argument 953 if (new_capacity == capacity()) in rset_capacity() 955 pointer buff = allocate(new_capacity); in rset_capacity() 958 … reset(buff, cb_details::uninitialized_move_if_noexcept(e - (std::min)(new_capacity, size()), in rset_capacity() [all …]
|
/third_party/jerryscript/jerry-core/ecma/base/ |
D | ecma-helpers-collection.c | 136 const uint32_t new_capacity = collection_p->capacity + ECMA_COLLECTION_GROW_FACTOR; in ecma_collection_push_back() local 138 const uint32_t new_size = ECMA_COLLECTION_ALLOCATED_SIZE (new_capacity); in ecma_collection_push_back() 142 collection_p->capacity = new_capacity; in ecma_collection_push_back() 157 const uint32_t new_capacity = collection_p->capacity + count; in ecma_collection_reserve() local 159 const uint32_t new_size = ECMA_COLLECTION_ALLOCATED_SIZE (new_capacity); in ecma_collection_reserve() 164 collection_p->capacity = new_capacity; in ecma_collection_reserve()
|
/third_party/boost/boost/asio/detail/ |
D | win_fd_set_adapter.hpp | 121 u_int new_capacity = capacity_ + capacity_ / 2; in reserve() local 122 if (new_capacity < n) in reserve() 123 new_capacity = n; in reserve() 127 + sizeof(SOCKET) * (new_capacity))); in reserve() 135 capacity_ = new_capacity; in reserve()
|
/third_party/boost/libs/asio/include/boost/asio/detail/ |
D | win_fd_set_adapter.hpp | 121 u_int new_capacity = capacity_ + capacity_ / 2; in reserve() local 122 if (new_capacity < n) in reserve() 123 new_capacity = n; in reserve() 127 + sizeof(SOCKET) * (new_capacity))); in reserve() 135 capacity_ = new_capacity; in reserve()
|
/third_party/e2fsprogs/e2fsck/ |
D | encrypted_files.c | 316 size_t new_capacity = info->file_ranges_capacity * 2; in append_ino_and_policy_id() local 319 if (new_capacity < 128) in append_ino_and_policy_id() 320 new_capacity = 128; in append_ino_and_policy_id() 323 if (new_capacity > ctx->fs->super->s_inodes_count) in append_ino_and_policy_id() 324 new_capacity = ctx->fs->super->s_inodes_count; in append_ino_and_policy_id() 327 if (new_capacity < info->file_ranges_capacity + 1) in append_ino_and_policy_id() 328 new_capacity = info->file_ranges_capacity + 1; in append_ino_and_policy_id() 332 new_capacity * sizeof(*range), in append_ino_and_policy_id() 335 new_capacity * sizeof(*range)); in append_ino_and_policy_id() 337 info->file_ranges_capacity = new_capacity; in append_ino_and_policy_id()
|
/third_party/mesa3d/src/util/ |
D | string_buffer.c | 34 uint32_t new_capacity = str->capacity * 2; in ensure_capacity() local 35 while (needed_capacity > new_capacity) in ensure_capacity() 36 new_capacity *= 2; in ensure_capacity() 38 str->buf = reralloc_array_size(str, str->buf, sizeof(char), new_capacity); in ensure_capacity() 42 str->capacity = new_capacity; in ensure_capacity()
|
/third_party/boost/tools/build/src/engine/ |
D | strings.cpp | 105 size_t new_capacity = self->capacity; in extend_full() local 107 while ( new_capacity < new_size + 1) in extend_full() 108 new_capacity <<= 1; in extend_full() 109 string_reserve_internal( self, new_capacity ); in extend_full() 120 size_t new_capacity = capacity; in maybe_reserve() local 121 while ( new_capacity <= new_size ) in maybe_reserve() 122 new_capacity <<= 1; in maybe_reserve() 123 string_reserve_internal( self, new_capacity ); in maybe_reserve()
|
D | jam_strings.cpp | 108 size_t new_capacity = capacity; in maybe_reserve() local 109 while ( new_capacity <= new_size ) in maybe_reserve() 110 new_capacity <<= 1; in maybe_reserve() 111 string_reserve_internal( self, new_capacity ); in maybe_reserve()
|
/third_party/skia/third_party/externals/swiftshader/third_party/subzero/src/ |
D | IceAssembler.cpp | 117 intptr_t new_capacity = std::min(old_capacity * 2, old_capacity + OneMB); in extendCapacity() local 118 if (new_capacity < old_capacity) { in extendCapacity() 124 uintptr_t new_contents = NewContents(Assemblr, new_capacity); in extendCapacity() 134 Limit = computeLimit(new_contents, new_capacity); in extendCapacity() 137 assert(capacity() == new_capacity); in extendCapacity()
|
/third_party/skia/third_party/externals/abseil-cpp/absl/container/internal/ |
D | inlined_vector.h | 526 size_type new_capacity = ComputeCapacity(GetInlinedCapacity(), n); in InitFrom() local 527 dst = AllocatorTraits::allocate(*GetAllocPtr(), new_capacity); in InitFrom() 528 SetAllocatedData(dst, new_capacity); in InitFrom() 553 size_type new_capacity = ComputeCapacity(GetInlinedCapacity(), new_size); variable 554 construct_data = AllocatorTraits::allocate(*GetAllocPtr(), new_capacity); 555 SetAllocatedData(construct_data, new_capacity); 582 size_type new_capacity = ComputeCapacity(storage_view.capacity, new_size); variable 583 construct_loop = {allocation_tx.Allocate(new_capacity), new_size}; 636 size_type new_capacity = ComputeCapacity(storage_view.capacity, new_size); variable 637 pointer new_data = allocation_tx.Allocate(new_capacity); [all …]
|
/third_party/node/src/ |
D | aliased_buffer.h | 218 void reserve(size_t new_capacity) { in reserve() argument 219 DCHECK_GE(new_capacity, count_); in reserve() 225 new_capacity); in reserve() 237 v8::Local<V8T> js_array = V8T::New(ab, byte_offset_, new_capacity); in reserve() 243 count_ = new_capacity; in reserve()
|
/third_party/abseil-cpp/absl/container/internal/ |
D | inlined_vector.h | 482 size_type new_capacity = ComputeCapacity(GetInlinedCapacity(), new_size); variable 483 construct_data = AllocatorTraits::allocate(*GetAllocPtr(), new_capacity); 484 SetAllocatedData(construct_data, new_capacity); 511 size_type new_capacity = ComputeCapacity(storage_view.capacity, new_size); variable 512 construct_loop = {allocation_tx.Allocate(new_capacity), new_size}; 557 size_type new_capacity = ComputeCapacity(storage_view.capacity, new_size); variable 558 pointer new_data = allocation_tx.Allocate(new_capacity); 609 size_type new_capacity = ComputeCapacity(storage_view.capacity, new_size); variable 610 pointer new_data = allocation_tx.Allocate(new_capacity); 695 size_type new_capacity = NextCapacity(storage_view.capacity); variable [all …]
|
/third_party/mesa3d/src/freedreno/vulkan/ |
D | tu_cs.c | 100 uint32_t new_capacity = MAX2(4, 2 * cs->bo_capacity); in tu_cs_add_bo() local 102 realloc(cs->bos, new_capacity * sizeof(struct tu_bo *)); in tu_cs_add_bo() 106 cs->bo_capacity = new_capacity; in tu_cs_add_bo() 148 uint32_t new_capacity = MAX2(4, cs->entry_capacity * 2); in tu_cs_reserve_entry() local 150 realloc(cs->entries, new_capacity * sizeof(struct tu_cs_entry)); in tu_cs_reserve_entry() 154 cs->entry_capacity = new_capacity; in tu_cs_reserve_entry()
|
/third_party/boost/boost/ptr_container/ |
D | ptr_circular_buffer.hpp | 171 void set_capacity( capacity_type new_capacity ) // strong in set_capacity() argument 173 if( this->size() > new_capacity ) in set_capacity() 175 this->erase( this->begin() + new_capacity, this->end() ); in set_capacity() 177 this->base().set_capacity( new_capacity ); in set_capacity() 180 void rset_capacity( capacity_type new_capacity ) // strong in rset_capacity() argument 182 if( this->size() > new_capacity ) in rset_capacity() 185 this->begin() + (this->size()-new_capacity) ); in rset_capacity() 187 this->base().rset_capacity( new_capacity ); in rset_capacity()
|
/third_party/boost/boost/signals2/detail/ |
D | auto_buffer.hpp | 91 static SizeType new_capacity( SizeType capacity ) in new_capacity() function 293 pointer move_to_new_buffer( size_type new_capacity, const boost::false_type& ) in move_to_new_buffer() argument 295 pointer new_buffer = allocate( new_capacity ); // strong in move_to_new_buffer() 299 new_capacity ); in move_to_new_buffer() 305 pointer move_to_new_buffer( size_type new_capacity, const boost::true_type& ) in move_to_new_buffer() argument 307 pointer new_buffer = allocate( new_capacity ); // strong in move_to_new_buffer() 312 void reserve_impl( size_type new_capacity ) in reserve_impl() argument 314 pointer new_buffer = move_to_new_buffer( new_capacity, in reserve_impl() 318 members_.capacity_ = new_capacity; in reserve_impl() 325 size_type new_capacity = GrowPolicy::new_capacity( members_.capacity_ ); in new_capacity_impl() local [all …]
|
/third_party/protobuf/src/google/protobuf/stubs/ |
D | bytestream.cc | 124 size_t new_capacity = std::max(capacity_ + amount, (3 * capacity_) / 2); in Expand() local 125 char* bigger = new char[new_capacity]; in Expand() 129 capacity_ = new_capacity; in Expand()
|
/third_party/gn/src/base/containers/ |
D | circular_deque.h | 584 void reserve(size_type new_capacity) { in reserve() argument 585 if (new_capacity > capacity()) in reserve() 586 SetCapacityTo(new_capacity); in reserve() 939 void SetCapacityTo(size_t new_capacity) { in SetCapacityTo() argument 942 VectorBuffer new_buffer(new_capacity + 1); in SetCapacityTo() 957 size_t new_capacity = in ExpandCapacityIfNecessary() local 959 SetCapacityTo(new_capacity); in ExpandCapacityIfNecessary() 975 size_t new_capacity = in ShrinkCapacityIfNecessary() local 977 if (new_capacity < capacity()) { in ShrinkCapacityIfNecessary() 979 SetCapacityTo(new_capacity); in ShrinkCapacityIfNecessary()
|
/third_party/boost/libs/compute/include/boost/compute/utility/ |
D | wait_list.hpp | 141 void reserve(size_t new_capacity) { in reserve() argument 142 m_events.reserve(new_capacity); in reserve()
|
/third_party/boost/boost/compute/utility/ |
D | wait_list.hpp | 141 void reserve(size_t new_capacity) { in reserve() argument 142 m_events.reserve(new_capacity); in reserve()
|
/third_party/boost/libs/atomic/src/ |
D | lock_pool.cpp | 201 …static header* allocate_buffer(std::size_t new_capacity, header* old_header = NULL) BOOST_NOEXCEPT; 1123 wait_state_list::header* wait_state_list::allocate_buffer(std::size_t new_capacity, header* old_hea… in allocate_buffer() argument 1131 const std::size_t new_buffer_size = entries_offset + new_capacity * sizeof(void*) * 2u; in allocate_buffer() 1138 const volatile void** a = new (get_atomic_pointers(h)) const volatile void*[new_capacity]; in allocate_buffer() 1139 wait_state** w = new (get_wait_states(a, new_capacity)) wait_state*[new_capacity]; in allocate_buffer() 1143 BOOST_ASSERT(new_capacity >= old_header->capacity); in allocate_buffer() 1149 …std::memset(a + old_header->size * sizeof(const volatile void*), 0, (new_capacity - old_header->si… in allocate_buffer() 1153 …std::memset(w + old_header->capacity * sizeof(wait_state*), 0, (new_capacity - old_header->capacit… in allocate_buffer() 1160 h->capacity = new_capacity; in allocate_buffer()
|
/third_party/libuv/src/win/ |
D | core.c | 95 int new_capacity, i; in uv__loops_add() local 100 new_capacity = uv__loops_capacity + UV__LOOPS_CHUNK_SIZE; in uv__loops_add() 101 new_loops = uv__realloc(uv__loops, sizeof(uv_loop_t*) * new_capacity); in uv__loops_add() 105 for (i = uv__loops_capacity; i < new_capacity; ++i) in uv__loops_add() 107 uv__loops_capacity = new_capacity; in uv__loops_add()
|
/third_party/grpc/src/core/lib/slice/ |
D | slice_buffer.cc | 48 const size_t new_capacity = GROW(sb->capacity); in do_embiggen() local 49 sb->capacity = new_capacity; in do_embiggen() 52 gpr_malloc(new_capacity * sizeof(grpc_slice))); in do_embiggen() 56 gpr_realloc(sb->base_slices, new_capacity * sizeof(grpc_slice))); in do_embiggen()
|