Home
last modified time | relevance | path

Searched refs:capacity_ (Results 1 – 25 of 90) sorted by relevance

1234

/third_party/mindspore/mindspore/ccsrc/minddata/dataset/engine/perf/
Dcyclic_array.h51 : cur_idx_(idx), ptr_(ptr), capacity_(capacity), head_(head) {} in Iterator()
58 cur_idx_ = (cur_idx_ + 1) % (capacity_ + 1);
64 cur_idx_ = (cur_idx_ + 1) % (capacity_ + 1);
69 cur_idx_ = (cur_idx_ + capacity_) % (capacity_ + 1);
75 cur_idx_ = (cur_idx_ + capacity_) % (capacity_ + 1);
79 …tor operator+(dsize_t x) { return Iterator((cur_idx_ + x) % (capacity_ + 1), ptr_, capacity_, head…
82 return Iterator((cur_idx_ + (capacity_ + 1 - x)) % (capacity_ + 1), ptr_, capacity_, head_);
86 return (head_ + cur_idx_) % (capacity_ + 1) < (rhs.head_ + rhs.cur_idx_) % (capacity_ + 1);
90 return (head_ + cur_idx_) % (capacity_ + 1) > (rhs.head_ + rhs.cur_idx_) % (capacity_ + 1);
94 return (head_ + cur_idx_) % (capacity_ + 1) >= (rhs.head_ + rhs.cur_idx_) % (capacity_ + 1);
[all …]
/third_party/boost/libs/beast/include/boost/beast/zlib/detail/
Dwindow.hpp56 std::uint16_t capacity_ = 0; member in boost::beast::zlib::detail::window
69 return capacity_; in capacity()
85 capacity_ = 1U << bits_; in reset()
100 auto i = ((i_ - pos) + capacity_) % capacity_; in read()
101 auto m = capacity_ - i; in read()
117 std::uint8_t[]>(capacity_); in write()
118 if(n >= capacity_) in write()
121 size_ = capacity_; in write()
125 if(i_ + n <= capacity_) in write()
128 if(size_ >= capacity_ - n) in write()
[all …]
/third_party/boost/boost/beast/zlib/detail/
Dwindow.hpp56 std::uint16_t capacity_ = 0; member in boost::beast::zlib::detail::window
69 return capacity_; in capacity()
85 capacity_ = 1U << bits_; in reset()
100 auto i = ((i_ - pos) + capacity_) % capacity_; in read()
101 auto m = capacity_ - i; in read()
117 std::uint8_t[]>(capacity_); in write()
118 if(n >= capacity_) in write()
121 size_ = capacity_; in write()
125 if(i_ + n <= capacity_) in write()
128 if(size_ >= capacity_ - n) in write()
[all …]
/third_party/boost/boost/multi_index/detail/
Drnd_index_ptr_array.hpp53 capacity_(sz), in random_access_index_ptr_array()
54 spc(al,capacity_+1) in random_access_index_ptr_array()
61 size_type capacity()const{return capacity_;} in capacity()
65 if(size_==capacity_){ in room_for_one()
66 reserve(capacity_<=10?15:capacity_+capacity_/2); in room_for_one()
72 if(c>capacity_)set_capacity(c); in reserve()
77 if(capacity_>size_)set_capacity(size_); in shrink_to_fit()
109 std::swap(capacity_,x.capacity_); in swap()
117 std::swap(capacity_,x.capacity_); in swap()
123 size_type capacity_; member in boost::multi_index::detail::random_access_index_ptr_array
[all …]
/third_party/mindspore/mindspore/ccsrc/backend/kernel_compiler/cpu/rl/
Dbuffer_append_cpu_kernel.h30 BufferCPUAppendKernel() : element_nums_(0), exp_batch_(0), capacity_(0) {} in BufferCPUAppendKernel()
36 capacity_ = AnfAlgo::GetNodeAttr<int64_t>(kernel_node, "capacity"); in Init()
44 input_size_list_.push_back(i * capacity_); in Init()
60 if (count_addr[0] <= capacity_ - 1 && head_addr[0] == 0) { in Launch()
63 if (count_addr[0] > capacity_) { in Launch()
64 count_addr[0] = capacity_; in Launch()
65 head_addr[0] = (exp_batch_ + count_addr[0] - capacity_) % capacity_; in Launch()
69 head_addr[0] = (exp_batch_ + head_addr[0]) % capacity_; in Launch()
72 …int remain_size = (exp_batch_ > (capacity_ - index)) ? LongToInt(capacity_ - index) : LongToInt(ex… in Launch()
73 …int remap_size = (exp_batch_ > (capacity_ - index)) ? LongToInt(exp_batch_ - capacity_ + index) : … in Launch()
[all …]
/third_party/boost/boost/signals2/detail/
Dauto_buffer.hpp285 deallocate( buffer_, members_.capacity_ ); in auto_buffer_destroy()
290 deallocate( buffer_, members_.capacity_ ); in auto_buffer_destroy()
318 members_.capacity_ = new_capacity; in reserve_impl()
319 BOOST_ASSERT( size_ <= members_.capacity_ ); in reserve_impl()
324 BOOST_ASSERT( n > members_.capacity_ ); in new_capacity_impl()
325 size_type new_capacity = GrowPolicy::new_capacity( members_.capacity_ ); in new_capacity_impl()
339 boost::swap( l.members_.capacity_, r.members_.capacity_ ); in swap_helper()
364 boost::swap( l.members_.capacity_, r.members_.capacity_ ); in swap_helper()
373 members_.capacity_ = temp.members_.capacity_; in one_sided_swap()
394 BOOST_ASSERT( size_ + n <= members_.capacity_ ); in grow_back()
[all …]
/third_party/boost/boost/fiber/detail/
Dcontext_spinlock_queue.hpp36 std::size_t capacity_; member in boost::fibers::detail::context_spinlock_queue
41 slots_ = new slot_type[2*capacity_]; in resize_()
42 std::size_t offset = capacity_ - cidx_; in resize_()
48 pidx_ = capacity_ - 1; in resize_()
49 capacity_ *= 2; in resize_()
54 return cidx_ == ((pidx_ + 1) % capacity_); in is_full_()
63 capacity_{ capacity } { in context_spinlock_queue()
64 slots_ = new slot_type[capacity_];
85 pidx_ = (pidx_ + 1) % capacity_; in push()
93 cidx_ = (cidx_ + 1) % capacity_; in pop()
[all …]
Dcontext_spmc_queue.hpp49 std::size_t capacity_; member in boost::fibers::detail::context_spmc_queue::array
54 capacity_{ capacity }, in array()
55 storage_{ new storage_type[capacity_] } {
56 for ( std::size_t i = 0; i < capacity_; ++i) {
62 for ( std::size_t i = 0; i < capacity_; ++i) { in ~array()
69 return capacity_; in capacity()
74 std::addressof( storage_[bottom % capacity_]) ) in push()
80 std::addressof( storage_[top % capacity_]) ) in pop()
85 std::unique_ptr< array > tmp{ new array{ 2 * capacity_ } }; in resize()
/third_party/boost/boost/beast/core/impl/
Dstatic_buffer.ipp25 , capacity_(size)
43 if(in_off_ + in_size_ <= capacity_)
51 begin_ + in_off_, capacity_ - in_off_},
53 begin_, in_size_ - (capacity_ - in_off_)}};
61 if(in_off_ + in_size_ <= capacity_)
69 begin_ + in_off_, capacity_ - in_off_},
71 begin_, in_size_ - (capacity_ - in_off_)}};
80 if(n > capacity_ - in_size_)
85 (in_off_ + in_size_) % capacity_;
86 if(out_off + out_size_ <= capacity_ )
[all …]
/third_party/boost/libs/beast/include/boost/beast/core/impl/
Dstatic_buffer.ipp25 , capacity_(size)
43 if(in_off_ + in_size_ <= capacity_)
51 begin_ + in_off_, capacity_ - in_off_},
53 begin_, in_size_ - (capacity_ - in_off_)}};
61 if(in_off_ + in_size_ <= capacity_)
69 begin_ + in_off_, capacity_ - in_off_},
71 begin_, in_size_ - (capacity_ - in_off_)}};
80 if(n > capacity_ - in_size_)
85 (in_off_ + in_size_) % capacity_;
86 if(out_off + out_size_ <= capacity_ )
[all …]
/third_party/protobuf/src/google/protobuf/stubs/
Dbytestream.cc69 : outbuf_(outbuf), capacity_(capacity), size_(0), overflowed_(false) { in CheckedArrayByteSink()
73 size_t available = capacity_ - size_; in Append()
80 GOOGLE_DCHECK(!(outbuf_ <= bytes && bytes < (outbuf_ + capacity_))) in Append()
88 : capacity_(estimated_size), in GrowingArrayByteSink()
98 size_t available = capacity_ - size_; in Append()
102 GOOGLE_DCHECK(!(buf_ <= bytes && bytes < (buf_ + capacity_))) in Append()
119 size_ = capacity_ = 0; in GetBuffer()
124 size_t new_capacity = std::max(capacity_ + amount, (3 * capacity_) / 2); in Expand()
129 capacity_ = new_capacity; in Expand()
135 if (capacity_ > 256 && size_ < (3 * capacity_) / 4) { in ShrinkToFit()
[all …]
/third_party/boost/boost/numeric/ublas/
Dvector_sparse.hpp871 size_ (0), capacity_ (restrict_capacity (0)), filled_ (0), in compressed_vector()
872 index_data_ (capacity_), value_data_ (capacity_) { in compressed_vector()
878 size_ (size), capacity_ (restrict_capacity (non_zeros)), filled_ (0), in compressed_vector()
879 index_data_ (capacity_), value_data_ (capacity_) { in compressed_vector()
885 size_ (v.size_), capacity_ (v.capacity_), filled_ (v.filled_), in compressed_vector()
893 size_ (ae ().size ()), capacity_ (restrict_capacity (non_zeros)), filled_ (0), in compressed_vector()
894 index_data_ (capacity_), value_data_ (capacity_) { in compressed_vector()
906 return capacity_; in nnz_capacity()
956 capacity_ = restrict_capacity (capacity_); in resize()
958 index_data_. resize (capacity_, size_type ()); in resize()
[all …]
Dstorage_sparse.hpp240 alloc_(a), capacity_ (0), size_ (0) { in map_array()
245 alloc_ (c.alloc_), capacity_ (c.size_), size_ (c.size_) { in map_array()
246 if (capacity_) { in map_array()
247 data_ = alloc_.allocate (capacity_); in map_array()
248 std::uninitialized_copy (data_, data_ + capacity_, c.data_); in map_array()
256 if (capacity_) { in ~map_array()
257 std::for_each (data_, data_ + capacity_, static_destroy); in ~map_array()
258 alloc_.deallocate (data_, capacity_); in ~map_array()
266 BOOST_UBLAS_CHECK (size_ <= capacity_, internal_logic ()); in resize()
267 if (size > capacity_) { in resize()
[all …]
/third_party/boost/libs/fiber/performance/thread/
Dbuffered_channel.hpp61 std::size_t capacity_; member in buffered_channel
67 …return 0 > static_cast< std::intptr_t >( slots_[idx & (capacity_ - 1)].cycle.load( std::memory_ord… in is_full_()
72 …return 0 > static_cast< std::intptr_t >( slots_[idx & (capacity_ - 1)].cycle.load( std::memory_ord… in is_empty_()
80 s = & slots_[idx & (capacity_ - 1)]; in try_push_()
101 s = & slots_[idx & (capacity_ - 1)]; in try_value_pop_()
125 s->cycle.store( idx + capacity_, std::memory_order_release); in try_pop_()
132 capacity_{ capacity } { in buffered_channel()
133 if ( 0 == capacity_ || 0 != ( capacity_ & (capacity_ - 1) ) ) {
136 slots_ = new slot[capacity_]();
137 for ( std::size_t i = 0; i < capacity_; ++i) {
[all …]
/third_party/gn/src/base/containers/
Dvector_buffer.h48 capacity_(count) { in VectorBuffer()
51 : buffer_(other.buffer_), capacity_(other.capacity_) { in VectorBuffer()
53 other.capacity_ = 0; in VectorBuffer()
61 capacity_ = other.capacity_;
64 other.capacity_ = 0;
68 size_t capacity() const { return capacity_; } in capacity()
73 T* end() { return &buffer_[capacity_]; } in end()
154 size_t capacity_ = 0; variable
/third_party/boost/libs/contract/example/meyer97/
Dstack4.hpp45 capacity_ = n;
60 capacity_ = other.capacity_; in stack4()
62 array_ = new T[other.capacity_]; in stack4()
77 capacity_ = other.capacity_; in operator =()
79 array_ = new T[other.capacity_]; in operator =()
97 return capacity_; in capacity()
143 return result = (count_ == capacity_); in full()
194 int capacity_; member in stack4
/third_party/mindspore/mindspore/lite/include/
Dlite_utils.h362 capacity_ = DEFAULT_CAPACITY; in Vector()
370 capacity_ = (size == 0 ? DEFAULT_CAPACITY : size); in Vector()
371 data_ = new (std::nothrow) T[capacity_]; in Vector()
380 capacity_ = (size == 0 ? DEFAULT_CAPACITY : size); in Vector()
381 data_ = new (std::nothrow) T[capacity_]; in Vector()
393 capacity_ = vec.capacity_; in Vector()
394 data_ = new (std::nothrow) T[capacity_]; in Vector()
419 data_ = new (std::nothrow) T[capacity_]; in push_back()
423 } else if (size_ == capacity_) { in push_back()
433 data_ = new (std::nothrow) T[capacity_]; in push_back()
[all …]
/third_party/mindspore/mindspore/lite/micro/example/mnist_stm32f746/mnist_stm32f746/include/
Dlite_utils.h361 capacity_ = DEFAULT_CAPACITY; in Vector()
369 capacity_ = (size == 0 ? DEFAULT_CAPACITY : size); in Vector()
370 data_ = new (std::nothrow) T[capacity_]; in Vector()
379 capacity_ = (size == 0 ? DEFAULT_CAPACITY : size); in Vector()
380 data_ = new (std::nothrow) T[capacity_]; in Vector()
392 capacity_ = vec.capacity_; in Vector()
393 data_ = new (std::nothrow) T[capacity_]; in Vector()
418 data_ = new (std::nothrow) T[capacity_]; in push_back()
422 } else if (size_ == capacity_) { in push_back()
432 data_ = new (std::nothrow) T[capacity_]; in push_back()
[all …]
/third_party/skia/third_party/externals/abseil-cpp/absl/strings/internal/
Dcord_rep_ring.h120 index_type capacity() const { return capacity_; } in capacity()
131 assert(head < capacity_ && tail < capacity_); in entries()
132 return tail - head + ((tail > head) ? 0 : capacity_); in entries()
334 index_type n1 = (tail > head) ? tail : capacity_; in ForEach()
363 explicit CordRepRing(index_type capacity) : capacity_(capacity) {} in CordRepRing()
480 index_type capacity_; variable
508 assert(index < capacity_); in advance()
509 return ++index == capacity_ ? 0 : index; in advance()
514 assert(index < capacity_ && n <= capacity_); in advance()
515 return (index += n) >= capacity_ ? index - capacity_ : index; in advance()
[all …]
/third_party/boost/libs/asio/include/boost/asio/detail/
Dwin_fd_set_adapter.hpp39 : capacity_(default_fd_set_size), in win_fd_set_adapter()
44 + sizeof(SOCKET) * (capacity_))); in win_fd_set_adapter()
118 if (n <= capacity_) in reserve()
121 u_int new_capacity = capacity_ + capacity_ / 2; in reserve()
135 capacity_ = new_capacity; in reserve()
139 u_int capacity_; member in boost::asio::detail::win_fd_set_adapter
/third_party/boost/boost/asio/detail/
Dwin_fd_set_adapter.hpp39 : capacity_(default_fd_set_size), in win_fd_set_adapter()
44 + sizeof(SOCKET) * (capacity_))); in win_fd_set_adapter()
118 if (n <= capacity_) in reserve()
121 u_int new_capacity = capacity_ + capacity_ / 2; in reserve()
135 capacity_ = new_capacity; in reserve()
139 u_int capacity_; member in boost::asio::detail::win_fd_set_adapter
/third_party/skia/third_party/externals/abseil-cpp/absl/container/internal/
Draw_hash_set.h867 capacity_ = NormalizeCapacity(bucket_count);
974 auto target = find_first_non_full(ctrl_, hash, capacity_);
975 SetCtrl(target.offset, H2(hash), capacity_, ctrl_, slots_,
991 capacity_(absl::exchange(that.capacity_, 0)),
1003 capacity_(0),
1010 std::swap(capacity_, that.capacity_);
1059 size_t capacity() const { return capacity_; }
1070 if (capacity_ > 127) {
1072 } else if (capacity_) {
1073 for (size_t i = 0; i != capacity_; ++i) {
[all …]
/third_party/boost/boost/fiber/
Dbuffered_channel.hpp49 std::size_t capacity_; member in boost::fibers::buffered_channel
53 return cidx_ == ((pidx_ + 1) % capacity_); in is_full_()
66 capacity_{ capacity } { in buffered_channel()
67 if ( BOOST_UNLIKELY( 2 > capacity_ || 0 != ( capacity_ & (capacity_ - 1) ) ) ) {
71 slots_ = new slot_type[capacity_];
133 pidx_ = (pidx_ + 1) % capacity_; in try_push()
166 pidx_ = (pidx_ + 1) % capacity_; in try_push()
203 pidx_ = (pidx_ + 1) % capacity_; in push()
242 pidx_ = (pidx_ + 1) % capacity_; in push()
304 pidx_ = (pidx_ + 1) % capacity_; in push_wait_until()
[all …]
/third_party/node/deps/icu-small/source/i18n/
Dcollationkeys.h35 : buffer_(dest), capacity_(destCapacity), in SortKeyByteSink()
46 if (appended_ < capacity_ || Resize(1, appended_)) { in Append()
64 return ignore_ + capacity_ - appended_; in GetRemainingCapacity()
67 UBool Overflowed() const { return appended_ > capacity_; } in Overflowed()
77 capacity_ = 0; in SetNotOk()
81 int32_t capacity_; variable
/third_party/flutter/skia/third_party/externals/icu/source/i18n/
Dcollationkeys.h35 : buffer_(dest), capacity_(destCapacity), in SortKeyByteSink()
46 if (appended_ < capacity_ || Resize(1, appended_)) { in Append()
64 return ignore_ + capacity_ - appended_; in GetRemainingCapacity()
67 UBool Overflowed() const { return appended_ > capacity_; } in Overflowed()
77 capacity_ = 0; in SetNotOk()
81 int32_t capacity_; variable

1234