MCPcopy Create free account
hub / github.com/IfcOpenShell/IfcOpenShell / read_dataset

Function read_dataset

src/serializers/HdfSerializer.cpp:224–234  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

222namespace {
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
237void HdfSerializer::read_surface_style(const surface_style_serialization& s,

Callers

nothing calls this directly

Calls 5

accumulateFunction · 0.85
dataMethod · 0.80
beginMethod · 0.45
endMethod · 0.45
readMethod · 0.45

Tested by

no test coverage detected