1#ifndef RITSUKO_HDF5_GET_DIMENSIONS_HPP
2#define RITSUKO_HDF5_GET_DIMENSIONS_HPP
25inline std::vector<hsize_t>
get_dimensions(
const H5::DataSpace& space,
bool allow_scalar) {
26 int ndims = space.getSimpleExtentNdims();
27 std::vector<hsize_t> dimensions(ndims);
29 space.getSimpleExtentDims(dimensions.data());
30 }
else if (!allow_scalar) {
31 throw std::runtime_error(
"expected an N-dimensional dataset, got a scalar instead");
44inline std::vector<hsize_t>
get_dimensions(
const H5::DataSet& handle,
bool allow_scalar) {
56inline std::vector<hsize_t>
get_dimensions(
const H5::Attribute& handle,
bool allow_scalar) {
std::vector< hsize_t > get_dimensions(const H5::DataSpace &space, bool allow_scalar)
Definition get_dimensions.hpp:25
Assorted helper functions for parsing and validation.
Definition choose_missing_placeholder.hpp:15