15 bool requireSameFormat,
16 std::size_t bufferSize,
18 m_mergeAxis(mergeAxis),
20 m_requireSameFormat(requireSameFormat),
21 m_bufferSize(bufferSize),
22 m_measureBufferInRows(bufferInRows) {}
31 bool isEmpty =
target.getNumObjs() == 0;
34 for (hsize_t ii = 0; ii < source.getNumObjs(); ++ii) {
35 H5G_obj_t childType = source.getObjTypeByIdx(ii);
36 std::string childName = source.getObjnameByIdx(ii);
38 hsize_t targetIdx = 0;
39 for (; targetIdx <
target.getNumObjs(); ++targetIdx)
40 if (
target.getObjnameByIdx(targetIdx) == childName)
45 if (
target.getObjTypeByIdx(targetIdx) != childType)
46 throw std::invalid_argument(
47 "Both target and source contain " + childName +
48 " but they have different types!");
51 throw std::invalid_argument(
52 "Target and source have different formats!");
57 H5::Group sg = source.openGroup(childName);
59 target.openGroup(childName) :
65 std::cerr <<
"Encountered an error merging child " << childName << std::endl;
72 H5::DataSet
sd = source.openDataSet(childName);
73 if (
sd.getSpace().getSimpleExtentNdims() == 0) {
74 std::cerr <<
"WARNING: skipping scalar '"
75 << childName <<
"'" << std::endl;
78 H5::DataSet td =
found ?
79 target.openDataSet(childName) :
85 std::cerr <<
"Encountered an error merging child " << childName << std::endl;
100 const H5::DataSet& source)
107 std::overflow_error(
"Requested buffer would overflow the register!");
114 H5::H5Location& targetLocation,
115 const H5::DataSet& source)