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

Method Read

include/dmlc/memory_io.h:76–82  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

74 curr_ptr_ = 0;
75 }
76 virtual size_t Read(void *ptr, size_t size) {
77 CHECK(curr_ptr_ <= p_buffer_->length());
78 size_t nread = std::min(p_buffer_->length() - curr_ptr_, size);
79 if (nread != 0) std::memcpy(ptr, &(*p_buffer_)[0] + curr_ptr_, nread);
80 curr_ptr_ += nread;
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()) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected