8inline hid_t h5s_create_simple(
int rank,
const hsize_t dims[],
const hsize_t maxdims[]) {
9 hid_t space_id = H5Screate_simple(rank, dims, maxdims);
10 if (space_id == H5I_INVALID_HID) {
11 throw DataSpaceException(
"Unable to create simple dataspace");
17inline hid_t h5s_create(H5S_class_t type) {
18 hid_t space_id = H5Screate(type);
20 if (space_id == H5I_INVALID_HID) {
21 throw DataSpaceException(
"Unable to create dataspace");
27inline hid_t h5s_copy(hid_t space_id) {
28 hid_t copy_id = H5Scopy(space_id);
31 throw DataSpaceException(
"Unable to copy dataspace");
37inline herr_t h5s_select_none(hid_t spaceid) {
38 herr_t err = H5Sselect_none(spaceid);
45inline herr_t h5s_select_hyperslab(hid_t space_id,
47 const hsize_t start[],
48 const hsize_t stride[],
49 const hsize_t count[],
50 const hsize_t block[]) {
51 herr_t err = H5Sselect_hyperslab(space_id, op, start, stride, count, block);
58inline hssize_t h5s_get_select_npoints(hid_t spaceid) {
59 hssize_t n_points = H5Sget_select_npoints(spaceid);
62 "Unable to get number of points in selection");
67inline herr_t h5s_select_elements(hid_t space_id,
70 const hsize_t* coord) {
71 herr_t err = H5Sselect_elements(space_id, op, num_elem, coord);
78inline int h5s_get_simple_extent_ndims(hid_t space_id) {
79 int ndim = H5Sget_simple_extent_ndims(space_id);
82 "Unable to get number of dimensions of dataspace");
87inline herr_t h5s_get_simple_extent_dims(hid_t space_id, hsize_t dims[], hsize_t maxdims[]) {
88 herr_t err = H5Sget_simple_extent_dims(space_id, dims, maxdims);
95inline hssize_t h5s_get_simple_extent_npoints(hid_t space_id) {
96 hssize_t nelements = H5Sget_simple_extent_npoints(space_id);
99 "Unable to get number of elements in dataspace");
105inline H5S_class_t h5s_get_simple_extent_type(hid_t space_id) {
106 H5S_class_t cls = H5Sget_simple_extent_type(space_id);
107 if (cls == H5S_NO_CLASS) {
114inline H5S_sel_type h5s_get_select_type(hid_t space_id) {
115 H5S_sel_type type = H5Sget_select_type(space_id);
123#if H5_VERSION_GE(1, 10, 6)
124inline hid_t h5s_combine_select(hid_t space1_id, H5S_seloper_t op, hid_t space2_id) {
125 auto space_id = H5Scombine_select(space1_id, op, space2_id);
126 if (space_id == H5I_INVALID_HID) {
Definition H5_definitions.hpp:22
static void ToException(const std::string &prefix_msg)
Definition H5Exception_misc.hpp:43