MCPcopy Create free account
hub / github.com/dmlc/dmlc-core / Write

Method Write

include/dmlc/memory_io.h:83–90  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

81 return nread;
82 }
83 virtual void Write(const void *ptr, size_t size) {
84 if (size == 0) return;
85 if (curr_ptr_ + size > p_buffer_->length()) {
86 p_buffer_->resize(curr_ptr_+size);
87 }
88 std::memcpy(&(*p_buffer_)[0] + curr_ptr_, ptr, size);
89 curr_ptr_ += size;
90 }
91 virtual void Seek(size_t pos) {
92 curr_ptr_ = static_cast<size_t>(pos);
93 }

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected