Home
last modified time | relevance | path

Searched refs:capacity (Results 1 – 25 of 92) sorted by relevance

1234

/packages/apps/Test/connectivity/sl4n/rapidjson/include/rapidjson/
Dallocators.h131 chunkHead_->capacity = size - sizeof(ChunkHeader);
159 size_t capacity = 0; in Capacity() local
161 capacity += c->capacity; in Capacity()
162 return capacity; in Capacity()
181 if (chunkHead_ == 0 || chunkHead_->size + size > chunkHead_->capacity) in Malloc()
205 if (chunkHead_->size + increment <= chunkHead_->capacity) { in Realloc()
231 void AddChunk(size_t capacity) { in AddChunk() argument
234 …erpret_cast<ChunkHeader*>(baseAllocator_->Malloc(RAPIDJSON_ALIGN(sizeof(ChunkHeader)) + capacity)); in AddChunk()
235 chunk->capacity = capacity; in AddChunk()
247 size_t capacity; //!< Capacity of the chunk in bytes (excluding the header itself). member
Ddocument.h998 if (o.size >= o.capacity) {
999 if (o.capacity == 0) {
1000 o.capacity = kDefaultObjectCapacity;
1001 … o.members = reinterpret_cast<Member*>(allocator.Malloc(o.capacity * sizeof(Member)));
1004 SizeType oldCapacity = o.capacity;
1005 o.capacity += (oldCapacity + 1) / 2; // grow by factor 1.5
1006 …t<Member*>(allocator.Realloc(o.members, oldCapacity * sizeof(Member), o.capacity * sizeof(Member))…
1281 SizeType Capacity() const { RAPIDJSON_ASSERT(IsArray()); return data_.a.capacity; }
1330 if (newCapacity > data_.a.capacity) {
1331 …data_.a.elements = (GenericValue*)allocator.Realloc(data_.a.elements, data_.a.capacity * sizeof(Ge…
[all …]
/packages/modules/StatsD/lib/libkll/tests/
Dcompactor_stack_test.cpp37 int capacity; member
43 for (int capacity = 2; capacity < 1030; capacity *= 2) { in GenCompactorsTestParams() local
44 testcases.push_back({num_items, capacity}); in GenCompactorsTestParams()
66 while (sampler.capacity() < params.capacity) { in TEST_P()
72 EXPECT_EQ(compactor_stack.num_stored_items(), params.num_items / sampler.capacity()); in TEST_P()
75 params.num_items % sampler.capacity()); in TEST_P()
77 EXPECT_EQ(0, params.num_items % sampler.capacity()); in TEST_P()
90 while (sampler.capacity() < params.capacity) { in TEST_P()
100 EXPECT_EQ(compactor_stack.num_stored_items(), params.num_items / sampler.capacity()); in TEST_P()
103 params.num_items % sampler.capacity()); in TEST_P()
[all …]
Dsampler_test.cpp86 EXPECT_EQ(sampler.capacity(), 2); in TEST_F()
102 EXPECT_EQ(sampler.capacity(), 4); in TEST_F()
115 EXPECT_EQ(sampler.capacity(), 2); in TEST_F()
133 EXPECT_EQ(sampler.capacity(), 2); in TEST_F()
215 EXPECT_EQ(sampler.capacity(), 4); in TEST_F()
222 EXPECT_EQ(sampler.capacity(), 8); in TEST_F()
251 EXPECT_EQ(sampler.capacity(), 4); in TEST_F()
261 EXPECT_EQ(sampler.capacity(), 2); in TEST_F()
264 EXPECT_EQ(sampler.capacity(), 4); in TEST_F()
297 while (sampler.capacity() <= num_items) { in TEST_P()
/packages/modules/Bluetooth/system/osi/src/
Darray.cc34 size_t capacity; member
50 array->capacity = INTERNAL_ELEMENTS; in array_new()
84 if (array->length == array->capacity && !grow(array)) { in array_append_ptr()
88 __func__, array->capacity, array->element_size); in array_append_ptr()
98 const size_t new_capacity = array->capacity + (array->capacity / 2); in grow()
110 array->capacity = new_capacity; in grow()
Dfixed_queue.cc37 size_t capacity; member
46 fixed_queue_t* fixed_queue_new(size_t capacity) { in fixed_queue_new() argument
51 ret->capacity = capacity; in fixed_queue_new()
56 ret->enqueue_sem = semaphore_new(capacity); in fixed_queue_new()
114 return queue->capacity; in fixed_queue_capacity()
/packages/inputmethods/LatinIME/native/jni/src/suggest/core/dicnode/
Ddic_node_pool.h31 explicit DicNodePool(const int capacity) : mDicNodes(), mPooledDicNodes() { in DicNodePool() argument
32 reset(capacity); in DicNodePool()
35 void reset(const int capacity) { in reset() argument
36 if (capacity == static_cast<int>(mDicNodes.size()) in reset()
37 && capacity == static_cast<int>(mPooledDicNodes.size())) { in reset()
41 mDicNodes.resize(capacity); in reset()
Ddic_node_priority_queue.h32 AK_FORCE_INLINE explicit DicNodePriorityQueue(const int capacity) in DicNodePriorityQueue() argument
33 : mMaxSize(capacity), mDicNodesQueue(), mDicNodePool(capacity) { in DicNodePriorityQueue()
/packages/apps/Gallery2/src/com/android/gallery3d/data/
DBytesBufferPool.java35 private BytesBuffer(int capacity) { in BytesBuffer() argument
36 this.data = new byte[capacity]; in BytesBuffer()
44 int capacity = data.length; in readFrom() local
46 int step = Math.min(READ_STEP, capacity - length); in readFrom()
51 if (length == capacity) { in readFrom()
55 capacity = data.length; in readFrom()
/packages/apps/Camera2/src/com/android/camera/one/v2/sharedimagereader/
DManagedImageReader.java96 private AllocatingImageStream createUnallocatedStream(int capacity) { in createUnallocatedStream() argument
108 AllocatingImageStream stream = new AllocatingImageStream(capacity, in createUnallocatedStream()
127 public ImageStream createStream(int capacity) { in createStream() argument
128 return createUnallocatedStream(capacity); in createStream()
148 public ImageStream createPreallocatedStream(int capacity) throws InterruptedException, in createPreallocatedStream() argument
150 AllocatingImageStream stream = createUnallocatedStream(capacity); in createPreallocatedStream()
/packages/apps/TV/tuner/src/com/android/tv/tuner/exoplayer/buffer/
DSamplePool.java40 if (sample.data.capacity() >= size in acquireSample()
42 || smallestSufficientSample.data.capacity() > sample.data.capacity())) { in acquireSample()
47 if (maxSample.data.capacity() < sample.data.capacity()) { in acquireSample()
/packages/apps/TV/tuner/src/com/android/tv/tuner/exoplayer2/buffer/
DInputBufferPool.java42 if (sample.data.capacity() >= size in acquireSample()
44 || smallestSufficientSample.data.capacity() > sample.data.capacity())) { in acquireSample()
49 if (maxSample.data.capacity() < sample.data.capacity()) { in acquireSample()
/packages/services/Car/car-lib/src/com/android/car/internal/util/
DSets.java69 int capacity = elements.length * 4 / 3 + 1; in newHashSet() local
70 HashSet<E> set = new HashSet<E>(capacity); in newHashSet()
108 int capacity = elements.length * 4 / 3 + 1; in newArraySet() local
109 ArraySet<E> set = new ArraySet<E>(capacity); in newArraySet()
DLists.java63 int capacity = (elements.length * 110) / 100 + 5; in newArrayList() local
64 ArrayList<E> list = new ArrayList<E>(capacity); in newArrayList()
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/latin/utils/
DSuggestionResults.java39 public SuggestionResults(final int capacity, final boolean isBeginningOfSentence, in SuggestionResults() argument
41 this(sSuggestedWordInfoComparator, capacity, isBeginningOfSentence, in SuggestionResults()
45 private SuggestionResults(final Comparator<SuggestedWordInfo> comparator, final int capacity, in SuggestionResults() argument
49 mCapacity = capacity; in SuggestionResults()
/packages/apps/TV/tuner/src/com/android/tv/tuner/util/
DByteArrayBuffer.java43 public ByteArrayBuffer(int capacity) { in ByteArrayBuffer() argument
45 if (capacity < 0) { in ByteArrayBuffer()
48 this.buffer = new byte[capacity]; in ByteArrayBuffer()
129 public int capacity() { in capacity() method in ByteArrayBuffer
/packages/apps/Camera2/src/com/android/camera/processing/imagebackend/
DTaskJpegEncode.java84 byte[] dataCopy = new byte[y_buffer.capacity() + u_buffer.capacity() + v_buffer.capacity()]; in convertYUV420ImageToPackedNV21()
110 final int y_size = y_buffer.capacity(); in convertYUV420ImageToPackedNV21()
111 final int u_size = u_buffer.capacity(); in convertYUV420ImageToPackedNV21()
/packages/modules/Bluetooth/system/gd/common/
Dlru_cache_test.cc423 int capacity = 0xFFFF; // 2^16 = 65535 in TEST() local
424 LruCache<int, int> cache(static_cast<size_t>(capacity)); in TEST()
427 for (int key = 0; key < capacity; key++) { in TEST()
432 for (int key = 0; key < capacity; key++) { in TEST()
437 for (int key = 0; key < capacity; key++) { in TEST()
438 int new_key = key + capacity; in TEST()
446 for (int key = capacity; key < 2 * capacity; key++) { in TEST()
458 EXPECT_LT(execution_time, execution_time_per_cycle_us * capacity); in TEST()
Dbidi_queue.h64 explicit BidiQueue(size_t capacity) in BidiQueue() argument
65 : up_queue_(capacity), in BidiQueue()
66 down_queue_(capacity), in BidiQueue()
/packages/inputmethods/LatinIME/common/src/com/android/inputmethod/latin/common/
DResizableIntArray.java31 public ResizableIntArray(final int capacity) { in ResizableIntArray() argument
32 reset(capacity); in ResizableIntArray()
91 public void reset(final int capacity) { in reset() argument
93 mArray = new int[capacity]; in reset()
/packages/apps/Camera2/src/com/android/camera/one/v2/sharedimagereader/ticketpool/
DFiniteTicketPool.java85 public FiniteTicketPool(int capacity) { in FiniteTicketPool() argument
86 mMaxCapacity = capacity; in FiniteTicketPool()
88 mTickets = capacity; in FiniteTicketPool()
91 mAvailableTicketCount = new ConcurrentState<>(capacity); in FiniteTicketPool()
/packages/apps/Test/connectivity/sl4n/rapidjson/test/unittest/
Ddocumenttest.cpp432 size_t capacity = a.GetStackCapacity();
433 EXPECT_GT(capacity, 0u);
437 EXPECT_EQ(b.GetStackCapacity(), capacity);
441 EXPECT_EQ(c.GetStackCapacity(), capacity);
529 size_t capacity = a.GetStackCapacity();
530 EXPECT_GT(capacity, 0u);
535 EXPECT_EQ(b.GetStackCapacity(), capacity);
540 EXPECT_EQ(c.GetStackCapacity(), capacity);
/packages/modules/Bluetooth/system/test/mock/
Dmock_osi_fixed_queue.h173 std::function<fixed_queue_t*(size_t capacity)> body{
174 [this](size_t capacity) { return return_value; }};
175 fixed_queue_t* operator()(size_t capacity) { return body(capacity); }; in operator()
/packages/modules/Bluetooth/system/common/
Dleaky_bonded_queue.h45 LeakyBondedQueue(size_t capacity);
95 LeakyBondedQueue<T>::LeakyBondedQueue(size_t capacity) { in LeakyBondedQueue() argument
96 capacity_ = capacity; in LeakyBondedQueue()
/packages/modules/StatsD/lib/libkll/
Dcompactor_stack.cpp72 sampler_->AddWithWeight(value, remaining_weight % sampler_->capacity()); in AddWithWeight()
73 remaining_weight /= sampler_->capacity(); in AddWithWeight()
199 return sampler_ ? sampler_->capacity() : 1; // capacity = 1 to denote the empty sampler. in sampler_capacity()

1234