/external/pigweed/pw_varint/ |
D | varint_test.cc | 44 : buffer_{std::byte{'a'}, in Varint() 54 std::byte buffer_[10]; member in pw::varint::__anon9166191c0111::Varint 58 ASSERT_EQ(1u, Encode(UINT32_C(0), buffer_)); in TEST_F() 59 EXPECT_EQ(std::byte{0}, buffer_[0]); in TEST_F() 60 ASSERT_EQ(1u, Encode(UINT32_C(1), buffer_)); in TEST_F() 61 EXPECT_EQ(std::byte{1}, buffer_[0]); in TEST_F() 62 ASSERT_EQ(1u, Encode(UINT32_C(2), buffer_)); in TEST_F() 63 EXPECT_EQ(std::byte{2}, buffer_[0]); in TEST_F() 67 ASSERT_EQ(1u, pw_varint_CallEncode(UINT32_C(0), buffer_, sizeof(buffer_))); in TEST_F() 68 EXPECT_EQ(std::byte{0}, buffer_[0]); in TEST_F() [all …]
|
/external/pigweed/pw_string/ |
D | type_to_string_test.cc | 102 TestWithBuffer() { std::memcpy(buffer_, kStartingString, sizeof(buffer_)); } in TestWithBuffer() 104 char buffer_[sizeof(kUint64Max)]; member in pw::string::__anon544d24e50111::TestWithBuffer 110 auto result = IntToString(9u, std::span(buffer_, 0)); in TEST_F() 113 EXPECT_STREQ(kStartingString, buffer_); in TEST_F() 117 auto result = IntToString(9u, std::span(buffer_, 1)); in TEST_F() 120 EXPECT_STREQ("", buffer_); in TEST_F() 124 auto result = IntToString(10u, std::span(buffer_, 2)); in TEST_F() 127 EXPECT_STREQ("", buffer_); in TEST_F() 131 auto result = IntToString(123u, std::span(buffer_, 3)); in TEST_F() 134 EXPECT_STREQ("", buffer_); in TEST_F() [all …]
|
/external/protobuf/src/google/protobuf/io/ |
D | coded_stream_unittest.cc | 136 static uint8 buffer_[kBufferSize]; member in google::protobuf::io::__anonc598809f0111::CodedStreamTest 139 uint8 CodedStreamTest::buffer_[CodedStreamTest::kBufferSize]; member in google::protobuf::io::__anonc598809f0111::CodedStreamTest 192 memcpy(buffer_, kVarintCases_case.bytes, kVarintCases_case.size); in TEST_2D() 193 ArrayInputStream input(buffer_, sizeof(buffer_), kBlockSizes_case); in TEST_2D() 207 memcpy(buffer_, kVarintCases_case.bytes, kVarintCases_case.size); in TEST_2D() 208 ArrayInputStream input(buffer_, sizeof(buffer_), kBlockSizes_case); in TEST_2D() 252 buffer_[0] = '\0'; in TEST_1D() 253 memcpy(buffer_ + 1, kVarintCases_case.bytes, kVarintCases_case.size); in TEST_1D() 254 ArrayInputStream input(buffer_, sizeof(buffer_)); in TEST_1D() 284 memcpy(buffer_, kVarintCases_case.bytes, kVarintCases_case.size); in TEST_1D() [all …]
|
/external/rust/crates/grpcio-sys/grpc/spm-cpp-include/grpcpp/impl/codegen/ |
D | byte_buffer.h | 64 ByteBuffer() : buffer_(nullptr) {} in ByteBuffer() 78 static_assert(std::is_same<decltype(buffer_), grpc_byte_buffer*>::value, in ByteBuffer() 88 buffer_ = g_core_codegen_interface->grpc_raw_byte_buffer_create( in ByteBuffer() 96 ByteBuffer(const ByteBuffer& buf) : buffer_(nullptr) { operator=(buf); } in ByteBuffer() 99 if (buffer_) { in ~ByteBuffer() 100 g_core_codegen_interface->grpc_byte_buffer_destroy(buffer_); in ~ByteBuffer() 111 if (buf.buffer_) { 113 buffer_ = g_core_codegen_interface->grpc_byte_buffer_copy(buf.buffer_); 123 if (buffer_) { in Clear() 124 g_core_codegen_interface->grpc_byte_buffer_destroy(buffer_); in Clear() [all …]
|
/external/rust/crates/grpcio-sys/grpc/include/grpcpp/impl/codegen/ |
D | byte_buffer.h | 64 ByteBuffer() : buffer_(nullptr) {} in ByteBuffer() 78 static_assert(std::is_same<decltype(buffer_), grpc_byte_buffer*>::value, in ByteBuffer() 88 buffer_ = g_core_codegen_interface->grpc_raw_byte_buffer_create( in ByteBuffer() 96 ByteBuffer(const ByteBuffer& buf) : buffer_(nullptr) { operator=(buf); } in ByteBuffer() 99 if (buffer_) { in ~ByteBuffer() 100 g_core_codegen_interface->grpc_byte_buffer_destroy(buffer_); in ~ByteBuffer() 111 if (buf.buffer_) { 113 buffer_ = g_core_codegen_interface->grpc_byte_buffer_copy(buf.buffer_); 123 if (buffer_) { in Clear() 124 g_core_codegen_interface->grpc_byte_buffer_destroy(buffer_); in Clear() [all …]
|
/external/pigweed/pw_tokenizer/ |
D | tokenize_test.cc | 151 TokenizeToBuffer() : buffer_{} {} in TokenizeToBuffer() 154 uint8_t buffer_[64]; member in pw::tokenizer::__anonb6ab7ff80111::TokenizeToBuffer 160 buffer_, in TEST_F() 170 EXPECT_EQ(std::memcmp(expected.data(), buffer_, expected.size()), 0); in TEST_F() 180 buffer_, in TEST_F() 188 EXPECT_EQ(std::memcmp(empty.data(), &buffer_, empty.size()), 0); in TEST_F() 191 EXPECT_TRUE(std::all_of(&buffer_[size], std::end(buffer_), [](uint8_t v) { in TEST_F() 207 EXPECT_EQ(std::memcmp(expected.data(), buffer_, expected.size()), 0); in TEST_F() 215 buffer_, &message_size, "%" PRId32, std::numeric_limits<int32_t>::min()); in TEST_F() 221 EXPECT_EQ(std::memcmp(expected.data(), buffer_, expected.size()), 0); in TEST_F() [all …]
|
/external/grpc-grpc/include/grpcpp/impl/codegen/ |
D | byte_buffer.h | 58 ByteBuffer() : buffer_(nullptr) {} in ByteBuffer() 72 static_assert(std::is_same<decltype(buffer_), grpc_byte_buffer*>::value, in ByteBuffer() 82 buffer_ = g_core_codegen_interface->grpc_raw_byte_buffer_create( in ByteBuffer() 91 if (buffer_) { in ~ByteBuffer() 92 g_core_codegen_interface->grpc_byte_buffer_destroy(buffer_); in ~ByteBuffer() 103 if (buffer_) { in Clear() 104 g_core_codegen_interface->grpc_byte_buffer_destroy(buffer_); in Clear() 105 buffer_ = nullptr; in Clear() 113 buffer_ = g_core_codegen_interface->grpc_byte_buffer_copy(buffer_); in Duplicate() 118 void Release() { buffer_ = nullptr; } in Release() [all …]
|
/external/webrtc/modules/video_coding/ |
D | packet_buffer.cc | 65 buffer_(start_buffer_size), in PacketBuffer() 84 size_t index = seq_num % buffer_.size(); in InsertPacket() 99 if (buffer_[index] != nullptr) { in InsertPacket() 101 if (buffer_[index]->seq_num == packet->seq_num) { in InsertPacket() 106 while (ExpandBufferSize() && buffer_[seq_num % buffer_.size()] != nullptr) { in InsertPacket() 108 index = seq_num % buffer_.size(); in InsertPacket() 111 if (buffer_[index] != nullptr) { in InsertPacket() 130 buffer_[index] = std::move(packet); in InsertPacket() 154 size_t iterations = std::min(diff, buffer_.size()); in ClearTo() 156 auto& stored = buffer_[first_seq_num_ % buffer_.size()]; in ClearTo() [all …]
|
/external/python/cryptography/src/cryptography/hazmat/primitives/ |
D | padding.py | 39 def _byte_padding_update(buffer_, data, block_size): argument 40 if buffer_ is None: 45 buffer_ += data 47 finished_blocks = len(buffer_) // (block_size // 8) 49 result = buffer_[:finished_blocks * (block_size // 8)] 50 buffer_ = buffer_[finished_blocks * (block_size // 8):] 52 return buffer_, result 55 def _byte_padding_pad(buffer_, block_size, paddingfn): argument 56 if buffer_ is None: 59 pad_size = block_size // 8 - len(buffer_) [all …]
|
/external/vixl/src/ |
D | code-buffer-vixl.cc | 44 : buffer_(NULL), in CodeBuffer() 53 buffer_ = reinterpret_cast<byte*>(malloc(capacity_)); in CodeBuffer() 55 buffer_ = reinterpret_cast<byte*>(mmap(NULL, in CodeBuffer() 64 VIXL_CHECK(buffer_ != NULL); in CodeBuffer() 67 VIXL_ASSERT(IsWordAligned(buffer_)); in CodeBuffer() 69 cursor_ = buffer_; in CodeBuffer() 74 : buffer_(reinterpret_cast<byte*>(buffer)), in CodeBuffer() 79 VIXL_ASSERT(buffer_ != NULL); in CodeBuffer() 87 free(buffer_); in ~CodeBuffer() 89 munmap(buffer_, capacity_); in ~CodeBuffer() [all …]
|
/external/webrtc/modules/audio_coding/neteq/ |
D | packet_buffer.cc | 77 buffer_.clear(); in Flush() 81 return buffer_.empty(); in Empty() 97 if (buffer_.size() >= max_number_of_packets_) { in InsertPacket() 109 buffer_.rbegin(), buffer_.rend(), NewTimestampIsLarger(packet)); in InsertPacket() 114 if (rit != buffer_.rend() && packet.timestamp == rit->timestamp) { in InsertPacket() 123 if (it != buffer_.end() && packet.timestamp == it->timestamp) { in InsertPacket() 125 it = buffer_.erase(it); in InsertPacket() 127 buffer_.insert(it, std::move(packet)); // Insert the packet at that position. in InsertPacket() 185 *next_timestamp = buffer_.front().timestamp; in NextTimestamp() 198 for (it = buffer_.begin(); it != buffer_.end(); ++it) { in NextHigherTimestamp() [all …]
|
/external/libchrome/base/containers/ |
D | circular_deque.h | 149 return parent_deque_->buffer_[index_]; 154 return &parent_deque_->buffer_[index_]; 252 return parent_deque_->buffer_.capacity() - parent_deque_->begin_ + index_; in OffsetFromBegin() 260 if (index_ == parent_deque_->buffer_.capacity()) in Increment() 267 index_ = parent_deque_->buffer_.capacity() - 1; in Decrement() 290 parent_deque_->buffer_.capacity(); in Add() 433 circular_deque(const circular_deque& other) : buffer_(other.size() + 1) { in circular_deque() 437 : buffer_(std::move(other.buffer_)), in circular_deque() 468 buffer_ = std::move(other.buffer_); 518 size_t right_size = buffer_.capacity() - begin_; in at() [all …]
|
/external/webrtc/rtc_base/ |
D | copy_on_write_buffer.cc | 22 : buffer_(buf.buffer_), offset_(buf.offset_), size_(buf.size_) {} in CopyOnWriteBuffer() 25 : buffer_(std::move(buf.buffer_)), offset_(buf.offset_), size_(buf.size_) { in CopyOnWriteBuffer() 35 : buffer_(size > 0 ? new RefCountedObject<Buffer>(size) : nullptr), in CopyOnWriteBuffer() 42 : buffer_(size > 0 || capacity > 0 in CopyOnWriteBuffer() 62 if (!buffer_) { in SetSize() 64 buffer_ = new RefCountedObject<Buffer>(size); in SetSize() 78 buffer_->SetSize(size + offset_); in SetSize() 85 if (!buffer_) { in EnsureCapacity() 87 buffer_ = new RefCountedObject<Buffer>(0, new_capacity); in EnsureCapacity() 102 if (!buffer_) in Clear() [all …]
|
D | copy_on_write_buffer.h | 58 if (buffer_) { in CopyOnWriteBuffer() 59 std::memcpy(buffer_->data(), data, size); in CopyOnWriteBuffer() 91 if (!buffer_) { in data() 95 return buffer_->data<T>() + offset_; in data() 105 if (!buffer_) { in cdata() 108 return buffer_->data<T>() + offset_; in cdata() 118 return buffer_ ? buffer_->capacity() - offset_ : 0; in capacity() 125 buffer_ = buf.buffer_; 135 buffer_ = std::move(buf.buffer_); 166 if (!buffer_) { in SetData() [all …]
|
/external/protobuf/js/binary/ |
D | encoder.js | 55 this.buffer_ = []; property in jspb.BinaryEncoder 63 return this.buffer_.length; 71 var buffer = this.buffer_; 72 this.buffer_ = []; property 94 this.buffer_.push((lowBits & 0x7f) | 0x80); 98 this.buffer_.push(lowBits); 131 this.buffer_.push((value & 0x7f) | 0x80); 135 this.buffer_.push(value); 157 this.buffer_.push((value & 0x7f) | 0x80); 163 this.buffer_.push(1); [all …]
|
/external/webrtc/modules/audio_processing/echo_detector/ |
D | circular_buffer.cc | 19 CircularBuffer::CircularBuffer(size_t size) : buffer_(size) {} in CircularBuffer() 23 buffer_[next_insertion_index_] = value; in Push() 25 next_insertion_index_ %= buffer_.size(); in Push() 26 RTC_DCHECK_LT(next_insertion_index_, buffer_.size()); in Push() 27 nr_elements_in_buffer_ = std::min(nr_elements_in_buffer_ + 1, buffer_.size()); in Push() 28 RTC_DCHECK_LE(nr_elements_in_buffer_, buffer_.size()); in Push() 36 (buffer_.size() + next_insertion_index_ - nr_elements_in_buffer_) % in Pop() 37 buffer_.size(); in Pop() 38 RTC_DCHECK_LT(index, buffer_.size()); in Pop() 40 return buffer_[index]; in Pop() [all …]
|
/external/pigweed/pw_persistent_ram/ |
D | persistent_test.cc | 29 void ZeroPersistentMemory() { memset(&buffer_, 0, sizeof(buffer_)); } in ZeroPersistentMemory() 34 buffer_; member in pw::persistent_ram::__anon83edba350111::PersistentTest 43 auto& persistent = *(new (&buffer_) Persistent<uint32_t>()); in TEST_F() 54 auto& persistent = *(new (&buffer_) Persistent<uint32_t>()); in TEST_F() 62 auto& persistent = *(new (&buffer_) Persistent<uint32_t>()); in TEST_F() 71 auto& persistent = *(new (&buffer_) Persistent<uint32_t>()); in TEST_F() 77 auto& persistent = *(new (&buffer_) Persistent<uint32_t>()); in TEST_F() 95 void ZeroPersistentMemory() { memset(&buffer_, 0, sizeof(buffer_)); } in ZeroPersistentMemory() 99 reinterpret_cast<std::byte*>(&buffer_), sizeof(buffer_))); in RandomFillMemory() 101 ASSERT_EQ(sws.size(), sizeof(buffer_)); in RandomFillMemory() [all …]
|
/external/tensorflow/tensorflow/lite/profiling/ |
D | buffered_profiler.h | 79 : buffer_(max_num_entries, false), in BufferedProfiler() 87 return buffer_.BeginEvent(tag, event_type, event_metadata1, in BeginEvent() 92 buffer_.EndEvent(event_handle); in EndEvent() 97 buffer_.EndEvent(event_handle, &event_metadata1, &event_metadata2); in EndEvent() 104 buffer_.AddEvent(tag, event_type, start, end, event_metadata1, in AddEvent() 108 void StartProfiling() { buffer_.SetEnabled(true); } in StartProfiling() 109 void StopProfiling() { buffer_.SetEnabled(false); } in StopProfiling() 110 void Reset() { buffer_.Reset(); } in Reset() 113 profile_events.reserve(buffer_.Size()); in GetProfileEvents() 114 for (size_t i = 0; i < buffer_.Size(); i++) { in GetProfileEvents() [all …]
|
/external/libchrome/base/android/ |
D | scoped_hardware_buffer_handle.cc | 34 std::swap(buffer_, other.buffer_); in operator =() 39 return buffer_ != nullptr; in is_valid() 43 return buffer_; in get() 47 if (buffer_) { in reset() 48 AndroidHardwareBufferCompat::GetInstance().Release(buffer_); in reset() 49 buffer_ = nullptr; in reset() 55 std::swap(buffer, buffer_); in Take() 60 DCHECK(buffer_); in Clone() 61 AndroidHardwareBufferCompat::GetInstance().Acquire(buffer_); in Clone() 62 return ScopedHardwareBufferHandle(buffer_); in Clone() [all …]
|
/external/pigweed/pw_rpc/public/pw_rpc/internal/ |
D | channel.h | 41 ~OutputBuffer() { PW_DCHECK(buffer_.empty()); } in ~OutputBuffer() 46 PW_DCHECK(buffer_.empty()); 47 buffer_ = other.buffer_; 48 other.buffer_ = {}; 56 return buffer.data() >= buffer_.data() && in Contains() 57 buffer.data() + buffer.size() <= buffer_.data() + buffer_.size(); in Contains() 60 bool empty() const { return buffer_.empty(); } in empty() 66 : buffer_(buffer) {} in OutputBuffer() 68 std::span<std::byte> buffer_; variable 84 output().DiscardBuffer(buffer.buffer_); in Release() [all …]
|
/external/brotli/c/enc/ |
D | ringbuffer.h | 46 uint8_t* buffer_; member 53 rb->buffer_ = 0; in RingBufferInit() 86 rb->buffer_ = rb->data_ + 2; in RingBufferInitBuffer() 87 rb->buffer_[-2] = rb->buffer_[-1] = 0; in RingBufferInitBuffer() 89 rb->buffer_[rb->cur_size_ + i] = 0; in RingBufferInitBuffer() 99 memcpy(&rb->buffer_[p], bytes, in RingBufferWriteTail() 117 memcpy(rb->buffer_, bytes, n); in RingBufferWrite() 126 rb->buffer_[rb->size_ - 2] = 0; in RingBufferWrite() 127 rb->buffer_[rb->size_ - 1] = 0; in RingBufferWrite() 130 rb->buffer_[rb->size_] = 241; in RingBufferWrite() [all …]
|
/external/tflite-support/tensorflow_lite_support/codegen/ |
D | utils.cc | 39 buffer_ << prefix << buf << std::endl; in Report() 44 std::string value = buffer_.str(); in GetMessage() 45 buffer_.str(""); in GetMessage() 93 if ((buffer_.empty() // nothing in the buffer in AppendInternal() 94 || buffer_.back() == '\n') // is on new line in AppendInternal() 97 buffer_.append(GenerateIndent()); in AppendInternal() 103 buffer_.reserve(buffer_.size() + text.size()); in AppendInternal() 114 buffer_.push_back(cur); in AppendInternal() 116 buffer_.append(GenerateIndent()); in AppendInternal() 120 buffer_.push_back(cur); in AppendInternal() [all …]
|
/external/webrtc/media/engine/ |
D | unhandled_packets_buffer.cc | 20 buffer_.reserve(kMaxStashedPackets); in UnhandledPacketsBuffer() 29 if (buffer_.size() < kMaxStashedPackets) { in AddPacket() 30 buffer_.push_back({ssrc, packet_time_us, packet}); in AddPacket() 33 buffer_[insert_pos_] = {ssrc, packet_time_us, packet}; in AddPacket() 43 if (buffer_.size() < kMaxStashedPackets) { in BackfillPackets() 52 for (size_t i = 0; i < buffer_.size(); ++i) { in BackfillPackets() 57 const uint32_t ssrc = buffer_[pos].ssrc; in BackfillPackets() 60 consumer(ssrc, buffer_[pos].packet_time_us, buffer_[pos].packet); in BackfillPackets() 62 remaining.push_back(buffer_[pos]); in BackfillPackets() 67 buffer_.swap(remaining); in BackfillPackets()
|
/external/tensorflow/tensorflow/core/lib/io/ |
D | block_builder.cc | 57 buffer_.clear(); in Reset() 66 return (buffer_.size() + // Raw data buffer in CurrentSizeEstimate() 75 core::PutFixed32(&buffer_, r); in Finish() 78 core::PutFixed32(&buffer_, static_cast<uint32_t>(restarts_.size())); in Finish() 80 return StringPiece(buffer_); in Finish() 87 assert(buffer_.empty() // No values yet? in Add() 98 CHECK_LE(buffer_.size(), std::numeric_limits<uint32_t>::max()); in Add() 99 restarts_.push_back(static_cast<uint32_t>(buffer_.size())); in Add() 109 core::PutVarint32(&buffer_, static_cast<uint32_t>(shared)); in Add() 110 core::PutVarint32(&buffer_, static_cast<uint32_t>(non_shared)); in Add() [all …]
|
/external/webrtc/modules/audio_processing/aec3/ |
D | frame_blocker.cc | 21 buffer_(num_bands_, std::vector<std::vector<float>>(num_channels)) { in FrameBlocker() 24 for (auto& band : buffer_) { in FrameBlocker() 44 RTC_DCHECK_GE(kBlockSize - 16, buffer_[band][channel].size()); in InsertSubFrameAndExtractBlock() 47 const int samples_to_block = kBlockSize - buffer_[band][channel].size(); in InsertSubFrameAndExtractBlock() 50 buffer_[band][channel].begin(), in InsertSubFrameAndExtractBlock() 51 buffer_[band][channel].end()); in InsertSubFrameAndExtractBlock() 53 (*block)[band][channel].begin() + buffer_[band][channel].size(), in InsertSubFrameAndExtractBlock() 56 buffer_[band][channel].clear(); in InsertSubFrameAndExtractBlock() 57 buffer_[band][channel].insert( in InsertSubFrameAndExtractBlock() 58 buffer_[band][channel].begin(), in InsertSubFrameAndExtractBlock() [all …]
|