Skip to content
Snippets Groups Projects
Commit fed0ee30 authored by lh1887's avatar lh1887
Browse files

Allow std::vector as target for HDF5 reader

parent f8f4356a
Branches
No related tags found
1 merge request!102Allow std::vector as target for HDF5 reader
Pipeline #40748 passed
...@@ -54,6 +54,14 @@ void fromBuffer(std::vector<ctype> const &buffer, std::array<T, 1> dimensions, ...@@ -54,6 +54,14 @@ void fromBuffer(std::vector<ctype> const &buffer, std::array<T, 1> dimensions,
localVector[0] = *(it++); localVector[0] = *(it++);
} }
template <typename ctype, typename T>
void fromBuffer(std::vector<ctype> const &buffer, std::array<T, 1> dimensions,
std::vector<ctype> &data) {
assert(buffer.size() == dimensions[0]);
data = buffer;
}
template <typename ctype, typename T> template <typename ctype, typename T>
void fromBuffer(std::vector<ctype> const &buffer, std::array<T, 0> dimensions, void fromBuffer(std::vector<ctype> const &buffer, std::array<T, 0> dimensions,
ctype &data) { ctype &data) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment