v1.0.0-rc.135 (#44)
Build Packages / build:rpm (ubuntu2204_nocuda) (push) Successful in 9m55s
Build Packages / build:rpm (rocky8_nocuda) (push) Successful in 10m28s
Build Packages / build:rpm (ubuntu2404_nocuda) (push) Successful in 8m56s
Build Packages / build:rpm (rocky9_nocuda) (push) Successful in 11m47s
Build Packages / build:rpm (rocky8_sls9) (push) Successful in 13m7s
Build Packages / build:rpm (ubuntu2204) (push) Successful in 12m31s
Build Packages / build:rpm (rocky8) (push) Successful in 12m59s
Build Packages / build:rpm (rocky9) (push) Successful in 14m5s
Build Packages / build:rpm (rocky9_sls9) (push) Successful in 15m30s
Build Packages / Generate python client (push) Successful in 1m18s
Build Packages / Build documentation (push) Successful in 1m3s
Build Packages / Create release (push) Has been skipped
Build Packages / build:rpm (ubuntu2404) (push) Successful in 10m8s
Build Packages / XDS test (durin plugin) (push) Successful in 9m16s
Build Packages / XDS test (neggia plugin) (push) Successful in 7m59s
Build Packages / XDS test (JFJoch plugin) (push) Successful in 9m12s
Build Packages / DIALS test (push) Successful in 11m44s
Build Packages / Unit tests (push) Successful in 1h23m8s
Build Packages / build:rpm (ubuntu2204_nocuda) (push) Successful in 9m55s
Build Packages / build:rpm (rocky8_nocuda) (push) Successful in 10m28s
Build Packages / build:rpm (ubuntu2404_nocuda) (push) Successful in 8m56s
Build Packages / build:rpm (rocky9_nocuda) (push) Successful in 11m47s
Build Packages / build:rpm (rocky8_sls9) (push) Successful in 13m7s
Build Packages / build:rpm (ubuntu2204) (push) Successful in 12m31s
Build Packages / build:rpm (rocky8) (push) Successful in 12m59s
Build Packages / build:rpm (rocky9) (push) Successful in 14m5s
Build Packages / build:rpm (rocky9_sls9) (push) Successful in 15m30s
Build Packages / Generate python client (push) Successful in 1m18s
Build Packages / Build documentation (push) Successful in 1m3s
Build Packages / Create release (push) Has been skipped
Build Packages / build:rpm (ubuntu2404) (push) Successful in 10m8s
Build Packages / XDS test (durin plugin) (push) Successful in 9m16s
Build Packages / XDS test (neggia plugin) (push) Successful in 7m59s
Build Packages / XDS test (JFJoch plugin) (push) Successful in 9m12s
Build Packages / DIALS test (push) Successful in 11m44s
Build Packages / Unit tests (push) Successful in 1h23m8s
This is an UNSTABLE release. The release has significant modifications and bug fixes, if things go wrong, it is better to revert to 1.0.0-rc.132. * Multiple small bug fixes scattered across the whole code base. (detected with GPT-5.4) * jfjoch_viewer: Improve image render performance Reviewed-on: #44 Co-authored-by: Filip Leonarski <filip.leonarski@psi.ch> Co-committed-by: Filip Leonarski <filip.leonarski@psi.ch>
This commit was merged in pull request #44.
This commit is contained in:
+18
-12
@@ -19,11 +19,11 @@ HDF5Id::HDF5Id(HDF5Id &&other) noexcept {
|
||||
}
|
||||
|
||||
HDF5Id::HDF5Id(const HDF5Id &other) {
|
||||
id = other.id;
|
||||
if (H5Iis_valid(id)) {
|
||||
if (H5Iinc_ref(id) < 0)
|
||||
throw JFJochException(JFJochExceptionCategory::HDF5, "Cannot increment HDF5 Counter");
|
||||
}
|
||||
id = other.id;
|
||||
}
|
||||
|
||||
HDF5DataSpace::HDF5DataSpace(const std::vector<hsize_t> &dims, const std::vector<hsize_t> &max_dims) : HDF5Id() {
|
||||
@@ -602,7 +602,7 @@ HDF5Object& HDF5Object::Transformation(const std::string& units, const std::stri
|
||||
if (!units.empty()) Attr("units", units);
|
||||
if (!depends_on.empty()) Attr("depends_on", depends_on);
|
||||
if (!equipment.empty()) Attr("equipment", equipment);
|
||||
if (!equipment_component.empty()) Attr("equipment_component", equipment);
|
||||
if (!equipment_component.empty()) Attr("equipment_component", equipment_component);
|
||||
if (!transformation_type.empty()) Attr("transformation_type", transformation_type);
|
||||
Attr("vector", vector);
|
||||
return *this;
|
||||
@@ -665,9 +665,9 @@ std::unique_ptr<HDF5DataSet> HDF5Object::SaveVector(const std::string &name, con
|
||||
HDF5DataSpace data_space({val.size()});
|
||||
auto dataset = std::make_unique<HDF5DataSet>(*this, name, data_type, data_space, dcpl);
|
||||
|
||||
char buffer[(len+1) * val.size()];
|
||||
for (int i = 0; i < val.size(); i++) strncpy(buffer + i * (len+1), val[i].c_str(), len+1);
|
||||
dataset->Write(data_type, buffer);
|
||||
std::vector<char> buffer((len + 1) * val.size(), '\0');
|
||||
for (int i = 0; i < val.size(); i++) strncpy(buffer.data() + i * (len+1), val[i].c_str(), len+1);
|
||||
dataset->Write(data_type, buffer.data());
|
||||
return dataset;
|
||||
}
|
||||
|
||||
@@ -779,18 +779,24 @@ std::string HDF5DataSet::ReadString() const {
|
||||
HDF5DataSpace file_space(*this);
|
||||
if (file_space.GetNumOfDimensions() != 0)
|
||||
throw JFJochException(JFJochExceptionCategory::HDF5, "Dataset tries to read string (scalar) from vector dataset");
|
||||
HDF5DataType file_data_type(*this);
|
||||
|
||||
if (file_data_type.GetElemSize() <= 0)
|
||||
HDF5DataType file_data_type(*this);
|
||||
const size_t size = file_data_type.GetElemSize();
|
||||
|
||||
if (size == 0)
|
||||
return "";
|
||||
|
||||
char tmp[file_data_type.GetElemSize()+1];
|
||||
tmp[file_data_type.GetElemSize()] = 0;
|
||||
std::string buffer(size, '\0');
|
||||
|
||||
if (H5Dread(id, file_data_type.GetID(), H5S_ALL, H5S_ALL, H5P_DEFAULT, tmp) < 0)
|
||||
throw JFJochException(JFJochExceptionCategory::HDF5, dataset_name + ": read unsuccessful");
|
||||
if (H5Dread(id, file_data_type.GetID(), H5S_ALL, H5S_ALL, H5P_DEFAULT, buffer.data()) < 0)
|
||||
throw JFJochException(JFJochExceptionCategory::HDF5,
|
||||
dataset_name + ": read unsuccessful");
|
||||
|
||||
return {tmp};
|
||||
const size_t end = buffer.find('\0');
|
||||
if (end != std::string::npos)
|
||||
buffer.resize(end);
|
||||
|
||||
return buffer;
|
||||
}
|
||||
|
||||
HDF5DataSet::~HDF5DataSet() {
|
||||
|
||||
Reference in New Issue
Block a user