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

Method Write

include/dmlc/serializer.h:129–135  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

127template<typename T>
128struct NativePODVectorHandler {
129 inline static void Write(Stream *strm, const std::vector<T> &vec) {
130 uint64_t sz = static_cast<uint64_t>(vec.size());
131 strm->Write<uint64_t>(sz);
132 if (sz != 0) {
133 strm->Write(&vec[0], sizeof(T) * vec.size());
134 }
135 }
136 inline static bool Read(Stream *strm, std::vector<T> *out_vec) {
137 uint64_t sz;
138 if (!strm->Read<uint64_t>(&sz)) return false;

Callers

nothing calls this directly

Calls 2

sizeMethod · 0.45
WriteMethod · 0.45

Tested by

no test coverage detected