| 153 | template<typename T> |
| 154 | struct 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; |
nothing calls this directly
no test coverage detected