20struct is_vector: std::false_type {};
22struct is_vector<std::vector<T>>: std::true_type {};
24using HighFive::details::inspector;
27struct io_impl<T, typename std::enable_if<is_vector<T>::value>::type> {
28 inline static DataSet
dump(File& file,
29 const std::string& path,
31 const DumpOptions& options) {
32 using value_type =
typename inspector<T>::base_type;
33 auto dims = inspector<T>::getDimensions(data);
34 DataSet dataset = initDataset<value_type>(file,
36 std::vector<size_t>(dims.begin(), dims.end()),
39 if (options.flush()) {
45 inline static T
load(
const File& file,
const std::string& path) {
46 DataSet dataset = file.getDataSet(path);
53 const std::string& path,
54 const std::string& key,
56 const DumpOptions& options) {
57 using value_type =
typename inspector<T>::base_type;
58 auto dims = inspector<T>::getDimensions(data);
59 std::vector<size_t> shape(dims.begin(), dims.end());
60 Attribute attribute = initAttribute<value_type>(file, path, key, shape, options);
61 attribute.write(data);
62 if (options.flush()) {
69 const std::string& path,
70 const std::string& key) {
71 DataSet dataset = file.getDataSet(path);
72 Attribute attribute = dataset.getAttribute(key);
Definition H5Easy_Eigen.hpp:17
T loadAttribute(const File &file, const std::string &path, const std::string &key)
Definition H5Easy_public.hpp:166
DataSet dump(File &file, const std::string &path, const T &data, const DumpOptions &options)
Definition H5Easy_public.hpp:91
T load(const File &file, const std::string &path, const std::vector< size_t > &idx)
Definition H5Easy_public.hpp:138
Attribute dumpAttribute(File &file, const std::string &path, const std::string &key, const T &data, DumpMode mode)
Definition H5Easy_public.hpp:148