Home
last modified time | relevance | path

Searched refs:buffer_ (Results 1 – 25 of 258) sorted by relevance

1234567891011

/external/protobuf/src/google/protobuf/io/
Dcoded_stream_unittest.cc141 static uint8 buffer_[kBufferSize]; member in google::protobuf::io::__anon8e03bf410111::CodedStreamTest
144 uint8 CodedStreamTest::buffer_[CodedStreamTest::kBufferSize]; member in google::protobuf::io::__anon8e03bf410111::CodedStreamTest
193 memcpy(buffer_, kVarintCases_case.bytes, kVarintCases_case.size); in TEST_2D()
194 ArrayInputStream input(buffer_, sizeof(buffer_), kBlockSizes_case); in TEST_2D()
208 memcpy(buffer_, kVarintCases_case.bytes, kVarintCases_case.size); in TEST_2D()
209 ArrayInputStream input(buffer_, sizeof(buffer_), kBlockSizes_case); in TEST_2D()
254 buffer_[0] = '\0'; in TEST_1D()
255 memcpy(buffer_ + 1, kVarintCases_case.bytes, kVarintCases_case.size); in TEST_1D()
256 ArrayInputStream input(buffer_, sizeof(buffer_)); in TEST_1D()
286 memcpy(buffer_, kVarintCases_case.bytes, kVarintCases_case.size); in TEST_1D()
[all …]
Dcoded_stream.cc100 buffer_end_ = buffer_; in BackUpInputToCurrentPosition()
232 buffer_ = NULL; in Skip()
233 buffer_end_ = buffer_; in Skip()
254 *data = buffer_; in GetDirectBufferPointer()
287 buffer->append(reinterpret_cast<const char*>(buffer_), in ReadStringFallback()
295 buffer->append(reinterpret_cast<const char*>(buffer_), size); in ReadStringFallback()
308 ptr = buffer_; in ReadLittleEndian32Fallback()
325 ptr = buffer_; in ReadLittleEndian64Fallback()
393 (buffer_end_ > buffer_ && !(buffer_end_[-1] & 0x80))) { in ReadVarint32Fallback()
398 ReadVarint32FromArray(first_byte_or_zero, buffer_, &temp); in ReadVarint32Fallback()
[all …]
Dcoded_stream.h512 const uint8* buffer_; variable
807 uint8* buffer_; variable
847 if (GOOGLE_PREDICT_TRUE(buffer_ < buffer_end_)) { in ReadVarint32()
848 v = *buffer_; in ReadVarint32()
861 if (GOOGLE_PREDICT_TRUE(buffer_ < buffer_end_) && *buffer_ < 0x80) { in ReadVarint64()
862 *value = *buffer_; in ReadVarint64()
911 memcpy(value, buffer_, sizeof(*value)); in ReadLittleEndian32()
925 memcpy(value, buffer_, sizeof(*value)); in ReadLittleEndian64()
938 if (GOOGLE_PREDICT_TRUE(buffer_ < buffer_end_)) { in ReadTag()
939 v = *buffer_; in ReadTag()
[all …]
/external/webrtc/webrtc/modules/rtp_rtcp/source/
Drtp_format_vp8_test_helper.cc22 buffer_(NULL), in RtpFormatVp8TestHelper()
35 delete [] buffer_; in ~RtpFormatVp8TestHelper()
50 buffer_ = new uint8_t[buffer_size_]; in Init()
79 EXPECT_TRUE(packetizer->NextPacket(buffer_, &send_bytes, &last)); in GetAllPacketsAndCheck()
130 EXPECT_BIT_EQ(buffer_[0], 6, 0); // Check reserved bit. in CheckHeader()
136 EXPECT_BIT_X_EQ(buffer_[0], 1); in CheckHeader()
142 EXPECT_BIT_X_EQ(buffer_[0], 0); in CheckHeader()
145 EXPECT_BIT_N_EQ(buffer_[0], hdr_info_->nonReference ? 1 : 0); in CheckHeader()
146 EXPECT_BIT_S_EQ(buffer_[0], frag_start ? 1 : 0); in CheckHeader()
152 EXPECT_EQ(buffer_[0] & 0x0F, buffer_[payload_start_]); in CheckHeader()
[all …]
/external/tensorflow/tensorflow/lite/profiling/
Dprofiler.h80 Profiler() : buffer_(1024, false) {} in Profiler()
82 void StartProfiling() { buffer_.SetEnabled(true); } in StartProfiling()
83 void StopProfiling() { buffer_.SetEnabled(false); } in StopProfiling()
84 void Reset() { buffer_.Reset(); } in Reset()
87 profile_events.reserve(buffer_.Size()); in GetProfileEvents()
88 for (size_t i = 0; i < buffer_.Size(); i++) { in GetProfileEvents()
89 profile_events.push_back(buffer_.At(i)); in GetProfileEvents()
97 ProfileBuffer* GetProfileBuffer() { return &buffer_; } in GetProfileBuffer()
98 ProfileBuffer buffer_; variable
108 : buffer_(nullptr), event_handle_(0) { in ScopedProfile()
[all …]
/external/grpc-grpc/include/grpcpp/impl/codegen/
Dbyte_buffer.h58 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/vixl/src/
Dcode-buffer-vixl.cc44 : 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 …]
Dcode-buffer-vixl.h58 ptrdiff_t cursor_offset = cursor_ - buffer_; in GetOffsetFrom()
73 byte* rewound_cursor = buffer_ + offset; in Rewind()
74 VIXL_ASSERT((buffer_ <= rewound_cursor) && (rewound_cursor <= cursor_)); in Rewind()
81 VIXL_ASSERT((offset >= 0) && (offset <= (cursor_ - buffer_))); in GetOffsetAddress()
82 return reinterpret_cast<T>(buffer_ + offset); in GetOffsetAddress()
98 VIXL_ASSERT((cursor_ >= buffer_) && (cursor_ <= (buffer_ + capacity_))); in GetRemainingBytes()
99 return (buffer_ + capacity_) - cursor_; in GetRemainingBytes()
106 VIXL_ASSERT((cursor_ >= buffer_) && (cursor_ <= (buffer_ + capacity_))); in GetSizeInBytes()
107 return cursor_ - buffer_; in GetSizeInBytes()
176 byte* buffer_;
/external/libchrome/base/containers/
Dcircular_deque.h149 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 …]
Dvector_buffer.h48 : buffer_(reinterpret_cast<T*>(malloc(sizeof(T) * count))), in VectorBuffer()
52 : buffer_(other.buffer_), capacity_(other.capacity_) { in VectorBuffer()
53 other.buffer_ = nullptr; in VectorBuffer()
57 ~VectorBuffer() { free(buffer_); } in ~VectorBuffer()
60 free(buffer_);
61 buffer_ = other.buffer_;
64 other.buffer_ = nullptr;
71 T& operator[](size_t i) { return buffer_[i]; }
72 const T& operator[](size_t i) const { return buffer_[i]; }
73 T* begin() { return buffer_; } in begin()
[all …]
/external/webrtc/webrtc/modules/audio_coding/neteq/
Dpacket_buffer.cc50 DeleteAllPackets(&buffer_); in Flush()
54 return buffer_.empty(); in Empty()
68 if (buffer_.size() >= max_number_of_packets_) { in InsertPacket()
79 buffer_.rbegin(), buffer_.rend(), in InsertPacket()
85 if (rit != buffer_.rend() && in InsertPacket()
96 if (it != buffer_.end() && in InsertPacket()
100 it = buffer_.erase(it); in InsertPacket()
102 buffer_.insert(it, packet); // Insert the packet at that position. in InsertPacket()
154 *next_timestamp = buffer_.front()->header.timestamp; in NextTimestamp()
167 for (it = buffer_.begin(); it != buffer_.end(); ++it) { in NextHigherTimestamp()
[all …]
Ddtmf_buffer.cc33 buffer_.clear(); in Flush()
107 DtmfList::iterator it = buffer_.begin(); in InsertEvent()
108 while (it != buffer_.end()) { in InsertEvent()
115 buffer_.push_back(event); in InsertEvent()
117 buffer_.sort(CompareEvents); in InsertEvent()
122 DtmfList::iterator it = buffer_.begin(); in GetEvent()
123 while (it != buffer_.end()) { in GetEvent()
136 if (next != buffer_.end()) { in GetEvent()
159 buffer_.erase(it); in GetEvent()
175 it = buffer_.erase(it); in GetEvent()
[all …]
/external/protobuf/js/binary/
Dencoder.js55 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);
113 this.buffer_.push((value & 0x7f) | 0x80);
117 this.buffer_.push(value);
139 this.buffer_.push((value & 0x7f) | 0x80);
145 this.buffer_.push(1);
[all …]
/external/v8/src/regexp/
Dregexp-macro-assembler-irregexp-inl.h19 DCHECK(pc_ <= buffer_.length()); in Emit()
20 if (pc_ + 3 >= buffer_.length()) { in Emit()
23 *reinterpret_cast<uint32_t*>(buffer_.start() + pc_) = word; in Emit()
29 DCHECK(pc_ <= buffer_.length()); in Emit16()
30 if (pc_ + 1 >= buffer_.length()) { in Emit16()
33 *reinterpret_cast<uint16_t*>(buffer_.start() + pc_) = word; in Emit16()
39 DCHECK(pc_ <= buffer_.length()); in Emit8()
40 if (pc_ == buffer_.length()) { in Emit8()
43 *reinterpret_cast<unsigned char*>(buffer_.start() + pc_) = word; in Emit8()
49 DCHECK(pc_ <= buffer_.length()); in Emit32()
[all …]
/external/libchrome/base/android/
Dscoped_hardware_buffer_handle.cc34 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/brotli/c/enc/
Dringbuffer.h46 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()
136 memcpy(&rb->buffer_[masked_pos], bytes, n); in RingBufferWrite()
[all …]
/external/tensorflow/tensorflow/core/lib/io/
Dblock_builder.cc57 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/tensorflow/tensorflow/core/kernels/data/
Dwindow_dataset_op.cc152 if (!input_impl_ && buffer_.empty()) { in GetNextInternal()
161 for (size_t i = buffer_.size(); in GetNextInternal()
168 buffer_.emplace_back(std::move(element), status); in GetNextInternal()
177 if (buffer_.empty() || in GetNextInternal()
178 (dataset()->drop_remainder_ && buffer_.size() < target_size)) { in GetNextInternal()
183 int num_elements = 1 + (buffer_.size() - 1) / window_stride; in GetNextInternal()
186 status.Update(buffer_[window_stride * i].status); in GetNextInternal()
190 window_elements.emplace_back(buffer_[window_stride * i].result); in GetNextInternal()
194 int buffer_size = buffer_.size(); in GetNextInternal()
205 for (size_t i = 0; i < buffer_.size(); ++i) { in GetNextInternal()
[all …]
/external/libaom/libaom/test/
Dhash_test.cc46 uint8_t *buffer_; member in __anon0afdca660111::AV1Crc32cHashTest
59 buffer_ = new uint8_t[length_]; in SetUp()
60 ASSERT_TRUE(buffer_ != NULL); in SetUp()
62 buffer_[i] = rnd_.Rand8(); in SetUp()
66 void AV1Crc32cHashTest::TearDown() { delete[] buffer_; } in TearDown()
71 uint32_t crc0 = test_impl(&calc_, buffer_, length_); in RunCheckOutput()
72 uint32_t crc1 = test_impl(&calc_, buffer_, length_); in RunCheckOutput()
73 uint32_t crc2 = ref_impl(&calc_, buffer_, length_); in RunCheckOutput()
77 buffer_[0] += 1; in RunCheckOutput()
78 uint32_t crc3 = test_impl(&calc_, buffer_, length_); in RunCheckOutput()
[all …]
/external/webrtc/webrtc/test/gl/
Dgl_renderer.cc21 : is_init_(false), buffer_(NULL), width_(0), height_(0) {} in GlRenderer()
37 delete[] buffer_; in Destroy()
38 buffer_ = NULL; in Destroy()
61 delete[] buffer_; in ResizeVideo()
62 buffer_ = new uint8_t[buffer_size_]; in ResizeVideo()
63 assert(buffer_ != NULL); in ResizeVideo()
64 memset(buffer_, 0, buffer_size_); in ResizeVideo()
69 GL_UNSIGNED_INT_8_8_8_8, static_cast<GLvoid*>(buffer_)); in ResizeVideo()
81 webrtc::ConvertFromI420(frame, kBGRA, 0, buffer_); in RenderFrame()
86 GL_UNSIGNED_INT_8_8_8_8, buffer_); in RenderFrame()
/external/webrtc/webrtc/base/
Dtransformadapter.cc44 if ((state_ == ST_PROCESSING) && (len_ < sizeof(buffer_))) { in Read()
47 buffer_ + len_, in Read()
48 sizeof(buffer_) - len_, in Read()
66 StreamResult result = transform_->Transform(buffer_, &in_len, in Read()
86 memmove(buffer_, buffer_ + in_len, len_); in Read()
112 if (len_ < sizeof(buffer_)) { in Write()
115 size_t out_len = sizeof(buffer_) - len_; in Write()
117 buffer_ + len_, &out_len, in Write()
138 StreamResult result = StreamAdapterInterface::Write(buffer_ + pos, in Write()
158 memmove(buffer_, buffer_ + pos, len_); in Write()
/external/image_io/src/base/
Dbyte_buffer.cc33 : buffer_(std::move(buffer)), size_(size) { in ByteBuffer()
34 if (!buffer_) { in ByteBuffer()
38 buffer_.reset(); in ByteBuffer()
53 buffer_.reset(new Byte[size_]); // NOLINT in ByteBuffer()
54 Byte* pos = buffer_.get(); in ByteBuffer()
59 buffer_.reset(nullptr); in ByteBuffer()
69 buffer_[location] = static_cast<Byte>(value >> 8); in SetBigEndianValue()
70 buffer_[location + 1] = static_cast<Byte>(value & 0xFF); in SetBigEndianValue()
76 return buffer_.release(); in Release()
/external/google-breakpad/src/common/mac/
Dmacho_reader.cc83 buffer_.start = buffer; in Read()
84 buffer_.end = buffer + size; in Read()
85 ByteCursor cursor(&buffer_); in Read()
117 size_t fat_size = buffer_.Size(); in Read()
142 object_files_[0].size = static_cast<uint32_t>(buffer_.Size()); in Read()
228 assert(!buffer_.start); in Read()
229 buffer_.start = buffer; in Read()
230 buffer_.end = buffer + size; in Read()
231 ByteCursor cursor(&buffer_, true); in Read()
355 if (file_offset > buffer_.Size() || in WalkLoadCommands()
[all …]
/external/tensorflow/tensorflow/core/kernels/data/experimental/
Dsliding_window_dataset_op.cc159 for (size_t i = buffer_.size(); i < target_size && !*end_of_sequence; in GetNextInternal()
165 buffer_.push_back(std::move(element)); in GetNextInternal()
172 if (buffer_.size() < target_size) { in GetNextInternal()
178 batch_elements.emplace_back(buffer_[window_stride * i]); in GetNextInternal()
182 if (window_shift >= buffer_.size()) { in GetNextInternal()
183 for (size_t i = buffer_.size(); i < window_shift; ++i) { in GetNextInternal()
193 buffer_.clear(); in GetNextInternal()
195 buffer_.erase(buffer_.begin(), buffer_.begin() + window_shift); in GetNextInternal()
249 buffer_.size())); in SaveInternal()
250 for (int64 i = 0; i < buffer_.size(); i++) { in SaveInternal()
[all …]
/external/vixl/examples/aarch32/
Dexamples.h52 buffer_(reinterpret_cast<byte*>(mmap(NULL, in ExecutableMemory()
58 VIXL_ASSERT(reinterpret_cast<intptr_t>(buffer_) != -1); in ExecutableMemory()
59 memcpy(buffer_, code_start, size_); in ExecutableMemory()
60 __builtin___clear_cache(buffer_, buffer_ + size_); in ExecutableMemory()
62 ~ExecutableMemory() { munmap(buffer_, size_); } in ~ExecutableMemory()
76 byte* buffer_address = buffer_ + offset; in GetOffsetAddress()
83 byte* buffer_; variable

1234567891011