25 return H5Dget_storage_size(
_hid);
34 if ((space.
_hid = H5Dget_space(
_hid)) < 0) {
35 HDF5ErrMapper::ToException<DataSetException>(
"Unable to get DataSpace out of DataSet");
45 uint64_t addr = H5Dget_offset(
_hid);
46 if (addr == HADDR_UNDEF) {
47 HDF5ErrMapper::ToException<DataSetException>(
"Cannot get offset of DataSet.");
54 if (dims.size() != numDimensions) {
55 HDF5ErrMapper::ToException<DataSetException>(
"Invalid dataspace dimensions, got " +
56 std::to_string(dims.size()) +
" expected " +
57 std::to_string(numDimensions));
60 std::vector<hsize_t> real_dims(dims.begin(), dims.end());
62 if (H5Dset_extent(
getId(), real_dims.data()) < 0) {
63 HDF5ErrMapper::ToException<DataSetException>(
"Could not resize dataset.");
DataSpace getMemSpace() const
getMemSpace
Definition H5DataSet_misc.hpp:40
void resize(const std::vector< size_t > &dims)
Change the size of the dataset.
Definition H5DataSet_misc.hpp:52
DataType getDataType() const
getDataType
Definition H5DataSet_misc.hpp:28
uint64_t getOffset() const
getOffset
Definition H5DataSet_misc.hpp:44
uint64_t getStorageSize() const
getStorageSize
Definition H5DataSet_misc.hpp:24
DataSpace getSpace() const
getSpace
Definition H5DataSet_misc.hpp:32
Class representing the space (dimensions) of a dataset.
Definition H5DataSpace.hpp:25
std::vector< size_t > getDimensions() const
getDimensions
Definition H5Dataspace_misc.hpp:102
HDF5 Data Type.
Definition H5DataType.hpp:54
hid_t getId() const noexcept
getId
Definition H5Object_misc.hpp:65
hid_t _hid
Definition H5Object.hpp:105
Definition H5_definitions.hpp:15