Home
last modified time | relevance | path

Searched refs:bytes_to_read (Results 1 – 25 of 97) sorted by relevance

1234

/aosp_15_r20/external/tensorflow/tensorflow/core/lib/io/
H A Dinputbuffer.cc79 Status InputBuffer::ReadNBytes(int64_t bytes_to_read, std::string* result) { in ReadNBytes() argument
81 if (bytes_to_read < 0) { in ReadNBytes()
83 bytes_to_read); in ReadNBytes()
85 result->resize(bytes_to_read); in ReadNBytes()
87 Status status = ReadNBytes(bytes_to_read, &(*result)[0], &bytes_read); in ReadNBytes()
88 if (bytes_read < bytes_to_read) result->resize(bytes_read); in ReadNBytes()
92 Status InputBuffer::ReadNBytes(int64_t bytes_to_read, char* result, in ReadNBytes() argument
94 if (bytes_to_read < 0) { in ReadNBytes()
96 bytes_to_read); in ReadNBytes()
100 while (*bytes_read < static_cast<size_t>(bytes_to_read)) { in ReadNBytes()
[all …]
H A Drandom_inputstream.cc32 Status RandomAccessInputStream::ReadNBytes(int64_t bytes_to_read, in ReadNBytes() argument
34 if (bytes_to_read < 0) { in ReadNBytes()
38 result->resize_uninitialized(bytes_to_read); in ReadNBytes()
41 Status s = file_->Read(pos_, bytes_to_read, &data, result_buffer); in ReadNBytes()
53 Status RandomAccessInputStream::ReadNBytes(int64_t bytes_to_read, in ReadNBytes() argument
55 if (bytes_to_read < 0) { in ReadNBytes()
59 Status s = file_->Read(pos_, bytes_to_read, result); in ReadNBytes()
88 int64_t bytes_to_read = std::min<int64_t>(kMaxSkipSize, bytes_to_skip); in SkipNBytes() local
90 Status s = file_->Read(pos_, bytes_to_read, &data, scratch.get()); in SkipNBytes()
96 if (data.size() < static_cast<size_t>(bytes_to_read)) { in SkipNBytes()
[all …]
H A Dzlib_inputstream.cc124 int bytes_to_read = input_buffer_capacity_; in ReadFromStream() local
139 bytes_to_read -= z_stream_def_->stream->avail_in; in ReadFromStream()
146 Status s = input_stream_->ReadNBytes(bytes_to_read, &data); in ReadFromStream()
175 size_t ZlibInputStream::ReadBytesFromCache(size_t bytes_to_read, in ReadBytesFromCache() argument
180 size_t can_read_bytes = std::min(bytes_to_read, unread_bytes); in ReadBytesFromCache()
196 Status ZlibInputStream::ReadNBytes(int64_t bytes_to_read, tstring* result) { in ReadNBytes() argument
203 bytes_to_read -= ReadBytesFromCache(bytes_to_read, result); in ReadNBytes()
205 while (bytes_to_read > 0) { in ReadNBytes()
224 bytes_to_read -= ReadBytesFromCache(bytes_to_read, result); in ReadNBytes()
232 Status ZlibInputStream::ReadNBytes(int64_t bytes_to_read, absl::Cord* result) { in ReadNBytes() argument
[all …]
H A Dbuffered_inputstream.cc96 Status BufferedInputStream::ReadNBytes(int64_t bytes_to_read, tstring* result) { in ReadNBytes() argument
97 if (bytes_to_read < 0) { in ReadNBytes()
99 bytes_to_read); in ReadNBytes()
102 if (pos_ == limit_ && !file_status_.ok() && bytes_to_read > 0) { in ReadNBytes()
105 result->reserve(bytes_to_read); in ReadNBytes()
108 while (result->size() < static_cast<size_t>(bytes_to_read)) { in ReadNBytes()
120 std::min<int64_t>(limit_ - pos_, bytes_to_read - result->size()); in ReadNBytes()
128 (result->size() == static_cast<size_t>(bytes_to_read))) { in ReadNBytes()
H A Dinputstream_interface_test.cc30 Status ReadNBytes(int64_t bytes_to_read, tstring* result) override { in ReadNBytes() argument
32 if (pos_ + bytes_to_read > content_.size()) { in ReadNBytes()
35 *result = content_.substr(pos_, bytes_to_read); in ReadNBytes()
36 pos_ += bytes_to_read; in ReadNBytes()
/aosp_15_r20/external/tensorflow/tensorflow/core/lib/io/snappy/
H A Dsnappy_inputbuffer.cc33 Status SnappyInputBuffer::ReadNBytes(int64_t bytes_to_read, tstring* result) { in ReadNBytes() argument
35 result->resize_uninitialized(bytes_to_read); in ReadNBytes()
40 size_t bytes_read = ReadBytesFromCache(bytes_to_read, result_ptr); in ReadNBytes()
41 bytes_to_read -= bytes_read; in ReadNBytes()
44 while (bytes_to_read > 0) { in ReadNBytes()
51 bytes_read = ReadBytesFromCache(bytes_to_read, result_ptr); in ReadNBytes()
52 bytes_to_read -= bytes_read; in ReadNBytes()
70 size_t SnappyInputBuffer::ReadBytesFromCache(size_t bytes_to_read, in ReadBytesFromCache() argument
72 size_t can_read_bytes = std::min(bytes_to_read, avail_out_); in ReadBytesFromCache()
130 size_t bytes_to_read = 4; in ReadCompressedBlockLength() local
[all …]
H A Dsnappy_inputstream.cc46 Status SnappyInputStream::ReadNBytes(int64_t bytes_to_read, tstring* result) { in ReadNBytes() argument
48 result->resize_uninitialized(bytes_to_read); in ReadNBytes()
53 size_t bytes_read = ReadBytesFromCache(bytes_to_read, result_ptr); in ReadNBytes()
54 bytes_to_read -= bytes_read; in ReadNBytes()
57 while (bytes_to_read > 0) { in ReadNBytes()
63 size_t bytes_read = ReadBytesFromCache(bytes_to_read, result_ptr); in ReadNBytes()
64 bytes_to_read -= bytes_read; in ReadNBytes()
72 Status SnappyInputStream::ReadNBytes(int64_t bytes_to_read, in ReadNBytes() argument
76 TF_RETURN_IF_ERROR(ReadNBytes(bytes_to_read, &buf)); in ReadNBytes()
132 size_t SnappyInputStream::ReadBytesFromCache(size_t bytes_to_read, in ReadBytesFromCache() argument
[all …]
/aosp_15_r20/external/cronet/net/third_party/quiche/src/quiche/quic/core/http/
H A Dhttp_decoder.cc339 QuicByteCount bytes_to_read = std::min<QuicByteCount>( in ReadFramePayload() local
342 bool success = reader->ReadStringPiece(&payload, bytes_to_read); in ReadFramePayload()
350 QuicByteCount bytes_to_read = std::min<QuicByteCount>( in ReadFramePayload() local
353 bool success = reader->ReadStringPiece(&payload, bytes_to_read); in ReadFramePayload()
393 QuicByteCount bytes_to_read = std::min<QuicByteCount>( in ReadFramePayload() local
396 bool success = reader->ReadStringPiece(&payload, bytes_to_read); in ReadFramePayload()
480 QuicByteCount bytes_to_read = std::min<QuicByteCount>( in HandleUnknownFramePayload() local
483 bool success = reader->ReadStringPiece(&payload, bytes_to_read); in HandleUnknownFramePayload()
508 QuicByteCount bytes_to_read = std::min<QuicByteCount>( in BufferOrParsePayload() local
511 /* pos = */ 0, bytes_to_read)); in BufferOrParsePayload()
[all …]
/aosp_15_r20/system/core/fs_mgr/libsnapshot/libsnapshot_cow/
H A Dsnapshot_reader.cpp150 size_t bytes_to_read = std::min(static_cast<size_t>(block_size_), buffer_size); in ReadBlock() local
154 CHECK(start_offset + bytes_to_read <= block_size_); in ReadBlock()
178 if (!android::base::ReadFullyAtOffset(fd, buffer, bytes_to_read, offset)) { in ReadBlock()
184 memset(buffer, 0, bytes_to_read); in ReadBlock()
199 std::memcpy(buffer, (char*)temp_buffer + block_offset + start_offset, bytes_to_read); in ReadBlock()
214 std::string data(bytes_to_read, '\0'); in ReadBlock()
221 if (cow_->ReadData(op, buffer, bytes_to_read, start_offset) < bytes_to_read) { in ReadBlock()
227 for (size_t i = 0; i < bytes_to_read; i++) { in ReadBlock()
237 return bytes_to_read; in ReadBlock()
/aosp_15_r20/external/puffin/src/
H A Dpuffin_stream.cc221 auto bytes_to_read = std::min(length - bytes_read, end_byte - start_byte); in Read() local
222 TEST_AND_RETURN_FALSE(bytes_to_read >= 1); in Read()
225 TEST_AND_RETURN_FALSE(stream_->Read(bytes + bytes_read, bytes_to_read)); in Read()
229 if ((start_byte + bytes_to_read) * 8 > cur_deflate_->offset) { in Read()
230 bytes[bytes_read + bytes_to_read - 1] &= in Read()
246 deflate_bit_pos_ += bytes_to_read * 8; in Read()
252 bytes_read += bytes_to_read; in Read()
253 puff_pos_ += bytes_to_read; in Read()
262 auto bytes_to_read = end_byte - start_byte; in Read() local
272 deflate_buffer_->resize(bytes_to_read); in Read()
[all …]
/aosp_15_r20/external/sdv/vsomeip/third_party/boost/asio/include/boost/asio/impl/
Dread_until.hpp142 std::size_t bytes_to_read = std::min<std::size_t>( in read_until() local
145 b.commit(s.read_some(b.prepare(bytes_to_read), ec)); in read_until()
225 std::size_t bytes_to_read = std::min<std::size_t>( in read_until() local
228 b.commit(s.read_some(b.prepare(bytes_to_read), ec)); in read_until()
313 std::size_t bytes_to_read = std::min<std::size_t>( in read_until() local
316 b.commit(s.read_some(b.prepare(bytes_to_read), ec)); in read_until()
403 std::size_t bytes_to_read = std::min<std::size_t>( in read_until() local
406 b.commit(s.read_some(b.prepare(bytes_to_read), ec)); in read_until()
542 std::size_t bytes_to_read = std::min<std::size_t>( in read_until() local
546 b.grow(bytes_to_read); in read_until()
[all …]
/aosp_15_r20/system/update_engine/payload_consumer/
H A Dextent_reader.cc76 uint64_t bytes_to_read = in Read() local
83 bytes_to_read, in Read()
87 static_cast<ssize_t>(bytes_to_read)); in Read()
89 bytes_read += bytes_to_read; in Read()
90 cur_extent_bytes_read_ += bytes_to_read; in Read()
91 offset_ += bytes_to_read; in Read()
/aosp_15_r20/external/libchrome/mojo/core/
H A Ddata_pipe_consumer_dispatcher.cc150 uint32_t bytes_to_read = std::min(max_num_bytes_to_read, bytes_available_); in ReadData() local
151 if (bytes_to_read == 0) { in ReadData()
168 std::min(options_.capacity_num_bytes - read_offset_, bytes_to_read); in ReadData()
169 uint32_t head_bytes_to_copy = bytes_to_read - tail_bytes_to_copy; in ReadData()
175 *num_bytes = bytes_to_read; in ReadData()
179 read_offset_ = (read_offset_ + bytes_to_read) % options_.capacity_num_bytes; in ReadData()
180 bytes_available_ -= bytes_to_read; in ReadData()
183 NotifyRead(bytes_to_read); in ReadData()
214 uint32_t bytes_to_read = in BeginReadData() local
223 *buffer_num_bytes = bytes_to_read; in BeginReadData()
[all …]
/aosp_15_r20/external/pigweed/pw_stream/
H A Dmemory_stream.cc50 size_t bytes_to_read = in DoRead() local
52 if (bytes_to_read == 0) { in DoRead()
59 std::memcpy(dest.data(), source_.data() + position_, bytes_to_read); in DoRead()
60 position_ += bytes_to_read; in DoRead()
62 return StatusWithSize(bytes_to_read); in DoRead()
/aosp_15_r20/external/tensorflow/tensorflow/core/kernels/
H A Ddecode_compressed_op.cc37 Status ReadNBytes(int64_t bytes_to_read, tstring* result) override { in ReadNBytes() argument
39 if (bytes_to_read < 0) { in ReadNBytes()
41 bytes_to_read); in ReadNBytes()
43 int64_t bytes = bytes_to_read; in ReadNBytes()
45 if (pos_ + bytes_to_read > len_) { in ReadNBytes()
/aosp_15_r20/system/update_engine/common/
H A Dfile_fetcher.cc113 size_t bytes_to_read = buffer_.size(); in ScheduleRead() local
115 bytes_to_read = std::min(static_cast<uint64_t>(bytes_to_read), in ScheduleRead()
119 if (!bytes_to_read) { in ScheduleRead()
126 bytes_to_read, in ScheduleRead()
/aosp_15_r20/external/cronet/net/http/
H A Dtest_upload_data_stream_not_allow_http1.cc21 const size_t bytes_to_read = in ReadInternal() local
23 memcpy(buf->data(), content_.c_str(), bytes_to_read); in ReadInternal()
24 content_ = content_.substr(bytes_to_read); in ReadInternal()
27 return bytes_to_read; in ReadInternal()
/aosp_15_r20/external/pdfium/core/fxcodec/
H A Dcfx_codec_memory.cpp28 size_t bytes_to_read = std::min(buffer.size(), size_ - pos_); in ReadBlock() local
29 fxcrt::spancpy(buffer, GetBufferSpan().subspan(pos_, bytes_to_read)); in ReadBlock()
30 pos_ += bytes_to_read; in ReadBlock()
31 return bytes_to_read; in ReadBlock()
/aosp_15_r20/development/host/windows/usb/api/
H A Dadb_endpoint_object.cpp51 ULONG bytes_to_read, in AsyncRead() argument
57 bytes_to_read, in AsyncRead()
77 ULONG bytes_to_read, in SyncRead() argument
82 bytes_to_read, in SyncRead()
/aosp_15_r20/external/autotest/client/cros/
H A Dnetwork.py91 bytes_to_read = min(bytes_left, _MAX_FETCH_READ_BYTES)
92 bytes_read = len(result.read(bytes_to_read))
94 if bytes_read != bytes_to_read:
97 (bytes_to_read, bytes_read))
/aosp_15_r20/external/arm-trusted-firmware/drivers/brcm/emmc/
H A Demmc_pboot_hal_memory_drv.c33 size_t bytes_to_read);
166 size_t storage_size, size_t bytes_to_read) in emmc_read() argument
176 storage_size, bytes_to_read); in emmc_read()
323 size_t storage_size, size_t bytes_to_read) in sdio_read() argument
331 storage_addr, mem_addr, bytes_to_read); in sdio_read()
333 if (storage_size < bytes_to_read) in sdio_read()
352 remSize = bytes_to_read; in sdio_read()
/aosp_15_r20/external/trusty/arm-trusted-firmware/drivers/brcm/emmc/
Demmc_pboot_hal_memory_drv.c33 size_t bytes_to_read);
166 size_t storage_size, size_t bytes_to_read) in emmc_read() argument
176 storage_size, bytes_to_read); in emmc_read()
325 size_t storage_size, size_t bytes_to_read) in sdio_read() argument
333 storage_addr, mem_addr, bytes_to_read); in sdio_read()
335 if (storage_size < bytes_to_read) { in sdio_read()
356 remSize = bytes_to_read; in sdio_read()
/aosp_15_r20/external/mesa3d/src/util/
H A Dfossilize_db.c132 char bytes_to_read[FOSSILIZE_BLOB_HASH_LENGTH + sizeof(struct foz_payload_header)]; in update_foz_index() local
138 if (offset + sizeof(bytes_to_read) > len) in update_foz_index()
142 if (fread(bytes_to_read, 1, sizeof(bytes_to_read), db_idx) != in update_foz_index()
143 sizeof(bytes_to_read)) in update_foz_index()
146 offset += sizeof(bytes_to_read); in update_foz_index()
147 header = (struct foz_payload_header*)&bytes_to_read[FOSSILIZE_BLOB_HASH_LENGTH]; in update_foz_index()
157 memcpy(hash_str, bytes_to_read, FOSSILIZE_BLOB_HASH_LENGTH); in update_foz_index()
/aosp_15_r20/external/cronet/net/base/
H A Dchunked_upload_data_stream.cc94 size_t bytes_to_read = in ReadChunk() local
98 bytes_to_read); in ReadChunk()
99 bytes_read += bytes_to_read; in ReadChunk()
100 read_offset_ += bytes_to_read; in ReadChunk()
/aosp_15_r20/external/libchrome/base/files/
H A Dfile_proxy.cc177 ReadHelper(FileProxy* proxy, File file, int bytes_to_read) in ReadHelper() argument
179 buffer_(new char[bytes_to_read]), in ReadHelper()
180 bytes_to_read_(bytes_to_read), in ReadHelper()
303 bool FileProxy::Read(int64_t offset, int bytes_to_read, ReadCallback callback) { in Read() argument
305 if (bytes_to_read < 0) in Read()
308 ReadHelper* helper = new ReadHelper(this, std::move(file_), bytes_to_read); in Read()

1234