Home
last modified time | relevance | path

Searched refs:count (Results 1 – 25 of 487) sorted by relevance

12345678910>>...20

/system/media/audio_utils/
Dprimitives.c30 void memcpy_to_i16_from_q4_27(int16_t *dst, const int32_t *src, size_t count) in memcpy_to_i16_from_q4_27() argument
32 for (; count > 0; --count) { in memcpy_to_i16_from_q4_27()
37 void memcpy_to_i16_from_u8(int16_t *dst, const uint8_t *src, size_t count) in memcpy_to_i16_from_u8() argument
39 dst += count; in memcpy_to_i16_from_u8()
40 src += count; in memcpy_to_i16_from_u8()
41 for (; count > 0; --count) { in memcpy_to_i16_from_u8()
46 void memcpy_to_u8_from_i16(uint8_t *dst, const int16_t *src, size_t count) in memcpy_to_u8_from_i16() argument
48 for (; count > 0; --count) { in memcpy_to_u8_from_i16()
53 void memcpy_to_u8_from_p24(uint8_t *dst, const uint8_t *src, size_t count) in memcpy_to_u8_from_p24() argument
55 for (; count > 0; --count) { in memcpy_to_u8_from_p24()
[all …]
Dformat.c26 const void *src, audio_format_t src_format, size_t count) in memcpy_by_audio_format() argument
39 memcpy(dst, src, count * audio_bytes_per_sample(dst_format)); in memcpy_by_audio_format()
50 memcpy_to_i16_from_float((int16_t*)dst, (float*)src, count); in memcpy_by_audio_format()
53 memcpy_to_i16_from_u8((int16_t*)dst, (uint8_t*)src, count); in memcpy_by_audio_format()
56 memcpy_to_i16_from_p24((int16_t*)dst, (uint8_t*)src, count); in memcpy_by_audio_format()
59 memcpy_to_i16_from_i32((int16_t*)dst, (int32_t*)src, count); in memcpy_by_audio_format()
62 memcpy_to_i16_from_q8_23((int16_t*)dst, (int32_t*)src, count); in memcpy_by_audio_format()
71 memcpy_to_float_from_i16((float*)dst, (int16_t*)src, count); in memcpy_by_audio_format()
74 memcpy_to_float_from_u8((float*)dst, (uint8_t*)src, count); in memcpy_by_audio_format()
77 memcpy_to_float_from_p24((float*)dst, (uint8_t*)src, count); in memcpy_by_audio_format()
[all …]
Dfifo.cpp178 ssize_t audio_utils_fifo_writer::write(const void *buffer, size_t count, in write() argument
183 ssize_t availToWrite = obtain(iovec, count, timeout); in write()
198 ssize_t audio_utils_fifo_writer::obtain(audio_utils_iovec iovec[2], size_t count, in obtain() argument
220 if (count == 0 || availToWrite > 0 || timeout == NULL || in obtain()
283 if (availToWrite > count) { in obtain()
284 availToWrite = count; in obtain()
303 void audio_utils_fifo_writer::release(size_t count) in release() argument
307 if (count > 0) { in release()
308 if (count > mObtained) { in release()
309 ALOGE("%s(count=%zu) > mObtained=%u", __func__, count, mObtained); in release()
[all …]
/system/bt/gd/common/
Dobserver_registry_test.cc38 void Increment(int* count) { in Increment() argument
39 (*count)++; in Increment()
42 void IncrementBy(int* count, int n) { in IncrementBy() argument
43 (*count) += n; in IncrementBy()
47 int count = 0; in TEST_F() local
48 auto wrapped_callback = registry_->Register(Bind(&Increment, Unretained(&count))); in TEST_F()
50 EXPECT_EQ(count, 1); in TEST_F()
52 EXPECT_EQ(count, 2); in TEST_F()
54 EXPECT_EQ(count, 3); in TEST_F()
59 int count = 0; in TEST_F() local
[all …]
/system/media/audio_utils/tests/
Dprimitives_benchmark.cpp26 const size_t count = state.range(0); in BM_MemcpyToFloatFromFloatWithClamping() local
30 std::vector<float> src(count); in BM_MemcpyToFloatFromFloatWithClamping()
31 std::vector<float> dst(count); in BM_MemcpyToFloatFromFloatWithClamping()
32 std::vector<float> expected(count); in BM_MemcpyToFloatFromFloatWithClamping()
35 std::minstd_rand gen(count); in BM_MemcpyToFloatFromFloatWithClamping()
37 for (size_t i = 0; i < count; i++) { in BM_MemcpyToFloatFromFloatWithClamping()
46 memcpy_to_float_from_float_with_clamping(dst.data(), src.data(), count, 1.413); in BM_MemcpyToFloatFromFloatWithClamping()
59 const size_t count = state.range(0); in BM_MemcpyFloat() local
61 std::vector<float> src(count); in BM_MemcpyFloat()
62 std::vector<float> dst(count); in BM_MemcpyFloat()
[all …]
/system/media/audio_utils/include/audio_utils/
Dprimitives.h68 void memcpy_to_i16_from_q4_27(int16_t *dst, const int32_t *src, size_t count);
80 void memcpy_to_i16_from_u8(int16_t *dst, const uint8_t *src, size_t count);
93 void memcpy_to_u8_from_i16(uint8_t *dst, const int16_t *src, size_t count);
106 void memcpy_to_u8_from_float(uint8_t *dst, const float *src, size_t count);
119 void memcpy_to_u8_from_p24(uint8_t *dst, const uint8_t *src, size_t count);
132 void memcpy_to_u8_from_i32(uint8_t *dst, const int32_t *src, size_t count);
145 void memcpy_to_u8_from_q8_23(uint8_t *dst, const int32_t *src, size_t count);
158 void memcpy_to_i16_from_i32(int16_t *dst, const int32_t *src, size_t count);
173 void memcpy_to_i16_from_float(int16_t *dst, const float *src, size_t count);
188 void memcpy_to_float_from_q4_27(float *dst, const int32_t *src, size_t count);
[all …]
/system/bt/gd/packet/
Draw_builder_unittest.cc30 vector<uint8_t> count = { variable
55 std::vector<uint8_t> count_subset(count.begin() + 0x16, count.end()); in TEST()
58 ASSERT_EQ(count.size(), count_builder->size()); in TEST()
65 ASSERT_EQ(count, packet); in TEST()
69 std::vector<uint8_t> count_first(count.begin(), count.begin() + 0x8); in TEST()
76 std::vector<uint8_t> count_last(count.begin() + 0x18, count.end()); in TEST()
79 ASSERT_EQ(count.size(), count_builder->size()); in TEST()
86 ASSERT_EQ(count, packet); in TEST()
90 const size_t kMaxBytes = count.size(); in TEST()
92 ASSERT_TRUE(count_builder->AddOctets(count)); in TEST()
[all …]
/system/extras/simpleperf/
DIOEventLoop_test.cpp31 int count = 0; in TEST() local
38 if (++count == 100) { in TEST()
59 ASSERT_EQ(100, count); in TEST()
70 int count = 0; in TEST() local
77 if (++count == 100) { in TEST()
99 ASSERT_EQ(100, count); in TEST()
104 int count = 0; in TEST() local
106 if (++count == 100) { in TEST()
121 ASSERT_EQ(100, count); in TEST()
128 int count = 0; in TestPeriodicEvents() local
[all …]
/system/core/libutils/
DBitSet_test.cpp43 EXPECT_EQ(tmp.count(), 2u); in TEST_F()
49 EXPECT_EQ(b1.count(), 2u); in TEST_F()
51 EXPECT_TRUE(b2.hasBit(4) && b2.count() == 1u); in TEST_F()
65 EXPECT_EQ(b1.count(), 3u); in TEST_F()
78 EXPECT_EQ(tmp.count(), 1u); in TEST_F()
84 EXPECT_EQ(b1.count(), 1u); in TEST_F()
85 EXPECT_EQ(b2.count(), 3u); in TEST_F()
93 EXPECT_EQ(b1.count(), 2u); in TEST_F()
97 EXPECT_EQ(b1.count(), 3u); in TEST_F()
106 EXPECT_EQ(b1.count(), 1u); in TEST_F()
[all …]
/system/core/libsysutils/src/
DServiceManager.cpp62 int count = SLEEP_MAX_USEC; in start() local
63 while(count > 0) { in start()
65 count -= SLEEP_MIN_USEC; in start()
69 if (count <= 0) { in start()
92 int count = SLEEP_MAX_USEC; in stop() local
93 while(count > 0) { in stop()
95 count -= SLEEP_MIN_USEC; in stop()
100 if (count <= 0) { in stop()
/system/extras/libfec/
Dfec_process.cpp23 size_t count; member
36 p->offset + p->count); in __process()
38 p->rc = p->func(p->f, p->buf, p->count, p->offset, &p->errors); in __process()
43 ssize_t process(fec_handle *f, uint8_t *buf, size_t count, uint64_t offset, in process() argument
50 if (count == 0) { in process()
63 size_t blocks = fec_div_round_up(count, FEC_BLOCKSIZE); in process()
66 size_t max_threads = fec_div_round_up(count, count_per_thread); in process()
72 size_t left = count; in process()
77 count_per_thread, count); in process()
90 info[i].count = (size_t)(end - pos); in process()
[all …]
Dfec_read.cpp234 static ssize_t ecc_read(fec_handle *f, uint8_t *dest, size_t count, in ecc_read() argument
240 check(offset + count <= f->data_size); in ecc_read()
243 debug("[%" PRIu64 ", %" PRIu64 ")", offset, offset + count); in ecc_read()
254 size_t left = count; in ecc_read()
279 return count; in ecc_read()
285 static ssize_t verity_read(fec_handle *f, uint8_t *dest, size_t count, in verity_read() argument
291 check(offset + count <= f->data_size); in verity_read()
295 debug("[%" PRIu64 ", %" PRIu64 ")", offset, offset + count); in verity_read()
306 size_t left = count; in verity_read()
346 offset, offset + count, curr); in verity_read()
[all …]
/system/media/radio/src/
Dradio_metadata.c62 uint32_t index_offset = metadata->size_int - metadata->count - 1; in check_size()
67 LOG_ALWAYS_FATAL_IF(metadata->size_int < (metadata->count + 1), in check_size()
73 req_size_int = data_offset + metadata->count + 1 + 1 + size_int; in check_size()
94 memmove((uint32_t *)metadata + new_size_int - (metadata->count + 1), in check_size()
95 (uint32_t *)metadata + metadata->size_int - (metadata->count + 1), in check_size()
96 (metadata->count + 1) * sizeof(uint32_t)); in check_size()
125 index_offset = metadata->size_int - metadata->count - 1; in add_metadata()
136 metadata->count++; in add_metadata()
152 if (index >= metadata->count) { in get_entry_at_index()
166 LOG_ALWAYS_FATAL_IF(metadata->size_int < (metadata->count + 1), in get_entry_at_index()
[all …]
/system/chre/util/include/chre/util/
Dmemory_impl.h30 inline void destroy(ElementType *first, size_t count) { in destroy() argument
31 for (size_t i = 0; i < count; i++) { in destroy()
58 inline void uninitializedMoveOrCopy(ElementType *source, size_t count, in uninitializedMoveOrCopy() argument
60 std::memcpy(dest, source, count * sizeof(ElementType)); in uninitializedMoveOrCopy()
66 inline void uninitializedMoveOrCopy(ElementType *source, size_t count, in uninitializedMoveOrCopy() argument
69 for (size_t i = 0; i < count; i++) { in uninitializedMoveOrCopy()
77 inline void uninitializedMoveOrCopy(ElementType *source, size_t count, in uninitializedMoveOrCopy() argument
80 for (size_t i = 0; i < count; i++) { in uninitializedMoveOrCopy()
87 inline void uninitializedMoveOrCopy(ElementType *source, size_t count, in uninitializedMoveOrCopy() argument
96 source, count, dest, std::false_type(), in uninitializedMoveOrCopy()
[all …]
/system/core/fs_mgr/libstorage_literals/storage_literals/
Dstorage_literals.h26 explicit constexpr Size(uint64_t count) : value_(count) {} in Size()
29 constexpr uint64_t count() const { return value_; } in count() function
60 return Dest(src.count() >> (Dest::power - Src::power)); in size_cast()
63 return Dest(src.count() << (Src::power - Dest::power)); in size_cast()
65 return Dest(src.count()); in size_cast()
72 static_assert(size_cast<KiB>(1_B).count() == 0);
73 static_assert(size_cast<KiB>(1024_B).count() == 1);
74 static_assert(size_cast<KiB>(1_MiB).count() == 1024);
/system/core/logcat/tests/
Dlogcat_test.cpp95 int count = 0; in TEST() local
104 ++count; in TEST()
112 EXPECT_EQ(count, 4); in TEST()
135 int count = 0; in TEST() local
138 if (strncmp(begin, buffer, sizeof(begin) - 1)) ++count; in TEST()
145 EXPECT_GE(count, 3); in TEST()
146 EXPECT_LE(count, 9); in TEST()
147 EXPECT_EQ(count % 3, 0); in TEST()
152 static size_t inject(ssize_t count) { in inject() argument
153 if (count <= 0) return 0; in inject()
[all …]
/system/update_engine/scripts/update_payload/
Dhistogram.py54 self.max_key_len = max([len(str(key)) for key, count in self.data])
55 self.total = sum([count for key, count in self.data])
82 hist = [(namer(key), count) for key, count in count_dict.items()]
111 for key, count in self.data:
113 bar_len = count * self.scale / self.total
119 self.formatter(count))
120 percent_str = format_utils.NumToPercent(count, self.total)
/system/extras/libfec/test/
Dtest_read.cpp53 ssize_t count; in main() local
56 count = input.read(buffer.get(), bufsize); in main()
58 if (count == -1) { in main()
60 } else if (count > 0) { in main()
61 output.write(reinterpret_cast<const char *>(buffer.get()), count); in main()
68 } while (count > 0); in main()
/system/update_engine/payload_consumer/
Dfake_file_descriptor.cc21 ssize_t FakeFileDescriptor::Read(void* buf, size_t count) { in Read() argument
23 read_ops_.emplace_back(offset_, count); in Read()
26 if (offset_ >= static_cast<uint64_t>(size_) || count == 0) in Read()
41 count = std::min(static_cast<uint64_t>(count), first_failure - offset_); in Read()
43 for (size_t i = 0; i < count; ++i) { in Read()
52 return count; in Read()
Dfile_writer.cc31 bool DirectFileWriter::Write(const void* bytes, size_t count) { in Write() argument
36 while (bytes_written < count) { in Write()
37 ssize_t rc = write(fd_, char_bytes + bytes_written, count - bytes_written); in Write()
42 CHECK_EQ(bytes_written, count); in Write()
43 return bytes_written == count; in Write()
/system/core/liblog/
Dlog_event_list.cpp38 unsigned count[ANDROID_MAX_LIST_NEST_DEPTH + 1]; /* Number of elements */ member
146 context->count[context->list_nest_depth]++; in android_log_write_list_begin()
159 context->count[context->list_nest_depth] = 0; in android_log_write_list_begin()
176 context->count[context->list_nest_depth]++; in android_log_write_int32()
196 context->count[context->list_nest_depth]++; in android_log_write_int64()
224 context->count[context->list_nest_depth]++; in android_log_write_string8_len()
251 context->count[context->list_nest_depth]++; in android_log_write_float32()
278 context->count[context->list_nest_depth]; in android_log_write_list_end()
301 context->storage[1] = context->count[0]; in android_log_write_list()
305 if (context->count[0] <= 1) { in android_log_write_list()
[all …]
/system/extras/tests/icachetest/
DProfiler.cpp93 uint8_t count = 0; in resetEvents() local
97 mIds[INSTRUCTIONS] = count++; in resetEvents()
107 mIds[CPU_CYCLES] = count++; in resetEvents()
117 mIds[DCACHE_REFS] = count++; in resetEvents()
127 mIds[DCACHE_MISSES] = count++; in resetEvents()
137 mIds[BRANCHES] = count++; in resetEvents()
147 mIds[BRANCH_MISSES] = count++; in resetEvents()
158 mIds[ICACHE_REFS] = count++; in resetEvents()
168 mIds[ICACHE_MISSES] = count++; in resetEvents()
179 mIds[ICACHE_REFS] = count++; in resetEvents()
[all …]
/system/extras/latencytop/
Dlatencytop.c36 unsigned long count; member
71 int count, erase; in main() local
136 count = 0; in main()
139 while ((iterations == 0) || (count++ < iterations)) { in main()
318 unsigned long count, max, total; in read_latency_file() local
335 sscanf(line, "%ld %ld %ld %s", &count, &total, &max, reason); in read_latency_file()
339 e->count += count; in read_latency_file()
345 e->count = count; in read_latency_file()
361 int i, count; in print_latency_entries() local
364 count = 0; in print_latency_entries()
[all …]
/system/core/libasyncio/
DAsyncIO.cpp43 void io_prep(iocb* iocb, int fd, const void* buf, uint64_t count, int64_t offset, bool read) { in io_prep() argument
49 iocb->aio_nbytes = count; in io_prep()
53 void io_prep_pread(struct iocb* iocb, int fd, void* buf, size_t count, long long offset) { in io_prep_pread() argument
54 io_prep(iocb, fd, buf, count, offset, true); in io_prep_pread()
57 void io_prep_pwrite(struct iocb* iocb, int fd, void* buf, size_t count, long long offset) { in io_prep_pwrite() argument
58 io_prep(iocb, fd, buf, count, offset, false); in io_prep_pwrite()
/system/teeui/libteeui/src/
Dlabel.cpp41 Box<intpxs> intBounds(intpxs((int64_t)bounds.x().count()), intpxs((int64_t)bounds.y().count()), in draw()
42 intpxs((int64_t)bounds.w().count()), intpxs((int64_t)bounds.h().count())); in draw()
56 for (int y = 0; y < box.h().count(); ++y) { in draw()
57 for (int x = 0; x < box.w().count(); ++x) { in draw()
58 drawPixel(box.x().count() + x, box.y().count() + y, (c & 0xffffff) | 0x40000000); in draw()
112 drawPixel(p.x().count(), p.y().count(), 0xffff0000); in draw()

12345678910>>...20