chihaya
Validating delayed array operations in HDF5
Loading...
Searching...
No Matches
dimnames.hpp
Go to the documentation of this file.
1#ifndef CHIHAYA_DIMNAMES_HPP
2#define CHIHAYA_DIMNAMES_HPP
3
4#include "H5Cpp.h"
5#include "ritsuko/ritsuko.hpp"
6#include "ritsuko/hdf5/hdf5.hpp"
7#include <stdexcept>
8#include "utils_list.hpp"
9#include "utils_public.hpp"
10
16namespace chihaya {
17
18namespace dimnames {
19
28inline ArrayDetails validate(const H5::Group& handle, const ritsuko::Version& version, Options& options) {
29 ArrayDetails seed_details = internal_misc::load_seed_details(handle, "seed", version, options);
30 if (!handle.exists("dimnames")) {
31 throw std::runtime_error("expected a 'dimnames' group");
32 }
33
34 if (!options.details_only) {
35 internal_dimnames::validate(handle, seed_details.dimensions, version);
36 }
37
38 return seed_details;
39}
40
41}
42
43}
44
45#endif
Namespace for all chihaya functions.
Definition: binary_arithmetic.hpp:22
Details about an array.
Definition: utils_public.hpp:36
std::vector< size_t > dimensions
Definition: utils_public.hpp:56
Validation options.
Definition: utils_public.hpp:66
bool details_only
Definition: utils_public.hpp:71
Various public utilities.