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

Method Write

include/dmlc/serializer.h:155–159  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

153template<typename T>
154struct ComposeVectorHandler {
155 inline static void Write(Stream *strm, const std::vector<T> &vec) {
156 uint64_t sz = static_cast<uint64_t>(vec.size());
157 strm->Write<uint64_t>(sz);
158 strm->WriteArray(dmlc::BeginPtr(vec), vec.size());
159 }
160 inline static bool Read(Stream *strm, std::vector<T> *out_vec) {
161 uint64_t sz;
162 if (!strm->Read<uint64_t>(&sz)) return false;

Callers

nothing calls this directly

Calls 3

BeginPtrFunction · 0.85
WriteArrayMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected