Home
last modified time | relevance | path

Searched refs:size_t (Results 1 – 25 of 1350) sorted by relevance

12345678910>>...54

/packages/modules/Bluetooth/system/osi/test/
Dringbuffer_test.cc9 EXPECT_EQ((size_t)4096, ringbuffer_available(rb)); in TEST()
10 EXPECT_EQ((size_t)0, ringbuffer_size(rb)); in TEST()
20 EXPECT_EQ((size_t)10, ringbuffer_size(rb)); in TEST()
21 EXPECT_EQ((size_t)6, ringbuffer_available(rb)); in TEST()
24 size_t peeked = ringbuffer_peek(rb, 0, peek, 10); in TEST()
25 EXPECT_EQ((size_t)10, ringbuffer_size(rb)); // Ensure size doesn't change in TEST()
26 EXPECT_EQ((size_t)6, ringbuffer_available(rb)); in TEST()
27 EXPECT_EQ((size_t)10, peeked); in TEST()
40 size_t added = ringbuffer_insert(rb, aa, 7); in TEST()
41 EXPECT_EQ((size_t)5, added); in TEST()
[all …]
/packages/modules/NeuralNetworks/driver/cache/BlobCache/
DBlobCache.h71 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 …]
DBlobCache.cpp38 const size_t len = std::max(strlen(default_value) + 1, size_t(PROPERTY_VALUE_MAX)); in property_get()
63 BlobCache::BlobCache(size_t maxKeySize, size_t maxValueSize, size_t maxTotalSize, Policy policy) in BlobCache()
82 void BlobCache::set(const void* key, size_t keySize, const void* value, size_t valueSize) { in set()
117 size_t newEntrySize = keySize + valueSize; in set()
118 size_t newTotalSize = mTotalSize + newEntrySize; in set()
147 size_t newTotalSize = mTotalSize + valueSize - oldValueBlob->getSize(); in set()
179 size_t BlobCache::get(const void* key, size_t keySize, void* value, size_t valueSize) { in get()
181 return get(key, keySize, &dummy, [value, valueSize](size_t allocSize) { in get()
186 size_t BlobCache::get(const void* key, size_t keySize, void** value, in get()
187 std::function<void*(size_t)> alloc) { in get()
[all …]
DBlobCache_test.cpp68 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/modules/Bluetooth/system/test/mock/
Dmock_osi_ringbuffer.h44 size_t return_value{0};
45 std::function<size_t(const ringbuffer_t* rb)> body{
47 size_t operator()(const ringbuffer_t* rb) { return body(rb); }; in operator()
55 size_t return_value{0};
56 std::function<size_t(ringbuffer_t* rb, size_t length)> body{
57 [this](ringbuffer_t* /* rb */, size_t /* length */) {
60 size_t operator()(ringbuffer_t* rb, size_t length) { in operator()
80 std::function<ringbuffer_t*(const size_t size)> body{
81 [this](const size_t /* size */) { return return_value; }};
82 ringbuffer_t* operator()(const size_t size) { return body(size); }; in operator()
[all …]
/packages/modules/Bluetooth/system/stack/test/btm/
Dsco_hci_test.cc65 const std::map<size_t, size_t> irregular_packet_to_buffer_size{
90 bool decodePacket(const uint8_t* i_buf, int16_t* o_buf, size_t out_len) { in decodePacket()
112 bool decodePacket(const uint8_t* i_buf, int16_t* o_buf, size_t out_len) { in decodePacket()
200 ASSERT_EQ(bluetooth::audio::sco::read(buf, sizeof(buf)), size_t(0)); in TEST_F()
234 ASSERT_EQ(bluetooth::audio::sco::write(buf, sizeof(buf)), size_t(0)); in TEST_F()
239 ASSERT_EQ(bluetooth::audio::sco::wbs::init(60), size_t(60)); in TEST_F()
240 ASSERT_EQ(bluetooth::audio::sco::wbs::init(72), size_t(72)); in TEST_F()
242 ASSERT_EQ(bluetooth::audio::sco::wbs::init(48), size_t(60)); in TEST_F()
247 ASSERT_EQ(bluetooth::audio::sco::swb::init(60), size_t(60)); in TEST_F()
248 ASSERT_EQ(bluetooth::audio::sco::swb::init(72), size_t(72)); in TEST_F()
[all …]
/packages/providers/MediaProvider/pdf/framework/libs/pdfClient/
Dfile.h32 size_t GetFileSize(int fd);
46 FileReader(LinuxFileOps::FDCloser fd, size_t completeSize);
53 virtual size_t RequestedHeaderSize() const { return 0; } in RequestedHeaderSize()
54 virtual size_t RequestedFooterSize() const { return 0; } in RequestedFooterSize()
61 size_t CompleteSize() const { return complete_size_; } in CompleteSize()
64 virtual bool CanReadBlock(size_t offset, size_t size) const;
65 virtual size_t DoReadBlock(size_t offset, void* buffer, size_t size) const;
66 virtual void RequestBlock(size_t offset, size_t size);
72 size_t complete_size_;
77 static int StaticIsDataAvailImpl(struct _FX_FILEAVAIL* pThis, size_t offset, size_t size);
[all …]
Dfile.cc39 size_t GetFileSize(int fd) { in GetFileSize()
49 FileReader::FileReader(LinuxFileOps::FDCloser fd, size_t completeSize) in FileReader()
69 bool FileReader::CanReadBlock(size_t pos, size_t size) const { in CanReadBlock()
74 size_t FileReader::DoReadBlock(size_t pos, void* buffer, size_t size) const { in DoReadBlock()
84 void FileReader::RequestBlock(size_t offset, size_t size) { in RequestBlock()
108 int FileReader::StaticIsDataAvailImpl(FX_FILEAVAIL* pThis, size_t pos, size_t size) { in StaticIsDataAvailImpl()
120 void FileReader::StaticAddSegmentImpl(FX_DOWNLOADHINTS* pThis, size_t pos, size_t size) { in StaticAddSegmentImpl()
137 size_t FileWriter::DoWriteBlock(const void* data, size_t size) { in DoWriteBlock()
138 size_t written = write(fd_.get(), data, size); in DoWriteBlock()
151 static void LogAddSegment(FX_DOWNLOADHINTS* pThis, size_t offset, size_t size) { in LogAddSegment()
/packages/modules/Bluetooth/system/common/
Dleaky_bonded_queue_unittest.cc55 EXPECT_EQ(queue->Capacity(), static_cast<size_t>(3)); in TEST()
56 EXPECT_EQ(queue->Length(), static_cast<size_t>(0)); in TEST()
58 EXPECT_EQ(queue->Length(), static_cast<size_t>(1)); in TEST()
60 EXPECT_EQ(queue->Length(), static_cast<size_t>(2)); in TEST()
62 EXPECT_EQ(queue->Length(), static_cast<size_t>(3)); in TEST()
65 EXPECT_EQ(queue->Length(), static_cast<size_t>(3)); in TEST()
91 EXPECT_EQ(queue->Capacity(), static_cast<size_t>(2)); in TEST()
92 EXPECT_EQ(queue->Length(), static_cast<size_t>(0)); in TEST()
94 EXPECT_EQ(queue->Length(), static_cast<size_t>(1)); in TEST()
97 EXPECT_EQ(queue->Length(), static_cast<size_t>(0)); in TEST()
[all …]
/packages/modules/Bluetooth/system/packet/tests/base/
Diterator_test.cc28 using pair = std::pair<size_t, size_t>;
31 : public ::testing::TestWithParam<std::pair<size_t, size_t>> {
41 size_t GetTestPacketLength() { return GetParam().second - GetParam().first; } in GetTestPacketLength()
43 size_t GetLowerBound() { return GetParam().first; } in GetLowerBound()
45 size_t GetUpperBound() { return GetParam().second; } in GetUpperBound()
92 ASSERT_EQ(static_cast<size_t>(packet->end() - packet->begin()), in TEST_P()
96 for (size_t i = 0; i < GetTestPacketLength(); i++) { in TEST_P()
140 *(dereference_test - static_cast<size_t>(1))); in TEST_P()
151 for (size_t i = 0; i < GetTestPacketLength(); i += 2) { in TEST_P()
164 for (size_t i = 0; i < GetTestPacketLength() - 1; i++) { in TEST_P()
[all …]
/packages/services/Car/cpp/evs/sampleDriver/aidl/src/
DConfigManager.cpp131 size_t totalEntries = 0; in readCameraDeviceInfo()
132 size_t totalDataSize = 0; in readCameraDeviceInfo()
151 size_t ConfigManager::readCameraCapabilities(const XMLElement* const aCapElem, CameraInfo* aCamera, in readCameraCapabilities()
152 size_t& dataSize) { in readCameraCapabilities()
226 size_t ConfigManager::readCameraMetadata(const XMLElement* const aParamElem, CameraInfo* aCamera, in readCameraMetadata()
227 size_t& dataSize) { in readCameraMetadata()
233 size_t numEntries = 0; in readCameraMetadata()
243 size_t count = 0; in readCameraMetadata()
280 size_t len = strlen(curElem->FindAttribute("value")->Value()); in readCameraMetadata()
321 bool ConfigManager::constructCameraMetadata(CameraInfo* aCamera, size_t totalEntries, in constructCameraMetadata()
[all …]
/packages/modules/Bluetooth/system/osi/test/fuzzers/ringbuffer/
Dfuzz_ringbuffer.cc29 size_t index = dataProvider->ConsumeIntegralInRange<size_t>( in getArbitraryRingBuf()
46 size_t size = in callArbitraryFunction()
47 dataProvider->ConsumeIntegralInRange<size_t>(0, MAX_BUF_SIZE); in callArbitraryFunction()
58 size_t index = dataProvider->ConsumeIntegralInRange<size_t>( in callArbitraryFunction()
81 size_t size = in callArbitraryFunction()
82 dataProvider->ConsumeIntegralInRange<size_t>(1, MAX_BUF_SIZE); in callArbitraryFunction()
103 size_t max_size = ringbuffer_size(buf); in callArbitraryFunction()
107 size_t size = dataProvider->ConsumeIntegralInRange<size_t>(1, max_size); in callArbitraryFunction()
121 static_cast<size_t>(offset) <= ringbuffer_size(buf)) { in callArbitraryFunction()
133 size_t size = in callArbitraryFunction()
[all …]
/packages/modules/Bluetooth/system/test/headless/
Dproperty.cc34 const uint8_t* data, const size_t len)>>
37 [](const uint8_t* data, const size_t len) -> headless::bt_property_t* { in __anon4b405c0e0202()
41 [](const uint8_t* data, const size_t len) -> headless::bt_property_t* { in __anon4b405c0e0302()
45 [](const uint8_t* data, const size_t len) -> headless::bt_property_t* { in __anon4b405c0e0402()
49 [](const uint8_t* data, const size_t len) -> headless::bt_property_t* { in __anon4b405c0e0502()
53 [](const uint8_t* data, const size_t len) -> headless::bt_property_t* { in __anon4b405c0e0602()
57 [](const uint8_t* data, const size_t len) -> headless::bt_property_t* { in __anon4b405c0e0702()
62 [](const uint8_t* data, const size_t len) -> headless::bt_property_t* { in __anon4b405c0e0802()
67 [](const uint8_t* data, const size_t len) -> headless::bt_property_t* { in __anon4b405c0e0902()
72 [](const uint8_t* data, const size_t len) -> headless::bt_property_t* { in __anon4b405c0e0a02()
[all …]
/packages/modules/Bluetooth/system/osi/src/
Dringbuffer.cc29 size_t total;
30 size_t available;
36 ringbuffer_t* ringbuffer_init(const size_t size) { in ringbuffer_init()
52 size_t ringbuffer_available(const ringbuffer_t* rb) { in ringbuffer_available()
57 size_t ringbuffer_size(const ringbuffer_t* rb) { in ringbuffer_size()
62 size_t ringbuffer_insert(ringbuffer_t* rb, const uint8_t* p, size_t length) { in ringbuffer_insert()
68 for (size_t i = 0; i != length; ++i) { in ringbuffer_insert()
77 size_t ringbuffer_delete(ringbuffer_t* rb, size_t length) { in ringbuffer_delete()
89 size_t ringbuffer_peek(const ringbuffer_t* rb, off_t offset, uint8_t* p, in ringbuffer_peek()
90 size_t length) { in ringbuffer_peek()
[all …]
/packages/modules/Bluetooth/system/stack/btm/
Dbtm_sco_hci.cc126 size_t read(uint8_t* p_buf, uint32_t len) { in read()
134 size_t write(const uint8_t* p_buf, uint32_t len) { in write()
160 constexpr size_t btm_wbs_supported_pkt_size[] = {BTM_MSBC_PKT_LEN, 72, 24, 0};
163 constexpr size_t btm_wbs_msbc_buffer_size[] = {BTM_MSBC_PKT_LEN, 360, 120, 0};
404 size_t packet_size; /* SCO mSBC packet size supported by lower layer */
405 size_t buf_size; /* The size of the buffer, determined by the packet_size. */
409 size_t decode_buf_wo; /* Write offset of the decode buffer */
410 size_t decode_buf_ro; /* Read offset of the decode buffer */
436 size_t encode_buf_wo; /* Write offset of the encode buffer */
437 size_t encode_buf_ro; /* Read offset of the encode buffer */
[all …]
/packages/modules/adb/pairing_auth/
Dpairing_auth.cpp78 size_t SafeEncryptedSize(size_t len);
81 size_t SafeDecryptedSize(size_t len);
96 size_t my_len = 0; in PairingAuthCtx()
97 size_t their_len = 0; in PairingAuthCtx()
123 size_t key_size = 0; in PairingAuthCtx()
150 size_t key_material_len = 0; in InitCipher()
188 size_t decrypted_size = decrypted.size(); in Decrypt()
199 size_t PairingAuthCtx::SafeEncryptedSize(size_t len) { in SafeEncryptedSize()
204 size_t PairingAuthCtx::SafeDecryptedSize(size_t len) { in SafeDecryptedSize()
209 PairingAuthCtx* pairing_auth_server_new(const uint8_t* pswd, size_t len) { in pairing_auth_server_new()
[all …]
Daes_128_gcm.cpp33 static constexpr size_t kHkdfKeyLength = 16;
37 Aes128Gcm::Aes128Gcm(const uint8_t* key_material, size_t key_material_len) { in Aes128Gcm()
50 std::optional<size_t> Aes128Gcm::Encrypt(const uint8_t* in, size_t in_len, uint8_t* out, in Encrypt()
51 size_t out_len) { in Encrypt()
54 size_t written_sz; in Encrypt()
66 std::optional<size_t> Aes128Gcm::Decrypt(const uint8_t* in, size_t in_len, uint8_t* out, in Decrypt()
67 size_t out_len) { in Decrypt()
70 size_t written_sz; in Decrypt()
82 size_t Aes128Gcm::EncryptedSize(size_t size) { in EncryptedSize()
87 size_t Aes128Gcm::DecryptedSize(size_t size) { in DecryptedSize()
/packages/modules/Bluetooth/system/osi/include/
Dringbuffer.h34 ringbuffer_t* ringbuffer_init(const size_t size);
41 size_t ringbuffer_available(const ringbuffer_t* rb);
44 size_t ringbuffer_size(const ringbuffer_t* rb);
49 size_t ringbuffer_insert(ringbuffer_t* rb, const uint8_t* p, size_t length);
55 size_t ringbuffer_peek(const ringbuffer_t* rb, off_t offset, uint8_t* p,
56 size_t length);
59 size_t ringbuffer_pop(ringbuffer_t* rb, uint8_t* p, size_t length);
63 size_t ringbuffer_delete(ringbuffer_t* rb, size_t length);
/packages/services/Car/cpp/evs/sampleDriver/hidl/
DConfigManager.cpp131 size_t totalEntries = 0; in readCameraDeviceInfo()
132 size_t totalDataSize = 0; in readCameraDeviceInfo()
151 size_t ConfigManager::readCameraCapabilities(const XMLElement* const aCapElem, CameraInfo* aCamera, in readCameraCapabilities()
152 size_t& dataSize) { in readCameraCapabilities()
223 size_t ConfigManager::readCameraMetadata(const XMLElement* const aParamElem, CameraInfo* aCamera, in readCameraMetadata()
224 size_t& dataSize) { in readCameraMetadata()
230 size_t numEntries = 0; in readCameraMetadata()
240 size_t count = 0; in readCameraMetadata()
277 size_t len = strlen(curElem->FindAttribute("value")->Value()); in readCameraMetadata()
319 bool ConfigManager::constructCameraMetadata(CameraInfo* aCamera, const size_t totalEntries, in constructCameraMetadata()
[all …]
/packages/modules/adb/pairing_auth/include/adb/pairing/
Dpairing_auth.h55 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);
Daes_128_gcm.h31 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/StatsD/statsd/src/anomaly/
Dindexed_priority_queue.h32 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/
Dcompression_utils.h82 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 …]
/packages/modules/Bluetooth/tools/rootcanal/model/hci/
Dh4_parser.h58 size_t BytesRequested();
72 static constexpr size_t COMMAND_PREAMBLE_SIZE = 3;
73 static constexpr size_t COMMAND_LENGTH_OFFSET = 2;
75 static constexpr size_t ACL_PREAMBLE_SIZE = 4;
76 static constexpr size_t ACL_LENGTH_OFFSET = 2;
79 static constexpr size_t SCO_PREAMBLE_SIZE = 3;
80 static constexpr size_t SCO_LENGTH_OFFSET = 2;
84 static constexpr size_t EVENT_PREAMBLE_SIZE = 2;
85 static constexpr size_t EVENT_LENGTH_OFFSET = 1;
88 static constexpr size_t ISO_PREAMBLE_SIZE = 4;
[all …]
/packages/services/Car/cpp/evs/manager/aidl/tests/unit/include/
DMockHidlEvsHal_1_0.h38 MockHidlEvsHal_1_0(size_t numCameras, size_t numDisplays) : in MockHidlEvsHal_1_0()
49 size_t setNumberOfFramesToSend(size_t n);
52 void configureCameras(size_t n);
53 void configureDisplays(size_t n);
55 void forwardFrames(size_t numberOfFramesToForward, const std::string& deviceId);
56 size_t initializeBufferPool(size_t size);
78 std::unordered_map<size_t, AHardwareBuffer*> mBufferRecord GUARDED_BY(mLock);
83 size_t mNumCameras = 0;
84 size_t mNumDisplays = 0;
85 size_t mBufferPoolSize = 0;
[all …]

12345678910>>...54