| 37 | |
| 38 | template <typename F> |
| 39 | inline auto read_vector(std::istream& s, F f) |
| 40 | { |
| 41 | nd::dtype t; |
| 42 | read_pod(s, t); |
| 43 | std::size_t size = 0; |
| 44 | read_pod(s, size); |
| 45 | return nd::switch_dtype(t, [&s, size, f]<typename T>() mutable { |
| 46 | icm::vector<T> r; |
| 47 | r.resize(size); |
| 48 | s.read(reinterpret_cast<char*>(r.data()), size * sizeof(T)); |
| 49 | return f(std::move(r)); |
| 50 | }); |
| 51 | } |
| 52 | |
| 53 | template <typename T> |
| 54 | inline auto read_vector(std::istream& s, std::vector<T>& v) |
nothing calls this directly
no test coverage detected