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

Function write_dataset

src/serializers/HdfSerializer.cpp:667–674  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

665
666 template <typename T>
667 void write_dataset(const H5::Group& group, const std::string& name, const std::vector<T>& ts, size_t stride) {
668 hsize_t d[2]{ ts.size() / stride, stride };
669 H5::DataSpace dataspace(stride == 1 ? 1 : 2, d);
670 auto dt = h5_datatype_for_cpp<T>();
671
672 auto ds = group.createDataSet(name, dt, dataspace);
673 ds.write(ts.data(), dt);
674 }
675
676}
677

Callers 1

writeMethod · 0.85

Calls 3

dataMethod · 0.80
sizeMethod · 0.45
writeMethod · 0.45

Tested by

no test coverage detected