Home
last modified time | relevance | path

Searched refs:index (Results 1 – 25 of 98) sorted by relevance

1234

/system/core/libpixelflinger/codeflinger/tinyutils/
DVector.h92 inline const TYPE& operator [] (size_t index) const;
94 inline const TYPE& itemAt(size_t index) const;
98 const TYPE& mirrorItemAt(ssize_t index) const;
105 TYPE& editItemAt(size_t index);
114 ssize_t insertVectorAt(const Vector<TYPE>& vector, size_t index);
125 inline ssize_t insertAt(size_t index, size_t numItems = 1);
127 ssize_t insertAt(const TYPE& prototype_item, size_t index, size_t numItems = 1);
139 inline ssize_t replaceAt(size_t index);
141 ssize_t replaceAt(const TYPE& item, size_t index);
148 inline ssize_t removeItemsAt(size_t index, size_t count = 1);
[all …]
DVectorImpl.cpp112 ssize_t VectorImpl::insertVectorAt(const VectorImpl& vector, size_t index) in insertVectorAt() argument
114 if (index > size()) in insertVectorAt()
116 void* where = _grow(index, vector.size()); in insertVectorAt()
120 return where ? index : (ssize_t)NO_MEMORY; in insertVectorAt()
128 ssize_t VectorImpl::insertAt(size_t index, size_t numItems) in insertAt() argument
130 return insertAt(0, index, numItems); in insertAt()
133 ssize_t VectorImpl::insertAt(const void* item, size_t index, size_t numItems) in insertAt() argument
135 if (index > size()) in insertAt()
137 void* where = _grow(index, numItems); in insertAt()
145 return where ? index : (ssize_t)NO_MEMORY; in insertAt()
[all …]
DSortedVector.h93 inline const TYPE& operator [] (size_t index) const;
95 inline const TYPE& itemAt(size_t index) const;
99 const TYPE& mirrorItemAt(ssize_t index) const;
109 TYPE& editItemAt(size_t index) { in editItemAt() argument
110 return *( static_cast<TYPE *>(VectorImpl::editItemLocation(index)) ); in editItemAt()
121 inline ssize_t removeItemsAt(size_t index, size_t count = 1);
123 inline ssize_t removeAt(size_t index) { return removeItemsAt(index); } in removeAt() argument
185 const TYPE& SortedVector<TYPE>::operator[](size_t index) const {
186 assert( index<size() );
187 return *(array() + index);
[all …]
DKeyedVector.h65 const VALUE& valueAt(size_t index) const;
66 const KEY& keyAt(size_t index) const;
74 VALUE& editValueAt(size_t index);
82 ssize_t replaceValueAt(size_t index, const VALUE& item);
89 ssize_t removeItemsAt(size_t index, size_t count = 1);
132 const VALUE& KeyedVector<KEY,VALUE>::valueAt(size_t index) const { in valueAt() argument
133 return mVector.itemAt(index).value; in valueAt()
137 const KEY& KeyedVector<KEY,VALUE>::keyAt(size_t index) const { in keyAt() argument
138 return mVector.itemAt(index).key; in keyAt()
149 VALUE& KeyedVector<KEY,VALUE>::editValueAt(size_t index) { in editValueAt() argument
[all …]
DVectorImpl.h70 ssize_t insertVectorAt(const VectorImpl& vector, size_t index);
81 ssize_t replaceAt(size_t index);
82 ssize_t replaceAt(const void* item, size_t index);
85 ssize_t removeItemsAt(size_t index, size_t count = 1);
88 const void* itemLocation(size_t index) const;
89 void* editItemLocation(size_t index);
181 ssize_t insertVectorAt(const VectorImpl& vector, size_t index);
185 ssize_t replaceAt(size_t index);
186 ssize_t replaceAt(const void* item, size_t index);
/system/media/alsa_utils/
Dalsa_device_profile.c146 size_t index; in profile_is_sample_rate_valid() local
147 for (index = 0; profile->sample_rates[index] != 0; index++) { in profile_is_sample_rate_valid()
148 if (profile->sample_rates[index] == rate) { in profile_is_sample_rate_valid()
172 size_t index; in profile_is_format_valid() local
173 for (index = 0; profile->formats[index] != PCM_FORMAT_INVALID; index++) { in profile_is_format_valid()
174 if (profile->formats[index] == fmt) { in profile_is_format_valid()
222 unsigned index; in profile_enum_sample_rates() local
224 for (index = 0; index < ARRAY_SIZE(std_sample_rates) && in profile_enum_sample_rates()
226 index++) { in profile_enum_sample_rates()
227 if (std_sample_rates[index] >= min && std_sample_rates[index] <= max in profile_enum_sample_rates()
[all …]
/system/core/libutils/tests/
DBasicHashtable_test.cpp112 static void cookieAt(const BasicHashtable<TKey, TEntry>& h, size_t index, in cookieAt() argument
114 uint32_t cookie = h.cookieAt(index); in cookieAt()
134 ssize_t index, const TKey& key) { in find() argument
135 return h.find(index, hash_type(key), key); in find()
141 ssize_t index = find(h, -1, key); in remove() local
142 if (index >= 0) { in remove()
143 h.removeAt(index); in remove()
221 ssize_t index = find(h, -1, 8); in TEST_F() local
222 ASSERT_EQ(-1, index); in TEST_F()
224 index = add(h, 8, 1); in TEST_F()
[all …]
/system/core/include/utils/
DVector.h103 inline const TYPE& operator [] (size_t index) const;
105 inline const TYPE& itemAt(size_t index) const;
114 TYPE& editItemAt(size_t index);
123 ssize_t insertVectorAt(const Vector<TYPE>& vector, size_t index);
130 ssize_t insertArrayAt(const TYPE* array, size_t index, size_t length);
140 inline ssize_t insertAt(size_t index, size_t numItems = 1);
142 ssize_t insertAt(const TYPE& prototype_item, size_t index, size_t numItems = 1);
154 inline ssize_t replaceAt(size_t index);
156 ssize_t replaceAt(const TYPE& item, size_t index);
163 inline ssize_t removeItemsAt(size_t index, size_t count = 1);
[all …]
DBasicHashtable.h68 ssize_t next(ssize_t index) const;
69 ssize_t find(ssize_t index, hash_t hash, const void* __restrict__ key) const;
71 void removeAt(size_t index);
83 inline const Bucket& bucketAt(const void* __restrict__ buckets, size_t index) const { in bucketAt() argument
85 static_cast<const uint8_t*>(buckets) + index * mBucketSize); in bucketAt()
88 inline Bucket& bucketAt(void* __restrict__ buckets, size_t index) const { in bucketAt() argument
89 return *reinterpret_cast<Bucket*>(static_cast<uint8_t*>(buckets) + index * mBucketSize); in bucketAt()
140 inline static size_t chainSeek(size_t index, size_t increment, size_t count) { in chainSeek() argument
141 return (index + increment) % count; in chainSeek()
232 inline const TEntry& entryAt(size_t index) const { in entryAt() argument
[all …]
DKeyedVector.h69 const VALUE& valueAt(size_t index) const;
70 const KEY& keyAt(size_t index) const;
72 const VALUE& operator[] (size_t index) const;
79 VALUE& editValueAt(size_t index);
87 ssize_t replaceValueAt(size_t index, const VALUE& item);
94 ssize_t removeItemsAt(size_t index, size_t count = 1);
149 const VALUE& KeyedVector<KEY,VALUE>::valueAt(size_t index) const {
150 return mVector.itemAt(index).value;
154 const VALUE& KeyedVector<KEY,VALUE>::operator[] (size_t index) const {
155 return valueAt(index);
[all …]
DVectorImpl.h70 ssize_t insertVectorAt(const VectorImpl& vector, size_t index);
72 ssize_t insertArrayAt(const void* array, size_t index, size_t length);
83 ssize_t replaceAt(size_t index);
84 ssize_t replaceAt(const void* item, size_t index);
87 ssize_t removeItemsAt(size_t index, size_t count = 1);
90 const void* itemLocation(size_t index) const;
91 void* editItemLocation(size_t index);
168 ssize_t insertVectorAt(const VectorImpl& vector, size_t index);
170 ssize_t insertArrayAt(const void* array, size_t index, size_t length);
174 ssize_t replaceAt(size_t index);
[all …]
DSortedVector.h96 inline const TYPE& operator [] (size_t index) const;
98 inline const TYPE& itemAt(size_t index) const;
110 TYPE& editItemAt(size_t index) { in editItemAt() argument
111 return *( static_cast<TYPE *>(VectorImpl::editItemLocation(index)) ); in editItemAt()
122 inline ssize_t removeItemsAt(size_t index, size_t count = 1);
124 inline ssize_t removeAt(size_t index) { return removeItemsAt(index); } in removeAt() argument
188 const TYPE& SortedVector<TYPE>::operator[](size_t index) const {
189 LOG_FATAL_IF(index>=size(),
191 int(index), int(size()));
192 return *(array() + index);
[all …]
DLruCache.h63 size_t index() const { in index() function
129 ssize_t index = mTable->find(-1, hash, key); in get() local
130 if (index == -1) { in get()
133 Entry& entry = mTable->editEntryAt(index); in get()
146 ssize_t index = mTable->find(-1, hash, key); in put() local
147 if (index >= 0) { in put()
156 index = mTable->add(hash, initEntry); in put()
157 Entry& entry = mTable->editEntryAt(index); in put()
165 ssize_t index = mTable->find(-1, hash, key); in remove() local
166 if (index < 0) { in remove()
[all …]
/system/core/libutils/
DVectorImpl.cpp109 ssize_t VectorImpl::insertVectorAt(const VectorImpl& vector, size_t index) in insertVectorAt() argument
111 return insertArrayAt(vector.arrayImpl(), index, vector.size()); in insertVectorAt()
119 ssize_t VectorImpl::insertArrayAt(const void* array, size_t index, size_t length) in insertArrayAt() argument
121 if (index > size()) in insertArrayAt()
123 void* where = _grow(index, length); in insertArrayAt()
127 return where ? index : (ssize_t)NO_MEMORY; in insertArrayAt()
135 ssize_t VectorImpl::insertAt(size_t index, size_t numItems) in insertAt() argument
137 return insertAt(0, index, numItems); in insertAt()
140 ssize_t VectorImpl::insertAt(const void* item, size_t index, size_t numItems) in insertAt() argument
142 if (index > size()) in insertAt()
[all …]
DBasicHashtable.cpp101 ssize_t BasicHashtableImpl::next(ssize_t index) const { in next()
103 while (size_t(++index) < mBucketCount) { in next()
104 const Bucket& bucket = bucketAt(mBuckets, index); in next()
106 return index; in next()
113 ssize_t BasicHashtableImpl::find(ssize_t index, hash_t hash, in find() argument
120 if (index < 0) { in find()
121 index = chainStart(hash, mBucketCount); in find()
123 const Bucket& bucket = bucketAt(mBuckets, size_t(index)); in find()
126 return index; in find()
137 index = chainSeek(index, inc, mBucketCount); in find()
[all …]
/system/bt/stack/btm/
Dbtm_ble_batchscan.c199 int index = 0, len = 0; in btm_ble_batchscan_enq_rep_data() local
202 for (index = 0; index < BTM_BLE_BATCH_REP_MAIN_Q_SIZE; index++) in btm_ble_batchscan_enq_rep_data()
204 if (report_format == ble_batchscan_cb.main_rep_q.rep_mode[index]) in btm_ble_batchscan_enq_rep_data()
209 index, report_format, num_records, data_len); in btm_ble_batchscan_enq_rep_data()
211 if (index < BTM_BLE_BATCH_REP_MAIN_Q_SIZE && data_len > 0 && num_records > 0) in btm_ble_batchscan_enq_rep_data()
213 len = ble_batchscan_cb.main_rep_q.data_len[index]; in btm_ble_batchscan_enq_rep_data()
214 p_orig_data = ble_batchscan_cb.main_rep_q.p_data[index]; in btm_ble_batchscan_enq_rep_data()
221 ble_batchscan_cb.main_rep_q.p_data[index] = p_app_data; in btm_ble_batchscan_enq_rep_data()
222 ble_batchscan_cb.main_rep_q.num_records[index] += num_records; in btm_ble_batchscan_enq_rep_data()
223 ble_batchscan_cb.main_rep_q.data_len[index] += data_len; in btm_ble_batchscan_enq_rep_data()
[all …]
/system/bt/bta/sys/
Dbta_sys_conn.c123 UINT8 index; in bta_sys_collision_register() local
125 for (index = 0; index < MAX_COLLISION_REG; index++) in bta_sys_collision_register()
127 if ((bta_sys_cb.colli_reg.id[index] == bta_id) || in bta_sys_collision_register()
128 (bta_sys_cb.colli_reg.id[index] == 0)) in bta_sys_collision_register()
130 bta_sys_cb.colli_reg.id[index] = bta_id; in bta_sys_collision_register()
131 bta_sys_cb.colli_reg.p_coll_cback[index] = p_cback; in bta_sys_collision_register()
149 UINT8 index; in bta_sys_notify_collision() local
151 for (index = 0; index < MAX_COLLISION_REG; index++) in bta_sys_notify_collision()
153 if ((bta_sys_cb.colli_reg.id[index] != 0) && in bta_sys_notify_collision()
154 (bta_sys_cb.colli_reg.p_coll_cback[index] != NULL)) in bta_sys_notify_collision()
[all …]
/system/bt/btif/co/
Dbta_av_co.c249 UINT8 index; in bta_av_co_get_peer() local
252 index = BTA_AV_CO_AUDIO_HNDL_TO_INDX(hndl); in bta_av_co_get_peer()
255 if (index >= BTA_AV_CO_NUM_ELEMENTS(bta_av_co_cb.peers)) in bta_av_co_get_peer()
257 APPL_TRACE_ERROR("bta_av_co_get_peer peer index out of bounds:%d", index); in bta_av_co_get_peer()
261 return &bta_av_co_cb.peers[index]; in bta_av_co_get_peer()
278 UINT8 *p_protect_info, UINT8 index) in bta_av_co_audio_init() argument
282 APPL_TRACE_DEBUG("bta_av_co_audio_init: %d", index); in bta_av_co_audio_init()
291 switch (index) in bta_av_co_audio_init()
466 UINT8 index; in bta_av_audio_sink_getconfig() local
534 if (bta_av_co_audio_peer_src_supports_codec(p_peer, &index)) in bta_av_audio_sink_getconfig()
[all …]
/system/media/camera/tests/
Dcamera_metadata_tests.cpp297 size_t index = 0; in TEST() local
301 index, &entry); in TEST()
303 EXPECT_EQ(index, (int)entry.index); in TEST()
308 index++; in TEST()
311 index, &entry); in TEST()
313 EXPECT_EQ(index, entry.index); in TEST()
318 index++; in TEST()
321 index, &entry); in TEST()
323 EXPECT_EQ(index, entry.index); in TEST()
328 index++; in TEST()
[all …]
/system/media/camera/src/
Dcamera_metadata.c596 size_t index, in get_camera_metadata_entry() argument
599 if (index >= src->entry_count) return ERROR; in get_camera_metadata_entry()
601 camera_metadata_buffer_entry_t *buffer_entry = get_entries(src) + index; in get_camera_metadata_entry()
603 entry->index = index; in get_camera_metadata_entry()
617 size_t index, in get_camera_metadata_ro_entry() argument
619 return get_camera_metadata_entry((camera_metadata_t*)src, index, in get_camera_metadata_ro_entry()
628 uint32_t index; in find_camera_metadata_entry() local
640 index = search_entry - get_entries(src); in find_camera_metadata_entry()
644 for (index = 0; index < src->entry_count; index++, search_entry++) { in find_camera_metadata_entry()
649 if (index == src->entry_count) return NOT_FOUND; in find_camera_metadata_entry()
[all …]
/system/core/libcutils/
Dhashmap.c118 size_t index = calculateIndex(newBucketCount, entry->hash); in expandIfNecessary() local
119 entry->next = newBuckets[index]; in expandIfNecessary()
120 newBuckets[index] = entry; in expandIfNecessary()
191 size_t index = calculateIndex(map->bucketCount, hash); in hashmapPut() local
193 Entry** p = &(map->buckets[index]); in hashmapPut()
223 size_t index = calculateIndex(map->bucketCount, hash); in hashmapGet() local
225 Entry* entry = map->buckets[index]; in hashmapGet()
238 size_t index = calculateIndex(map->bucketCount, hash); in hashmapContainsKey() local
240 Entry* entry = map->buckets[index]; in hashmapContainsKey()
254 size_t index = calculateIndex(map->bucketCount, hash); in hashmapMemoize() local
[all …]
/system/media/audio_utils/
Dfifo.c46 static inline int32_t audio_utils_fifo_sum(struct audio_utils_fifo *fifo, int32_t index, in audio_utils_fifo_sum() argument
51 ALOG_ASSERT((index & mask) < fifo->mFrameCount); in audio_utils_fifo_sum()
53 if ((index & mask) + increment >= fifo->mFrameCount) { in audio_utils_fifo_sum()
56 index += increment; in audio_utils_fifo_sum()
57 ALOG_ASSERT((index & mask) < fifo->mFrameCount); in audio_utils_fifo_sum()
58 return index; in audio_utils_fifo_sum()
60 return index + increment; in audio_utils_fifo_sum()
/system/media/radio/src/
Dradio_metadata.c134 const unsigned index, in get_entry_at_index() argument
137 unsigned int index_offset = metadata->size_int - index - 1; in get_entry_at_index()
141 if (index >= metadata->count) { in get_entry_at_index()
241 unsigned int index; in radio_metadata_add_metadata() local
258 for (index = 0; index < src_metadata_buf->count; index++) { in radio_metadata_add_metadata()
263 status = radio_metadata_get_at_index(src_metadata, index, &key, &type, &value, &size); in radio_metadata_add_metadata()
345 const unsigned int index, in radio_metadata_get_at_index() argument
361 if (index >= metadata_buf->count) { in radio_metadata_get_at_index()
365 entry = get_entry_at_index(metadata_buf, index, false); in radio_metadata_get_at_index()
/system/core/logd/
DLogStatistics.cpp278 ssize_t index = -1; in format() local
279 while ((index = uidTable_t::next(index, sorted, maximum_sorted_entries)) >= 0) { in format()
280 const UidEntry *entry = sorted[index]; in format()
341 ssize_t index = -1; in format() local
342 while ((index = pidTable.next(index, sorted, maximum_sorted_entries)) >= 0) { in format()
343 const PidEntry *entry = sorted[index]; in format()
400 ssize_t index = -1; in format() local
401 while ((index = tidTable.next(index, sorted, maximum_sorted_entries)) >= 0) { in format()
402 const TidEntry *entry = sorted[index]; in format()
456 ssize_t index = -1; in format() local
[all …]
/system/bt/bta/hh/
Dbta_hh_main.c425 UINT8 index = BTA_HH_IDX_INVALID; in bta_hh_hdl_event() local
447 index = bta_hh_find_cb(((tBTA_HH_API_CONN *)p_msg)->bd_addr); in bta_hh_hdl_event()
454 index = bta_hh_find_cb(((tBTA_HH_MAINT_DEV *)p_msg)->bda); in bta_hh_hdl_event()
458 index = bta_hh_dev_handle_to_cb_idx((UINT8)p_msg->layer_specific); in bta_hh_hdl_event()
466 if ((index != BTA_HH_IDX_INVALID) && in bta_hh_hdl_event()
467 (bta_hh_cb.kdev[index].in_use == FALSE)) { in bta_hh_hdl_event()
468 index = BTA_HH_IDX_INVALID; in bta_hh_hdl_event()
475 index = bta_hh_find_cb(((tBTA_HH_CBACK_DATA *)p_msg)->addr); in bta_hh_hdl_event()
478 index = bta_hh_dev_handle_to_cb_idx((UINT8)p_msg->layer_specific); in bta_hh_hdl_event()
480 if (index != BTA_HH_IDX_INVALID) in bta_hh_hdl_event()
[all …]

1234