chihaya
Validating delayed array operations in HDF5
Loading...
Searching...
No Matches
subset.hpp
Go to the documentation of this file.
1#ifndef CHIHAYA_SUBSET_HPP
2#define CHIHAYA_SUBSET_HPP
3
4#include "H5Cpp.h"
5#include "ritsuko/ritsuko.hpp"
6#include "ritsuko/hdf5/hdf5.hpp"
7
8#include <stdexcept>
9#include <vector>
10#include <cstdint>
11
12#include "utils_public.hpp"
13#include "utils_list.hpp"
14#include "utils_misc.hpp"
15#include "utils_subset.hpp"
16
22namespace chihaya {
23
28namespace subset {
29
38inline ArrayDetails validate(const H5::Group& handle, const ritsuko::Version& version, Options& options) {
39 auto seed_details = internal_misc::load_seed_details(handle, "seed", version, options);
40 auto& seed_dims = seed_details.dimensions;
41
42 auto ihandle = ritsuko::hdf5::open_group(handle, "index");
43 auto collected = internal_subset::validate_index_list(ihandle, seed_dims, version);
44 for (auto p : collected) {
45 seed_dims[p.first] = p.second;
46 }
47
48 return seed_details;
49}
50
51}
52
53}
54
55#endif
ArrayDetails validate(const H5::Group &handle, const ritsuko::Version &version, Options &options)
Definition: subset.hpp:38
Namespace for all chihaya functions.
Definition: binary_arithmetic.hpp:22
Details about an array.
Definition: utils_public.hpp:36
Validation options.
Definition: utils_public.hpp:66
Various public utilities.