12#include "../H5Exception.hpp"
13#include "../H5DataSpace.hpp"
18inline void assert_compatible_spaces(
const DataSpace& old,
const std::vector<size_t>& dims) {
22 if (n_elements_old != n_elements_new) {
23 throw Exception(
"Invalid parameter `new_dims` number of elements differ: " +
24 std::to_string(n_elements_old) +
" (old) vs. " +
25 std::to_string(n_elements_new) +
" (new)");
Class representing the space (dimensions) of a DataSet.
Definition H5DataSpace.hpp:39
size_t getElementCount() const
Return the number of elements in this DataSpace.
Definition H5Dataspace_misc.hpp:112
Basic HighFive Exception class.
Definition H5Exception.hpp:23
Definition assert_compatible_spaces.hpp:15
size_t compute_total_size(const std::vector< size_t > &dims)
Definition compute_total_size.hpp:10