Home
last modified time | relevance | path

Searched refs:new_cap (Results 1 – 23 of 23) sorted by relevance

/external/tensorflow/tensorflow/core/platform/
Dctstring_internal.h254 size_t new_cap; in TF_TString_ResizeUninitialized() local
261 new_cap = TF_align16(curr_cap / 2 + 1) - 1; in TF_TString_ResizeUninitialized()
263 new_cap = TF_align16(new_size + 1) - 1; in TF_TString_ResizeUninitialized()
265 new_cap = TF_align16(curr_cap_x2 + 1) - 1; in TF_TString_ResizeUninitialized()
267 new_cap = curr_cap; in TF_TString_ResizeUninitialized()
271 if (new_cap == curr_cap) { in TF_TString_ResizeUninitialized()
274 new_ptr = (char *)realloc(str->u.large.ptr, new_cap + 1); // NOLINT in TF_TString_ResizeUninitialized()
276 new_ptr = (char *)malloc(new_cap + 1); // NOLINT in TF_TString_ResizeUninitialized()
285 str->u.large.cap = new_cap; in TF_TString_ResizeUninitialized()
308 static inline void TF_TString_Reserve(TF_TString *str, size_t new_cap) { in TF_TString_Reserve() argument
[all …]
Dctstring.h45 inline void TF_TString_Reserve(TF_TString *str, size_t new_cap);
/external/boringssl/src/ssl/
Dssl_buffer.cc50 bool SSLBuffer::EnsureCap(size_t header_len, size_t new_cap) { in EnsureCap() argument
51 if (new_cap > 0xffff) { in EnsureCap()
56 if (cap_ >= new_cap) { in EnsureCap()
63 if (new_cap <= sizeof(inline_buf_)) { in EnsureCap()
75 new_buf = (uint8_t *)malloc(new_cap + SSL3_ALIGN_PAYLOAD - 1); in EnsureCap()
98 cap_ = new_cap; in EnsureCap()
Ds3_both.cc152 size_t new_cap = ssl->s3->pending_flight->length + max_out; in add_record_to_flight() local
153 if (max_out < in.size() || new_cap < max_out) { in add_record_to_flight()
159 if (!BUF_MEM_reserve(ssl->s3->pending_flight.get(), new_cap) || in add_record_to_flight()
Dinternal.h1223 bool EnsureCap(size_t header_len, size_t new_cap);
/external/rust/crates/quiche/deps/boringssl/src/ssl/
Dssl_buffer.cc50 bool SSLBuffer::EnsureCap(size_t header_len, size_t new_cap) { in EnsureCap() argument
51 if (new_cap > 0xffff) { in EnsureCap()
56 if (cap_ >= new_cap) { in EnsureCap()
63 if (new_cap <= sizeof(inline_buf_)) { in EnsureCap()
75 new_buf = (uint8_t *)malloc(new_cap + SSL3_ALIGN_PAYLOAD - 1); in EnsureCap()
98 cap_ = new_cap; in EnsureCap()
Ds3_both.cc152 size_t new_cap = ssl->s3->pending_flight->length + max_out; in add_record_to_flight() local
153 if (max_out < in.size() || new_cap < max_out) { in add_record_to_flight()
159 if (!BUF_MEM_reserve(ssl->s3->pending_flight.get(), new_cap) || in add_record_to_flight()
Dinternal.h1218 bool EnsureCap(size_t header_len, size_t new_cap);
/external/rust/crates/grpcio-sys/grpc/src/core/ext/transport/chttp2/transport/
Dhpack_table.cc89 static void rebuild_ents(grpc_chttp2_hptbl* tbl, uint32_t new_cap) { in rebuild_ents() argument
91 static_cast<grpc_mdelem*>(gpr_malloc(sizeof(*ents) * new_cap)); in rebuild_ents()
99 tbl->cap_entries = new_cap; in rebuild_ents()
140 uint32_t new_cap = GPR_MAX(tbl->max_entries, 16u); in grpc_chttp2_hptbl_set_current_table_size() local
141 if (new_cap != tbl->cap_entries) { in grpc_chttp2_hptbl_set_current_table_size()
142 rebuild_ents(tbl, new_cap); in grpc_chttp2_hptbl_set_current_table_size()
Dhpack_encoder.cc790 static void rebuild_elems(grpc_chttp2_hpack_compressor* c, uint32_t new_cap) { in rebuild_elems() argument
792 static_cast<uint16_t*>(gpr_malloc(sizeof(*table_elem_size) * new_cap)); in rebuild_elems()
795 memset(table_elem_size, 0, sizeof(*table_elem_size) * new_cap); in rebuild_elems()
796 GPR_ASSERT(c->table_elems <= new_cap); in rebuild_elems()
800 table_elem_size[ofs % new_cap] = in rebuild_elems()
804 c->cap_table_elems = new_cap; in rebuild_elems()
823 uint32_t new_cap = GPR_MAX(c->max_table_elems, 16); in grpc_chttp2_hpack_compressor_set_max_table_size() local
824 if (new_cap != c->cap_table_elems) { in grpc_chttp2_hpack_compressor_set_max_table_size()
825 rebuild_elems(c, new_cap); in grpc_chttp2_hpack_compressor_set_max_table_size()
/external/boringssl/src/crypto/
Dcpu-arm-linux.c85 size_t new_cap = cap * 2; in read_file() local
86 if (new_cap < cap) { in read_file()
89 char *new_buf = OPENSSL_realloc(buf, new_cap); in read_file()
94 cap = new_cap; in read_file()
/external/rust/crates/quiche/deps/boringssl/src/crypto/
Dcpu-arm-linux.c85 size_t new_cap = cap * 2; in read_file() local
86 if (new_cap < cap) { in read_file()
89 char *new_buf = OPENSSL_realloc(buf, new_cap); in read_file()
94 cap = new_cap; in read_file()
/external/grpc-grpc/src/core/ext/transport/chttp2/transport/
Dhpack_table.cc232 static void rebuild_ents(grpc_chttp2_hptbl* tbl, uint32_t new_cap) { in rebuild_ents() argument
234 static_cast<grpc_mdelem*>(gpr_malloc(sizeof(*ents) * new_cap)); in rebuild_ents()
242 tbl->cap_entries = new_cap; in rebuild_ents()
285 uint32_t new_cap = GPR_MAX(tbl->max_entries, 16u); in grpc_chttp2_hptbl_set_current_table_size() local
286 if (new_cap != tbl->cap_entries) { in grpc_chttp2_hptbl_set_current_table_size()
287 rebuild_ents(tbl, new_cap); in grpc_chttp2_hptbl_set_current_table_size()
Dhpack_encoder.cc621 static void rebuild_elems(grpc_chttp2_hpack_compressor* c, uint32_t new_cap) { in rebuild_elems() argument
623 static_cast<uint16_t*>(gpr_malloc(sizeof(*table_elem_size) * new_cap)); in rebuild_elems()
626 memset(table_elem_size, 0, sizeof(*table_elem_size) * new_cap); in rebuild_elems()
627 GPR_ASSERT(c->table_elems <= new_cap); in rebuild_elems()
631 table_elem_size[ofs % new_cap] = in rebuild_elems()
635 c->cap_table_elems = new_cap; in rebuild_elems()
654 uint32_t new_cap = GPR_MAX(c->max_table_elems, 16); in grpc_chttp2_hpack_compressor_set_max_table_size() local
655 if (new_cap != c->cap_table_elems) { in grpc_chttp2_hpack_compressor_set_max_table_size()
656 rebuild_elems(c, new_cap); in grpc_chttp2_hpack_compressor_set_max_table_size()
/external/angle/third_party/abseil-cpp/absl/strings/internal/
Dresize_uninitialized_test.cc98 size_t new_cap = str.capacity(); in TEST() local
99 if (new_cap > prev_cap) ++cap_increase_count; in TEST()
100 prev_cap = new_cap; in TEST()
/external/libgav1/libgav1/src/utils/
Dvector.h95 LIBGAV1_MUST_USE_RESULT bool reserve(size_t new_cap) { in reserve() argument
96 if (capacity_ < new_cap) { in reserve()
97 T* const new_items = static_cast<T*>(malloc(new_cap * sizeof(T))); in reserve()
116 capacity_ = new_cap; in reserve()
/external/rust/crates/bytes/src/
Dbytes_mut.rs603 let mut new_cap = len.checked_add(additional).expect("overflow"); in reserve_inner() localVariable
620 if v.capacity() >= new_cap { in reserve_inner()
640 let double = v.capacity().checked_shl(1).unwrap_or(new_cap); in reserve_inner()
642 new_cap = cmp::max(cmp::max(double, new_cap), original_capacity); in reserve_inner()
644 new_cap = cmp::max(new_cap, original_capacity); in reserve_inner()
649 let mut v = ManuallyDrop::new(Vec::with_capacity(new_cap)); in reserve_inner()
/external/rust/crates/smallvec/src/
Dlib.rs807 pub fn grow(&mut self, new_cap: usize) { in grow()
808 infallible(self.try_grow(new_cap)) in grow()
814 pub fn try_grow(&mut self, new_cap: usize) -> Result<(), CollectionAllocErr> { in try_grow()
818 assert!(new_cap >= len); in try_grow()
819 if new_cap <= self.inline_size() { in try_grow()
827 } else if new_cap != cap { in try_grow()
828 let layout = layout_array::<A::Item>(new_cap)?; in try_grow()
849 self.capacity = new_cap; in try_grow()
876 let new_cap = len in try_reserve() localVariable
880 self.try_grow(new_cap) in try_reserve()
[all …]
/external/rust/crates/crossbeam-deque/src/
Ddeque.rs285 unsafe fn resize(&self, new_cap: usize) { in resize()
292 let new = Buffer::alloc(new_cap); in resize()
313 if mem::size_of::<T>() * new_cap >= FLUSH_THRESHOLD_BYTES { in resize()
333 let mut new_cap = cap * 2; in reserve() localVariable
334 while new_cap - len < reserve_cap { in reserve()
335 new_cap *= 2; in reserve()
340 self.resize(new_cap); in reserve()
/external/rust/cxx/book/src/binding/
Dvec.md45 void reserve(size_t new_cap);
/external/rust/cxx/include/
Dcxx.h315 void reserve(std::size_t new_cap);
915 void Vec<T>::reserve(std::size_t new_cap) {
916 this->reserve_total(new_cap);
/external/fmtlib/include/fmt/
Dcore.h1810 void reserve(size_t new_cap, size_t new_cap_named) {
1811 FMT_ASSERT(new_cap >= new_cap_named,
1813 data_.reserve(new_cap);
/external/llvm-project/clang/test/Analysis/Inputs/
Dsystem-header-simulator-cxx.h588 void reserve(size_type new_cap);