| 66 | |
| 67 | template <typename T> |
| 68 | inline auto read_small_vector(std::istream& s, icm::small_vector<T>& v) |
| 69 | { |
| 70 | nd::dtype t; |
| 71 | read_pod(s, t); |
| 72 | if (t != nd::dtype_enum_v<T>) { |
| 73 | throw nd::invalid_operation("Dtype mismatch"); |
| 74 | } |
| 75 | std::size_t size = 0; |
| 76 | read_pod(s, size); |
| 77 | v.resize(size); |
| 78 | s.read(reinterpret_cast<char*>(v.data()), size * sizeof(T)); |
| 79 | } |
| 80 | |
| 81 | inline auto read_shape(std::istream& s, icm::shape& v) |
| 82 | { |
nothing calls this directly
no test coverage detected