/packages/modules/NeuralNetworks/driver/cache/BlobCache/ |
D | BlobCache.h | 71 BlobCache(size_t maxKeySize, size_t maxValueSize, size_t maxTotalSize, 89 void set(const void* key, size_t keySize, const void* value, size_t valueSize); 129 size_t get(const void* key, size_t keySize, void* value, size_t valueSize); 130 size_t get(const void* key, size_t keySize, void** value, std::function<void*(size_t)> alloc); 132 size_t get(const void* key, size_t keySize, T** value, std::function<void*(size_t)> alloc) { in get() 134 const size_t size = get(key, keySize, &valueVoid, alloc); in get() 141 size_t getFlattenedSize() const; 150 int flatten(void* buffer, size_t size) const; 158 int unflatten(void const* buffer, size_t size); 170 static const size_t NoEntry = ~size_t(0); [all …]
|
D | BlobCache.cpp | 38 const size_t len = std::max(strlen(default_value) + 1, size_t(PROPERTY_VALUE_MAX)); in property_get() 62 BlobCache::BlobCache(size_t maxKeySize, size_t maxValueSize, size_t maxTotalSize, Policy policy) in BlobCache() 81 void BlobCache::set(const void* key, size_t keySize, const void* value, size_t valueSize) { in set() 116 size_t newEntrySize = keySize + valueSize; in set() 117 size_t newTotalSize = mTotalSize + newEntrySize; in set() 146 size_t newTotalSize = mTotalSize + valueSize - oldValueBlob->getSize(); in set() 178 size_t BlobCache::get(const void* key, size_t keySize, void* value, size_t valueSize) { in get() 180 return get(key, keySize, &dummy, [value, valueSize](size_t allocSize) { in get() 185 size_t BlobCache::get(const void* key, size_t keySize, void** value, in get() 186 std::function<void*(size_t)> alloc) { in get() [all …]
|
D | BlobCache_test.cpp | 68 ASSERT_EQ(size_t(4), mBC->get("abcd", 4, buf, 4)); in TEST_P() 79 ASSERT_EQ(size_t(2), mBC->get("ab", 2, buf, 2)); in TEST_P() 82 ASSERT_EQ(size_t(2), mBC->get("ef", 2, buf, 2)); in TEST_P() 93 ASSERT_EQ(size_t(2), mBC->get("ab", 2, &bufPtr, malloc)); in TEST_P() 100 ASSERT_EQ(size_t(2), mBC->get("ef", 2, &bufPtr, malloc)); in TEST_P() 110 ASSERT_EQ(size_t(4), mBC->get("abcd", 4, buf + 1, 4)); in TEST_P() 122 ASSERT_EQ(size_t(4), mBC->get("abcd", 4, buf, 3)); in TEST_P() 136 ASSERT_EQ(size_t(4), mBC->get("abcd", 4, &bufPtr, [](size_t) -> void* { return nullptr; })); in TEST_P() argument 145 ASSERT_EQ(size_t(4), mBC->get("abcd", 4, NULL, 0)); in TEST_P() 152 ASSERT_EQ(size_t(4), mBC->get("abcd", 4, buf, 4)); in TEST_P() [all …]
|
/packages/services/Car/cpp/evs/sampleDriver/ |
D | ConfigManager.cpp | 135 size_t totalEntries = 0; in readCameraDeviceInfo() 136 size_t totalDataSize = 0; in readCameraDeviceInfo() 161 size_t 164 size_t &dataSize) { in readCameraCapabilities() 245 size_t 248 size_t &dataSize) { in readCameraMetadata() 254 size_t numEntries = 0; in readCameraMetadata() 265 size_t count = 0; in readCameraMetadata() 305 size_t len = strlen(curElem->FindAttribute("value")->Value()); in readCameraMetadata() 355 const size_t totalEntries, in constructCameraMetadata() [all …]
|
/packages/apps/Test/connectivity/sl4n/rapidjson/test/perftest/ |
D | rapidjsontest.cpp | 66 for (size_t i = 0; i < kTrialCount; i++) { in TEST_F() 76 for (size_t i = 0; i < kTrialCount; i++) { in TEST_F() 86 for (size_t i = 0; i < kTrialCount; i++) { in TEST_F() 95 for (size_t i = 0; i < kTrialCount; i++) { in TEST_F() 104 for (size_t i = 0; i < kTrialCount; i++) { in TEST_F() 113 for (size_t i = 0; i < kTrialCount; i++) { in TEST_F() 123 for (size_t i = 0; i < kTrialCount; i++) { in TEST_F() 132 for (size_t i = 0; i < kTrialCount; i++) { in TEST_F() 141 for (size_t i = 0; i < kTrialCount; i++) { in TEST_F() 150 for (size_t i = 0; i < kTrialCount; i++) { in TEST_F() [all …]
|
/packages/modules/adb/ |
D | compression_utils.h | 82 explicit Encoder(size_t output_block_size) : output_block_size_(output_block_size) {} in Encoder() 85 const size_t output_block_size_; 94 size_t available_out = output_buffer_.size(); in Decode() 97 size_t len = std::min(available_out, input_buffer_.front_size()); in Decode() 111 explicit NullEncoder(size_t output_block_size) : Encoder(output_block_size) {} in NullEncoder() 117 size_t available_out = output->size(); in Encode() 121 size_t len = std::min(available_out, input_buffer_.front_size()); in Encode() 143 size_t available_in = input_buffer_.front_size(); in Decode() 146 size_t available_out = output_buffer_.size(); in Decode() 152 size_t bytes_consumed = input_buffer_.front_size() - available_in; in Decode() [all …]
|
D | types.h | 37 explicit Block(size_t size) { allocate(size); } in Block() 61 void resize(size_t new_size) { in resize() 83 size_t capacity() const { return capacity_; } in capacity() 84 size_t size() const { return size_; } in size() 96 char& operator[](size_t idx) { return data()[idx]; } 97 const char& operator[](size_t idx) const { return data()[idx]; } 104 void allocate(size_t size) { in allocate() 119 size_t capacity_ = 0; 120 size_t size_ = 0; 141 using size_type = size_t; [all …]
|
/packages/modules/adb/pairing_auth/ |
D | pairing_auth.cpp | 76 size_t SafeEncryptedSize(size_t len); 79 size_t SafeDecryptedSize(size_t len); 94 size_t my_len = 0; in PairingAuthCtx() 95 size_t their_len = 0; in PairingAuthCtx() 121 size_t key_size = 0; in PairingAuthCtx() 148 size_t key_material_len = 0; in InitCipher() 186 size_t decrypted_size = decrypted.size(); in Decrypt() 197 size_t PairingAuthCtx::SafeEncryptedSize(size_t len) { in SafeEncryptedSize() 202 size_t PairingAuthCtx::SafeDecryptedSize(size_t len) { in SafeDecryptedSize() 207 PairingAuthCtx* pairing_auth_server_new(const uint8_t* pswd, size_t len) { in pairing_auth_server_new() [all …]
|
D | aes_128_gcm.cpp | 31 static constexpr size_t kHkdfKeyLength = 16; 35 Aes128Gcm::Aes128Gcm(const uint8_t* key_material, size_t key_material_len) { in Aes128Gcm() 48 std::optional<size_t> Aes128Gcm::Encrypt(const uint8_t* in, size_t in_len, uint8_t* out, in Encrypt() 49 size_t out_len) { in Encrypt() 52 size_t written_sz; in Encrypt() 64 std::optional<size_t> Aes128Gcm::Decrypt(const uint8_t* in, size_t in_len, uint8_t* out, in Decrypt() 65 size_t out_len) { in Decrypt() 68 size_t written_sz; in Decrypt() 80 size_t Aes128Gcm::EncryptedSize(size_t size) { in EncryptedSize() 85 size_t Aes128Gcm::DecryptedSize(size_t size) { in DecryptedSize()
|
/packages/apps/Test/connectivity/sl4n/rapidjson/include/rapidjson/ |
D | allocators.h | 65 void* Malloc(size_t size) { in Malloc() 71 void* Realloc(void* originalPtr, size_t originalSize, size_t newSize) { in Realloc() 110 …explicit MemoryPoolAllocator(size_t chunkSize = kDefaultChunkCapacity, BaseAllocator* baseAllocato… 125 …MemoryPoolAllocator(void *buffer, size_t size, size_t chunkSize = kDefaultChunkCapacity, BaseAlloc… 158 size_t Capacity() const { in Capacity() 159 size_t capacity = 0; in Capacity() 168 size_t Size() const { in Size() 169 size_t size = 0; in Size() 176 void* Malloc(size_t size) { in Malloc() 190 void* Realloc(void* originalPtr, size_t originalSize, size_t newSize) { in Realloc() [all …]
|
D | filewritestream.h | 31 …FileWriteStream(std::FILE* fp, char* buffer, size_t bufferSize) : fp_(fp), buffer_(buffer), buffer… in FileWriteStream() 42 void PutN(char c, size_t n) { in PutN() 43 size_t avail = static_cast<size_t>(bufferEnd_ - current_); in PutN() 49 avail = static_cast<size_t>(bufferEnd_ - current_); in PutN() 60 size_t result = fwrite(buffer_, 1, static_cast<size_t>(current_ - buffer_), fp_); in Flush() 61 if (result < static_cast<size_t>(current_ - buffer_)) { in Flush() 72 size_t Tell() const { RAPIDJSON_ASSERT(false); return 0; } in Tell() 74 size_t PutEnd(char*) { RAPIDJSON_ASSERT(false); return 0; } in PutEnd() 89 inline void PutN(FileWriteStream& stream, char c, size_t n) { in PutN()
|
/packages/modules/StatsD/statsd/src/anomaly/ |
D | indexed_priority_queue.h | 32 size_t operator()(const sp<const AA>& k) const { in operator() 63 size_t size() const { in size() 75 std::unordered_map<sp<const AA>, size_t, SpHash<AA>> indices; 78 void sift_up(size_t idx); 79 void sift_down(size_t idx); 81 bool higher(size_t idx1, size_t idx2) const; 82 void swap_indices(size_t i, size_t j); 97 size_t idx = size(); // index of last element since 1-indexed in push() 106 size_t idx = indices[a]; in remove() 134 const size_t idx = 1; in pop() [all …]
|
/packages/modules/adb/pairing_auth/include/adb/pairing/ |
D | pairing_auth.h | 55 PairingAuthCtx* pairing_auth_server_new(const uint8_t* pswd, size_t len) __INTRODUCED_IN(30); 66 PairingAuthCtx* pairing_auth_client_new(const uint8_t* pswd, size_t len) __INTRODUCED_IN(30); 84 size_t pairing_auth_msg_size(PairingAuthCtx* ctx) __INTRODUCED_IN(30); 118 bool pairing_auth_init_cipher(PairingAuthCtx* ctx, const uint8_t* their_msg, size_t msg_len) 132 size_t pairing_auth_safe_encrypted_size(PairingAuthCtx* ctx, size_t len) __INTRODUCED_IN(30); 148 bool pairing_auth_encrypt(PairingAuthCtx* ctx, const uint8_t* inbuf, size_t inlen, uint8_t* outbuf, 149 size_t* outlen) __INTRODUCED_IN(30); 163 size_t pairing_auth_safe_decrypted_size(PairingAuthCtx* ctx, const uint8_t* buf, size_t len) 181 bool pairing_auth_decrypt(PairingAuthCtx* ctx, const uint8_t* inbuf, size_t inlen, uint8_t* outbuf, 182 size_t* outlen) __INTRODUCED_IN(30);
|
D | aes_128_gcm.h | 31 explicit Aes128Gcm(const uint8_t* key_material, size_t key_material_len); 40 std::optional<size_t> Encrypt(const uint8_t* in, size_t in_len, uint8_t* out, size_t out_len); 48 std::optional<size_t> Decrypt(const uint8_t* in, size_t in_len, uint8_t* out, size_t out_len); 51 size_t EncryptedSize(size_t size); 53 size_t DecryptedSize(size_t size);
|
/packages/modules/NeuralNetworks/common/ |
D | SharedMemoryAndroid.cpp | 51 GeneralResult<SharedMemory> createSharedMemoryFromUniqueFd(size_t size, int prot, in createSharedMemoryFromUniqueFd() 52 base::unique_fd fd, size_t offset) { in createSharedMemoryFromUniqueFd() 81 GeneralResult<SharedMemory> allocateSharedMemory(size_t size) { in allocateSharedMemory() 106 CHECK_LE(maybeMemory.size(), std::numeric_limits<size_t>::max()); in allocateSharedMemory() 111 .size = static_cast<size_t>(maybeMemory.size()), in allocateSharedMemory() 131 if (fullSize == 0 || fullSize > std::numeric_limits<size_t>::max()) { in map() 135 const size_t size = static_cast<size_t>(fullSize); in map() 146 GeneralResult<SharedMemory> allocateSharedMemory(size_t size) { in allocateSharedMemory() 155 const size_t readSize = memory.getSize(fd.get()); in allocateSharedMemory() 159 constexpr size_t offset = 0; in allocateSharedMemory() [all …]
|
/packages/modules/NeuralNetworks/common/include/nnapi/ |
D | SharedMemory.h | 38 DataLocation append(size_t length, size_t alignment = kMinMemoryAlignment, 39 size_t padding = kMinMemoryPadding); 46 size_t mSize = 0; 53 DataLocation append(const void* data, size_t length); 61 size_t length; 62 size_t offset; 84 GeneralResult<SharedMemory> createSharedMemory(size_t size); 88 GeneralResult<SharedMemory> createSharedMemoryFromFd(size_t size, int prot, int fd, size_t offset); 94 size_t getSize(const SharedMemory& memory); 103 size_t size;
|
/packages/inputmethods/LatinIME/native/jni/src/utils/ |
D | int_array_view.h | 55 IntArrayView(const int *const ptr, const size_t size) in IntArrayView() 61 template <size_t N> 71 AK_FORCE_INLINE int operator[](const size_t index) const { 80 AK_FORCE_INLINE size_t size() const { in size() 101 AK_FORCE_INLINE const IntArrayView limit(const size_t maxSize) const { in limit() 105 AK_FORCE_INLINE const IntArrayView skip(const size_t n) const { in skip() 112 template <size_t N> 113 void copyToArray(std::array<int, N> *const buffer, const size_t offset) const { in copyToArray() 145 size_t startIndex = 0; 146 for (size_t i = 0; i < mSize; ++i) { [all …]
|
D | byte_array_view.h | 34 ReadOnlyByteArrayView(const uint8_t *const ptr, const size_t size) in ReadOnlyByteArrayView() 37 AK_FORCE_INLINE size_t size() const { in size() 45 AK_FORCE_INLINE const ReadOnlyByteArrayView skip(const size_t n) const { in skip() 56 const size_t mSize; 66 ReadWriteByteArrayView(uint8_t *const ptr, const size_t size) in ReadWriteByteArrayView() 69 AK_FORCE_INLINE size_t size() const { in size() 81 ReadWriteByteArrayView subView(const size_t start, const size_t n) const { in subView() 92 size_t mSize;
|
/packages/apps/Test/connectivity/sl4n/rapidjson/include/rapidjson/internal/ |
D | biginteger.h | 40 BigInteger(const char* decimals, size_t length) : count_(1) { in BigInteger() 43 size_t i = 0; in BigInteger() 44 const size_t kMaxDigitPerIteration = 19; // 2^64 = 18446744073709551616 > 10^19 in BigInteger() 73 for (size_t i = 0; i < count_ - 1; i++) { 93 for (size_t i = 0; i < count_; i++) { 111 for (size_t i = 0; i < count_; i++) { 128 BigInteger& operator<<=(size_t shift) { 131 size_t offset = shift / kTypeBit; 132 size_t interShift = shift % kTypeBit; 141 for (size_t i = count_; i > 0; i--) [all …]
|
D | stack.h | 35 …Stack(Allocator* allocator, size_t stackCapacity) : allocator_(allocator), ownAllocator_(0), stack… in Stack() 111 RAPIDJSON_FORCEINLINE T* Push(size_t count = 1) { 122 T* Pop(size_t count) { in Pop() 146 size_t GetSize() const { return static_cast<size_t>(stackTop_ - stack_); } in GetSize() 147 size_t GetCapacity() const { return static_cast<size_t>(stackEnd_ - stack_); } in GetCapacity() 151 void Expand(size_t count) { in Expand() 153 size_t newCapacity; in Expand() 162 size_t newSize = GetSize() + sizeof(T) * count; in Expand() 169 void Resize(size_t newCapacity) { in Resize() 170 const size_t size = GetSize(); // Backup the current size in Resize() [all …]
|
/packages/modules/StatsD/statsd/src/storage/ |
D | StorageManager.cpp | 89 size_t fileNameLength = strlen(fileName); in findTrainInfoFileNameLocked() 167 size_t result; in writeTrainInfo() 177 const size_t trainVersionCodeByteCount = sizeof(trainInfo.trainVersionCode); in writeTrainInfo() 186 const size_t trainNameSize = trainInfo.trainName.size(); in writeTrainInfo() 187 const size_t trainNameSizeByteCount = sizeof(trainNameSize); in writeTrainInfo() 204 const size_t statusByteCount = sizeof(trainInfo.status); in writeTrainInfo() 213 const size_t experimentIdsCount = trainInfo.experimentIds.size(); in writeTrainInfo() 214 const size_t experimentIdsCountByteCount = sizeof(experimentIdsCount); in writeTrainInfo() 223 for (size_t i = 0; i < experimentIdsCount; i++) { in writeTrainInfo() 225 const size_t experimentIdByteCount = sizeof(experimentId); in writeTrainInfo() [all …]
|
/packages/inputmethods/LatinIME/native/jni/src/dictionary/utils/ |
D | buffer_with_extendable_buffer.cpp | 21 const size_t BufferWithExtendableBuffer::DEFAULT_MAX_ADDITIONAL_BUFFER_SIZE = 1024 * 1024; 24 const size_t BufferWithExtendableBuffer::EXTEND_ADDITIONAL_BUFFER_SIZE_STEP = 128 * 1024; 88 const size_t size = ByteArrayUtils::calculateRequiredByteCountToStoreCodePoints( in writeCodePointsAndAdvancePosition() 107 bool BufferWithExtendableBuffer::extendBuffer(const size_t size) { in extendBuffer() 108 const size_t extendSize = std::max(EXTEND_ADDITIONAL_BUFFER_SIZE_STEP, size); in extendBuffer() 109 const size_t sizeAfterExtending = in extendBuffer() 123 const size_t totalRequiredSize = static_cast<size_t>(pos + size); in checkAndPrepareWriting() 134 const size_t tailPosition = static_cast<size_t>(getTailPosition()); in checkAndPrepareWriting() 139 if (static_cast<size_t>(pos) != tailPosition) { in checkAndPrepareWriting() 143 const size_t extendSize = totalRequiredSize - in checkAndPrepareWriting()
|
/packages/services/Car/cpp/computepipe/runner/include/ |
D | prebuilt_interface.h | 62 unsigned char* error_msg_buffer, size_t error_msg_buffer_size, size_t* error_msg_size); 67 const void** config, size_t* config_size); 71 const unsigned char* graph_config, size_t graph_config_size); 77 int stream_index, int64_t timestamp, const unsigned char* stream_data, size_t stream_data_size); 94 const unsigned char* data, size_t data_size)); 107 size_t termination_message_size)); 126 size_t debug_info_buffer_size, 127 size_t* debug_info_size);
|
/packages/modules/NeuralNetworks/driver/cache/nnCache/ |
D | nnCache.cpp | 30 static const size_t cacheFileHeaderSize = 8; 58 void NNCache::initialize(size_t maxKeySize, size_t maxValueSize, size_t maxTotalSize, in initialize() 118 std::function<void*(size_t)> alloc) { in getBlob() 146 static uint32_t crc32c(const uint8_t* buf, size_t len) { in crc32c() 149 for (size_t i = 0; i < len; i++) { in crc32c() 164 size_t cacheSize = mBlobCache->getFlattenedSize(); in saveBlobCacheLocked() 165 size_t headerSize = cacheFileHeaderSize; in saveBlobCacheLocked() 188 size_t fileSize = headerSize + cacheSize; in saveBlobCacheLocked() 228 size_t headerSize = cacheFileHeaderSize; in loadBlobCacheLocked() 247 size_t fileSize = statBuf.st_size; in loadBlobCacheLocked() [all …]
|
D | nnCache.h | 52 void initialize(size_t maxKeySize, size_t maxValueSize, size_t maxTotalSize, 67 std::function<void*(size_t)> alloc); 69 ssize_t getBlob(const void* key, size_t keySize, T** value, in getBlob() 70 std::function<void*(size_t)> alloc) { in getBlob() 113 size_t mMaxKeySize; 116 size_t mMaxValueSize; 120 size_t mMaxTotalSize;
|