| 222 | namespace { |
| 223 | template <typename T> |
| 224 | std::vector<T> read_dataset(const H5::Group& group, const std::string& name) { |
| 225 | auto ds = group.openDataSet(name); |
| 226 | auto space = ds.getSpace(); |
| 227 | int rank = space.getSimpleExtentNdims(); |
| 228 | std::vector<hsize_t> dims(rank); |
| 229 | space.getSimpleExtentDims(dims.data(), NULL); |
| 230 | const hsize_t total = std::accumulate(dims.begin(), dims.end(), 1U, std::multiplies<hsize_t>()); |
| 231 | std::vector<T> result(total); |
| 232 | ds.read(result.data(), h5_datatype_for_cpp<T>()); |
| 233 | return result; |
| 234 | } |
| 235 | } |
| 236 | |
| 237 | void HdfSerializer::read_surface_style(const surface_style_serialization& s, |
nothing calls this directly
no test coverage detected