/system/media/audio_utils/ |
D | primitives.c | 30 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 …]
|
D | format.c | 22 const void *src, audio_format_t src_format, size_t count) in memcpy_by_audio_format() argument 35 memcpy(dst, src, count * audio_bytes_per_sample(dst_format)); in memcpy_by_audio_format() 46 memcpy_to_i16_from_float((int16_t*)dst, (float*)src, count); in memcpy_by_audio_format() 49 memcpy_to_i16_from_u8((int16_t*)dst, (uint8_t*)src, count); in memcpy_by_audio_format() 52 memcpy_to_i16_from_p24((int16_t*)dst, (uint8_t*)src, count); in memcpy_by_audio_format() 55 memcpy_to_i16_from_i32((int16_t*)dst, (int32_t*)src, count); in memcpy_by_audio_format() 58 memcpy_to_i16_from_q8_23((int16_t*)dst, (int32_t*)src, count); in memcpy_by_audio_format() 67 memcpy_to_float_from_i16((float*)dst, (int16_t*)src, count); in memcpy_by_audio_format() 70 memcpy_to_float_from_u8((float*)dst, (uint8_t*)src, count); in memcpy_by_audio_format() 73 memcpy_to_float_from_p24((float*)dst, (uint8_t*)src, count); in memcpy_by_audio_format() [all …]
|
D | fifo.cpp | 180 ssize_t audio_utils_fifo_writer::write(const void *buffer, size_t count, in write() argument 185 ssize_t availToWrite = obtain(iovec, count, timeout); in write() 200 ssize_t audio_utils_fifo_writer::obtain(audio_utils_iovec iovec[2], size_t count, in obtain() argument 223 if (count == 0 || availToWrite > 0 || timeout == NULL || in obtain() 289 if (availToWrite > count) { in obtain() 290 availToWrite = count; in obtain() 309 void audio_utils_fifo_writer::release(size_t count) in release() argument 313 if (count > 0) { in release() 314 if (count > mObtained) { in release() 315 ALOGE("%s(count=%zu) > mObtained=%u", __func__, count, mObtained); in release() [all …]
|
/system/media/audio_utils/benchmarks/ |
D | primitives_benchmark.cpp | 26 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/libfmq/tests/aidl/default/ |
D | TestAidlMsgQ.cpp | 76 ndk::ScopedAStatus TestAidlMsgQ::requestBlockingRead(int32_t count) { in requestBlockingRead() argument 77 std::vector<int32_t> data(count); in requestBlockingRead() 79 &data[0], count, static_cast<uint32_t>(EventFlagBits::FMQ_NOT_FULL), in requestBlockingRead() 88 ndk::ScopedAStatus TestAidlMsgQ::requestBlockingReadDefaultEventFlagBits(int32_t count) { in requestBlockingReadDefaultEventFlagBits() argument 89 std::vector<int32_t> data(count); in requestBlockingReadDefaultEventFlagBits() 90 bool result = mFmqSynchronized->readBlocking(&data[0], count); in requestBlockingReadDefaultEventFlagBits() 99 ndk::ScopedAStatus TestAidlMsgQ::requestBlockingReadRepeat(int32_t count, int32_t numIter) { in requestBlockingReadRepeat() argument 100 std::vector<int32_t> data(count); in requestBlockingReadRepeat() 103 &data[0], count, static_cast<uint32_t>(EventFlagBits::FMQ_NOT_FULL), in requestBlockingReadRepeat() 115 ndk::ScopedAStatus TestAidlMsgQ::requestReadFmqSync(int32_t count, bool* _aidl_return) { in requestReadFmqSync() argument [all …]
|
D | TestAidlMsgQ.h | 54 ndk::ScopedAStatus requestBlockingRead(int32_t count) override; 55 ndk::ScopedAStatus requestBlockingReadDefaultEventFlagBits(int32_t count) override; 56 ndk::ScopedAStatus requestBlockingReadRepeat(int32_t count, int32_t numIter) override; 57 ndk::ScopedAStatus requestReadFmqSync(int32_t count, bool* _aidl_return) override; 58 ndk::ScopedAStatus requestReadFmqUnsync(int32_t count, bool* _aidl_return) override; 59 ndk::ScopedAStatus requestWriteFmqSync(int32_t count, bool* _aidl_return) override; 60 ndk::ScopedAStatus requestWriteFmqUnsync(int32_t count, bool* _aidl_return) override; 69 bool verifyData(int32_t* data, int count) { in verifyData() 70 for (int i = 0; i < count; i++) { in verifyData()
|
/system/media/audio_utils/include/audio_utils/ |
D | primitives.h | 68 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/extras/simpleperf/ |
D | IOEventLoop_test.cpp | 34 int count = 0; in TEST() local 41 if (++count == 100) { in TEST() 62 ASSERT_EQ(100, count); in TEST() 74 int count = 0; in TEST() local 81 if (++count == 100) { in TEST() 103 ASSERT_EQ(100, count); in TEST() 109 int count = 0; in TEST() local 111 if (++count == 100) { in TEST() 126 ASSERT_EQ(100, count); in TEST() 133 int count = 0; in TestPeriodicEvents() local [all …]
|
/system/update_engine/payload_consumer/ |
D | block_extent_writer.cc | 42 bool BlockExtentWriter::WriteExtent(const void* bytes, const size_t count) { in WriteExtent() argument 46 count / kBlockSize); in WriteExtent() 47 offset_in_extent_ += count; in WriteExtent() 55 const size_t count) { in ConsumeWithBuffer() argument 57 if (count > 0) { in ConsumeWithBuffer() 58 LOG(ERROR) << "Exhausted all blocks, but still have " << count in ConsumeWithBuffer() 69 if (buffer_.empty() && count >= write_size) { in ConsumeWithBuffer() 86 std::min<size_t>(count, write_size - buffer_.size()); in ConsumeWithBuffer() 108 bool BlockExtentWriter::Write(const void* bytes, size_t count) { in Write() argument 109 if (count == 0) { in Write() [all …]
|
D | install_operation_executor.cc | 58 bool Read(void* buf, size_t count, size_t* bytes_read) override { in Read() argument 59 TEST_AND_RETURN_FALSE(reader_->Read(buf, count)); in Read() 60 *bytes_read = count; in Read() 61 offset_ += count; in Read() 65 bool Write(const void* buf, size_t count, size_t* bytes_written) override { in Write() argument 66 TEST_AND_RETURN_FALSE(writer_->Write(buf, count)); in Write() 67 *bytes_written = count; in Write() 68 offset_ += count; in Write() 143 bool Read(void* buffer, size_t count) override { in Read() argument 145 TEST_AND_RETURN_FALSE(reader_->Read(buffer, count)); in Read() [all …]
|
D | fake_file_descriptor.cc | 21 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()
|
D | file_writer.cc | 31 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/libutils/ |
D | BitSet_test.cpp | 43 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/logging/logcat/tests/ |
D | logcat_test.cpp | 100 int count = 0; in TEST() local 109 ++count; in TEST() 117 EXPECT_EQ(count, 4); in TEST() 140 int count = 0; in TEST() local 143 if (strncmp(begin, buffer, sizeof(begin) - 1)) ++count; in TEST() 150 EXPECT_GE(count, 3); in TEST() 151 EXPECT_LE(count, 9); in TEST() 152 EXPECT_EQ(count % 3, 0); in TEST() 157 static size_t inject(ssize_t count) { in inject() argument 158 if (count <= 0) return 0; in inject() [all …]
|
/system/media/radio/src/ |
D | radio_metadata.c | 62 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() 95 memmove((uint32_t *)metadata + new_size_int - (metadata->count + 1), in check_size() 96 (uint32_t *)metadata + metadata->size_int - (metadata->count + 1), in check_size() 97 (metadata->count + 1) * sizeof(uint32_t)); in check_size() 126 index_offset = metadata->size_int - metadata->count - 1; in add_metadata() 137 metadata->count++; in add_metadata() 153 if (index >= metadata->count) { in get_entry_at_index() 167 LOG_ALWAYS_FATAL_IF(metadata->size_int < (metadata->count + 1), in get_entry_at_index() [all …]
|
/system/libfmq/tests/aidl/android/fmq/test/ |
D | ITestAidlMsgQ.aidl | 63 oneway void requestBlockingRead(in int count); in requestBlockingRead() argument 72 oneway void requestBlockingReadDefaultEventFlagBits(in int count); in requestBlockingReadDefaultEventFlagBits() argument 81 oneway void requestBlockingReadRepeat(in int count, in int numIter); in requestBlockingReadRepeat() argument 91 boolean requestReadFmqSync(in int count); in requestReadFmqSync() argument 101 boolean requestReadFmqUnsync(in int count); in requestReadFmqUnsync() argument 111 boolean requestWriteFmqSync(in int count); in requestWriteFmqSync() argument 121 boolean requestWriteFmqUnsync(in int count); in requestWriteFmqUnsync() argument
|
/system/chre/util/include/chre/util/ |
D | memory_impl.h | 40 inline void destroy(ElementType *first, size_t count) { in destroy() argument 41 for (size_t i = 0; i < count; i++) { in destroy() 68 inline void uninitializedMoveOrCopy(ElementType *source, size_t count, in uninitializedMoveOrCopy() argument 70 std::memcpy(dest, source, count * sizeof(ElementType)); in uninitializedMoveOrCopy() 76 inline void uninitializedMoveOrCopy(ElementType *source, size_t count, in uninitializedMoveOrCopy() argument 79 for (size_t i = 0; i < count; i++) { in uninitializedMoveOrCopy() 87 inline void uninitializedMoveOrCopy(ElementType *source, size_t count, in uninitializedMoveOrCopy() argument 90 for (size_t i = 0; i < count; i++) { in uninitializedMoveOrCopy() 97 inline void uninitializedMoveOrCopy(ElementType *source, size_t count, in uninitializedMoveOrCopy() argument 106 source, count, dest, std::false_type(), in uninitializedMoveOrCopy() [all …]
|
/system/core/libsysutils/src/ |
D | ServiceManager.cpp | 62 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/ |
D | fec_process.cpp | 24 size_t count; member 33 debug("thread %d: [%" PRIu64 ", %" PRIu64 ")", p->id, p->offset, p->offset + p->count); in __process() 35 p->rc = p->func(p->f, p->buf, p->count, p->offset, &p->errors); in __process() 40 ssize_t process(fec_handle* f, uint8_t* buf, size_t count, uint64_t offset, read_func func) { in process() argument 45 if (count == 0) { in process() 58 size_t blocks = fec_div_round_up(offset + count - start, FEC_BLOCKSIZE); in process() 66 size_t left = count; in process() 71 count_per_thread, count, blocks); in process() 82 info[i].count = (size_t)(end - pos); in process() 88 if (info[i].count > left) { in process() [all …]
|
D | fec_read.cpp | 234 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() 350 offset, offset + count, curr); in verity_read() [all …]
|
/system/update_engine/scripts/update_payload/ |
D | histogram.py | 57 self.max_key_len = max([len(str(key)) for key, count in self.data]) 58 self.total = sum([count for key, count in self.data]) 85 hist = [(namer(key), count) for key, count in count_dict.items()] 114 for key, count in self.data: 116 bar_len = count * self.scale // self.total 122 self.formatter(count)) 123 percent_str = format_utils.NumToPercent(count, self.total)
|
/system/core/fs_mgr/libstorage_literals/storage_literals/ |
D | storage_literals.h | 26 explicit constexpr Size(uint64_t count) : value_(count) {} in Size() 29 constexpr uint64_t count() const { return value_; } in count() function 65 return Dest(src.count() >> (Dest::power - Src::power)); in size_cast() 68 return Dest(src.count() << (Src::power - Dest::power)); in size_cast() 70 return Dest(src.count()); in size_cast() 78 static_assert(size_cast<KiB>(1_B).count() == 0); 79 static_assert(size_cast<KiB>(1024_B).count() == 1); 80 static_assert(size_cast<KiB>(1_MiB).count() == 1024);
|
/system/extras/libfec/test/ |
D | test_read.cpp | 53 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/logging/liblog/ |
D | log_event_list.cpp | 38 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/ |
D | Profiler.cpp | 93 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 …]
|