chihaya
Validating delayed array operations in HDF5
Loading...
Searching...
No Matches
unary_special_check.hpp
Go to the documentation of this file.
1#ifndef CHIHAYA_UNARY_SPECIAL_CHECK_HPP
2#define CHIHAYA_UNARY_SPECIAL_CHECK_HPP
3
4#include "H5Cpp.h"
5#include "ritsuko/ritsuko.hpp"
6
7#include <stdexcept>
8
9#include "utils_public.hpp"
10#include "utils_misc.hpp"
11#include "utils_nary.hpp"
12
18namespace chihaya {
19
28inline ArrayDetails validate_unary_special_check(const H5::Group& group, const ritsuko::Version& version, const Options& options) {
29 auto seed_details = fetch_numeric_seed(group, "seed", version, options);
30
31 // Checking the method.
32 auto method = load_scalar_string_dataset(group, "method");
33 if (!options.details_only) {
34 if (!is_valid_special_check_operation(method)) {
35 throw std::runtime_error("unrecognized 'method' (" + method + ")");
36 }
37 }
38
39 seed_details.type = BOOLEAN;
40 return seed_details;
41}
42
43}
44
45#endif
Namespace for all chihaya functions.
Definition binary_arithmetic.hpp:20
ArrayDetails validate_unary_special_check(const H5::Group &group, const ritsuko::Version &version, const Options &options)
Definition unary_special_check.hpp:28
Details about an array.
Definition utils_public.hpp:37
Validation options.
Definition utils_public.hpp:67
bool details_only
Definition utils_public.hpp:72
Various public utilities.