/system/connectivity/wifilogd/tests/ |
message_buffer_unittest.cpp | 37 MessageBufferTest() : buffer_{kBufferSizeBytes} {} 48 EXPECT_TRUE(buffer_.Append(message.data(), message.size())); 50 EXPECT_EQ(0U, buffer_.GetFreeSize()); 57 std::tie(start, len) = buffer_.ConsumeNextMessage(); 61 MessageBuffer buffer_; member in class:android::wifilogd::__anon2733::MessageBufferTest 67 EXPECT_TRUE(buffer_.Append(kSmallestMessage.data(), kSmallestMessage.size())); 71 EXPECT_TRUE(buffer_.Append(kLargestMessage.data(), kLargestMessage.size())); 75 ASSERT_TRUE(buffer_.Append(kLargestMessage.data(), kLargestMessage.size())); 76 ASSERT_FALSE(buffer_.CanFitNow(1)); 78 buffer_.Clear() [all...] |
byte_buffer_unittest.cpp | 38 ByteBuffer<kBufferSizeBytes> buffer_; member in class:android::wifilogd::__anon2730::ByteBufferTest 44 buffer_.AppendOrDie(kSmallestMessage.data(), kSmallestMessage.size()); 48 buffer_.AppendOrDie(kLargestMessage.data(), kLargestMessage.size()); 54 buffer_.AppendOrDie(message1.data(), message1.size()); 55 buffer_.AppendOrDie(message2.data(), message2.size()); 58 EXPECT_EQ(0, std::memcmp(buffer_.data(), expected.data(), expected.size())); 63 buffer_.AppendOrDie(message1.data(), message1.size()); 66 ASSERT_NE(buffer_.size(), copy.size()); 68 copy = buffer_; 69 ASSERT_EQ(buffer_.size(), copy.size()) [all...] |
/hardware/interfaces/wifi/1.2/default/tests/ |
ringbuffer_unit_tests.cpp | 33 Ringbuffer buffer_{maxBufferSize_}; 37 ASSERT_TRUE(buffer_.getData().empty()); 43 buffer_.append(input); 44 buffer_.append(input2); 45 ASSERT_EQ(2u, buffer_.getData().size()); 46 EXPECT_EQ(input, buffer_.getData().front()); 47 EXPECT_EQ(input2, buffer_.getData().back()); 54 buffer_.append(input); 55 buffer_.append(input2); 56 buffer_.append(input3) [all...] |
/device/google/cuttlefish_common/common/libs/auto_resources/ |
auto_free_buffer_test.cpp | 38 AutoFreeBuffer buffer_; member in class:test::AutoFreeBufferTest 43 buffer_.Reserve(kImmutableReserveSize); 44 const void* const data = buffer_.data(); 46 EXPECT_EQ(0u, buffer_.size()); 47 EXPECT_EQ(kImmutableReserveSize, buffer_.reserve_size()); 50 buffer_.Resize(kImmutableReserveSize); 51 EXPECT_EQ(kImmutableReserveSize, buffer_.size()); 52 EXPECT_EQ(data, buffer_.data()); 55 buffer_.Reserve(kImmutableReserveSize / 2); 56 EXPECT_EQ(kImmutableReserveSize, buffer_.reserve_size()) [all...] |
/external/v8/src/regexp/ |
regexp-macro-assembler-irregexp-inl.h | 19 DCHECK(pc_ <= buffer_.length()); 20 if (pc_ + 3 >= buffer_.length()) { 23 *reinterpret_cast<uint32_t*>(buffer_.start() + pc_) = word; 29 DCHECK(pc_ <= buffer_.length()); 30 if (pc_ + 1 >= buffer_.length()) { 33 *reinterpret_cast<uint16_t*>(buffer_.start() + pc_) = word; 39 DCHECK(pc_ <= buffer_.length()); 40 if (pc_ == buffer_.length()) { 43 *reinterpret_cast<unsigned char*>(buffer_.start() + pc_) = word; 49 DCHECK(pc_ <= buffer_.length()) [all...] |
/frameworks/native/libs/vr/libpdx/private/pdx/rpc/ |
array_wrapper.h | 30 ArrayWrapper() : buffer_(nullptr), capacity_(0), end_(0) {} 33 : buffer_(&buffer[0]), 48 buffer_ = other.buffer_; 60 buffer_ = other.buffer_; 63 other.buffer_ = nullptr; 71 pointer data() { return buffer_; } 72 const_pointer data() const { return buffer_; } 74 pointer begin() { return &buffer_[0]; 97 pointer buffer_; member in class:android::pdx::rpc::ArrayWrapper [all...] |
buffer_wrapper.h | 30 BufferWrapper() : buffer_(nullptr), capacity_(0), end_(0) {} 33 : buffer_(&buffer[0]), 48 buffer_ = other.buffer_; 60 buffer_ = other.buffer_; 63 other.buffer_ = nullptr; 71 pointer data() { return buffer_; } 72 const_pointer data() const { return buffer_; } 74 pointer begin() { return &buffer_[0]; 94 pointer buffer_; member in class:android::pdx::rpc::BufferWrapper 146 BufferType buffer_; member in class:android::pdx::rpc::BufferWrapper [all...] |
payload.h | 24 : buffer_(MessageBuffer<Slot>::GetEmptyBuffer()), 25 cursor_(buffer_.begin()), 26 const_cursor_(buffer_.cbegin()) {} 37 typename BufferType::const_iterator ConstEnd() { return buffer_.cend(); } 41 buffer_.resize(size); 42 cursor_ = buffer_.begin(); 43 const_cursor_ = buffer_.cbegin(); 47 void Rewind() { const_cursor_ = buffer_.cbegin(); } 52 const std::size_t offset = buffer_.size(); 53 buffer_.resize(offset + size) 71 BufferType& buffer_; member in class:android::pdx::rpc::MessagePayload [all...] |
string_wrapper.h | 32 StringWrapper() : buffer_(nullptr), capacity_(0), end_(0) {} 35 : buffer_(&buffer[0]), 53 buffer_ = other.buffer_; 65 buffer_ = other.buffer_; 68 other.buffer_ = nullptr; 76 pointer data() { return buffer_; } 77 const_pointer data() const { return buffer_; } 79 pointer begin() { return &buffer_[0]; 100 pointer buffer_; member in class:android::pdx::rpc::StringWrapper [all...] |
/frameworks/base/tools/aapt2/format/binary/ |
ChunkWriter.h | 30 explicit inline ChunkWriter(BigBuffer* buffer) : buffer_(buffer) { 37 start_size_ = buffer_->size(); 38 T* chunk = buffer_->NextBlock<T>(); 47 return buffer_->NextBlock<T>(count); 51 return buffer_; 59 return buffer_->size() - start_size_; 63 buffer_->Align4(); 64 header_->size = util::HostToDevice32(buffer_->size() - start_size_); 71 BigBuffer* buffer_; member in class:aapt::ChunkWriter 78 start_size_ = buffer_->size() [all...] |
/art/compiler/utils/x86/ |
assembler_x86.cc | 63 AssemblerBuffer::EnsureCapacity ensured(&buffer_); 70 AssemblerBuffer::EnsureCapacity ensured(&buffer_); 77 AssemblerBuffer::EnsureCapacity ensured(&buffer_); 86 AssemblerBuffer::EnsureCapacity ensured(&buffer_); 87 intptr_t call_start = buffer_.GetPosition(); 91 DCHECK_EQ((buffer_.GetPosition() - call_start), kCallExternalLabelSize); 96 AssemblerBuffer::EnsureCapacity ensured(&buffer_); 102 AssemblerBuffer::EnsureCapacity ensured(&buffer_); 109 AssemblerBuffer::EnsureCapacity ensured(&buffer_); 121 AssemblerBuffer::EnsureCapacity ensured(&buffer_); [all...] |
/external/bsdiff/ |
buffer_file.cc | 13 buffer_.reserve(size); 26 buffer_.insert(buffer_.end(), data, data + count); 36 if (!WriteAll(file_, buffer_.data(), buffer_.size())) 38 // Prevent writing |buffer_| to |file_| again if Close() is called more than 40 buffer_.clear(); 45 *size = buffer_.size();
|
/frameworks/native/libs/vr/libbufferhub/include/private/dvr/ |
ion_buffer.h | 27 bool IsValid() const { return buffer_ && buffer_->initCheck() == NO_ERROR; } 72 sp<GraphicBuffer>& buffer() { return buffer_; } 73 const sp<GraphicBuffer>& buffer() const { return buffer_; } 75 return buffer_.get() ? buffer_->handle : nullptr; 77 uint32_t width() const { return buffer_.get() ? buffer_->getWidth() : 0; } 78 uint32_t height() const { return buffer_.get() ? buffer_->getHeight() : 0; 91 sp<GraphicBuffer> buffer_; member in class:android::dvr::IonBuffer [all...] |
/frameworks/native/libs/vr/libvrflinger/ |
acquired_buffer.cpp | 13 : buffer_(buffer), acquire_fence_(std::move(acquire_fence)), slot_(slot) {} 26 buffer_ = nullptr; 29 buffer_ = buffer; 45 swap(buffer_, other.buffer_); 62 buffer_->id(), acquire_fence_.Get(), ret, ret < 0 ? errno : 0); 79 return std::move(buffer_); 84 buffer_ ? buffer_->id() : -1, release_fence.Get()); 85 if (buffer_) { [all...] |
/external/webrtc/webrtc/modules/rtp_rtcp/source/ |
rtp_format_vp8_test_helper.cc | 22 buffer_(NULL), 35 delete [] buffer_; 50 buffer_ = new uint8_t[buffer_size_]; 79 EXPECT_TRUE(packetizer->NextPacket(buffer_, &send_bytes, &last)); 130 EXPECT_BIT_EQ(buffer_[0], 6, 0); // Check reserved bit. 136 EXPECT_BIT_X_EQ(buffer_[0], 1); 142 EXPECT_BIT_X_EQ(buffer_[0], 0); 145 EXPECT_BIT_N_EQ(buffer_[0], hdr_info_->nonReference ? 1 : 0); 146 EXPECT_BIT_S_EQ(buffer_[0], frag_start ? 1 : 0); 152 EXPECT_EQ(buffer_[0] & 0x0F, buffer_[payload_start_]) [all...] |
/system/core/libmemunreachable/ |
LineBuffer.cpp | 29 : fd_(fd), buffer_(buffer), buffer_len_(buffer_len) {} 34 char* newline = reinterpret_cast<char*>(memchr(buffer_ + start_, '\n', bytes_)); 37 *line = buffer_ + start_; 38 start_ = newline - buffer_ + 1; 46 memmove(buffer_, buffer_ + start_, bytes_); 49 ssize_t bytes = TEMP_FAILURE_RETRY(read(fd_, buffer_ + bytes_, buffer_len_ - bytes_ - 1)); 53 buffer_[bytes_] = '\0'; 54 *line = buffer_ + start_;
|
/system/extras/memory_replay/ |
LineBuffer.cpp | 23 LineBuffer::LineBuffer(int fd, char* buffer, size_t buffer_len) : fd_(fd), buffer_(buffer), buffer_len_(buffer_len) { 29 char* newline = reinterpret_cast<char*>(memchr(buffer_ + start_, '\n', bytes_)); 32 *line = buffer_ + start_; 33 start_ = newline - buffer_ + 1; 41 memmove(buffer_, buffer_ + start_, bytes_); 44 ssize_t bytes = TEMP_FAILURE_RETRY(read(fd_, buffer_ + bytes_, buffer_len_ - bytes_ - 1)); 48 buffer_[bytes_] = '\0'; 49 *line = buffer_ + start_;
|
/external/perf_data_converter/src/quipper/ |
buffer_reader.cc | 14 memcpy(dest, buffer_ + offset_, size); 22 size_t actual_length = strnlen(buffer_ + offset_, size); 23 *str = string(buffer_ + offset_, actual_length);
|
/system/core/adb/ |
shell_service_protocol.cpp | 26 buffer_[0] = kIdInvalid; 35 if (!ReadFdExactly(fd_, buffer_, kHeaderSize)) { 40 memcpy(&packet_length, &buffer_[1], sizeof(packet_length)); 57 buffer_[0] = id; 59 memcpy(&buffer_[1], &typed_length, sizeof(typed_length)); 61 return WriteFdExactly(fd_, buffer_, kHeaderSize + length);
|
/external/brotli/c/enc/ |
ringbuffer.h | 28 buffer_[i] == buffer_[i + (1 << window_bits)], if i < (1 << tail_bits), 30 buffer_[-1] == buffer_[(1 << window_bits) - 1] and 31 buffer_[-2] == buffer_[(1 << window_bits) - 2]. */ 46 uint8_t *buffer_; member in struct:RingBuffer 53 rb->buffer_ = 0; 86 rb->buffer_ = rb->data_ + 2; 87 rb->buffer_[-2] = rb->buffer_[-1] = 0 [all...] |
/external/webrtc/webrtc/test/gl/ |
gl_renderer.cc | 21 : is_init_(false), buffer_(NULL), width_(0), height_(0) {} 37 delete[] buffer_; 38 buffer_ = NULL; 61 delete[] buffer_; 62 buffer_ = new uint8_t[buffer_size_]; 63 assert(buffer_ != NULL); 64 memset(buffer_, 0, buffer_size_); 69 GL_UNSIGNED_INT_8_8_8_8, static_cast<GLvoid*>(buffer_)); 81 webrtc::ConvertFromI420(frame, kBGRA, 0, buffer_); 86 GL_UNSIGNED_INT_8_8_8_8, buffer_); [all...] |
/frameworks/native/libs/vr/libdisplay/ |
shared_buffer_helpers.cpp | 20 buffer_(owned_buffer_.get()), 26 : buffer_(buffer), usage_mode_(mode) { 32 buffer_->Unlock(); 38 if (buffer_ == nullptr) { 54 buffer_ = owned_buffer_.get(); 64 if (buffer_) { 65 auto usage = buffer_->usage() & ~GRALLOC_USAGE_SW_READ_MASK & 84 int width = static_cast<int>(buffer_->width()); 86 const auto ret = buffer_->Lock(usage, 0, 0, width, height, &address_); 90 buffer_->Unlock() [all...] |
/frameworks/native/libs/vr/libdvrcommon/include/private/dvr/ |
ring_buffer.h | 46 bool IsFull() const { return size_ == buffer_.size(); } 50 size_t GetCapacity() const { return buffer_.size(); } 52 T& Get(size_t i) { return buffer_[(start_ + i) % buffer_.size()]; } 55 return buffer_[(start_ + i) % buffer_.size()]; 76 start_ = (start_ + 1) % buffer_.size(); 85 buffer_.clear(); 86 buffer_.resize(capacity); 92 std::vector<T> buffer_; member in class:android::dvr::RingBuffer [all...] |
/art/compiler/utils/x86_64/ |
assembler_x86_64.cc | 68 AssemblerBuffer::EnsureCapacity ensured(&buffer_); 76 AssemblerBuffer::EnsureCapacity ensured(&buffer_); 84 AssemblerBuffer::EnsureCapacity ensured(&buffer_); 92 AssemblerBuffer::EnsureCapacity ensured(&buffer_); 99 AssemblerBuffer::EnsureCapacity ensured(&buffer_); 107 AssemblerBuffer::EnsureCapacity ensured(&buffer_); 120 AssemblerBuffer::EnsureCapacity ensured(&buffer_); 127 AssemblerBuffer::EnsureCapacity ensured(&buffer_); 135 AssemblerBuffer::EnsureCapacity ensured(&buffer_); 152 AssemblerBuffer::EnsureCapacity ensured(&buffer_); [all...] |
/external/vixl/src/ |
code-buffer-vixl.cc | 44 : buffer_(NULL), 53 buffer_ = reinterpret_cast<byte*>(malloc(capacity_)); 55 buffer_ = reinterpret_cast<byte*>(mmap(NULL, 64 VIXL_CHECK(buffer_ != NULL); 67 VIXL_ASSERT(IsWordAligned(buffer_)); 69 cursor_ = buffer_; 74 : buffer_(reinterpret_cast<byte*>(buffer)), 79 VIXL_ASSERT(buffer_ != NULL); 87 free(buffer_); 89 munmap(buffer_, capacity_) [all...] |