h5cpp 0.7
A modern C++ wrapper for the HDF5 C library
Loading...
Searching...
No Matches
hdf5::node::ChunkedDataset Class Reference

dataset with chunked layout More...

#include <chunked_dataset.hpp>

Inheritance diagram for hdf5::node::ChunkedDataset:
Collaboration diagram for hdf5::node::ChunkedDataset:

Public Member Functions

 ChunkedDataset ()=default
 default constructor
 
 ChunkedDataset (const ChunkedDataset &)=default
 copy constructor
 
 ChunkedDataset (const Group &base, const Path &path, const datatype::Datatype &type, const dataspace::Simple &space, const Dimensions &chunk_shape, const property::LinkCreationList &lcpl=property::LinkCreationList(), const property::DatasetCreationList &dcpl=property::DatasetCreationList(), const property::DatasetAccessList &dapl=property::DatasetAccessList())
 constructor
 
- Public Member Functions inherited from hdf5::node::Dataset
 Dataset ()=default
 default constructor
 
 Dataset (const Node &node)
 construct
 
 Dataset (const Group &base, const Path &path, const datatype::Datatype &type, const dataspace::Dataspace &space=dataspace::Scalar(), const property::LinkCreationList &lcpl=property::LinkCreationList(), const property::DatasetCreationList &dcpl=property::DatasetCreationList(), const property::DatasetAccessList &dapl=property::DatasetAccessList())
 constructor
 
dataspace::Dataspace dataspace () const
 get dataspace of dataset
 
property::DatasetCreationList creation_list () const
 get the dataset creation property list used for creation
 
property::DatasetAccessList access_list () const
 get the dataset access property list for the instance
 
datatype::Datatype datatype () const
 get datatype of dataset
 
void extent (const Dimensions &dims) const
 set extent of the dataset
 
void extent (size_t dim, ssize_t delta_elements) const
 
void resize (const Dimensions &dims) const
 resize the dataset
 
void refresh () const
 refresh the dataset (since hdf5 1.10.0)
 
template<typename T >
void write (const T &data, const datatype::Datatype &mem_type, const dataspace::Dataspace &mem_space, const dataspace::Dataspace &file_space, const property::DatasetTransferList &dtpl=property::DatasetTransferList::get()) const
 write data to the dataset
 
template<typename T >
void write (const T &data, const datatype::Datatype &mem_type, const dataspace::Dataspace &mem_space, const property::DatasetTransferList &dtpl=property::DatasetTransferList::get()) const
 write data to the dataset
 
template<typename T >
void read (T &data, const datatype::Datatype &mem_type, const dataspace::Dataspace &mem_space, const dataspace::Dataspace &file_space, const property::DatasetTransferList &dtpl=property::DatasetTransferList::get()) const
 read data from the dataset
 
template<typename T >
void read (T &data, const datatype::Datatype &mem_type, const dataspace::Dataspace &mem_space, const property::DatasetTransferList &dtpl=property::DatasetTransferList::get()) const
 
template<typename T >
void read_reshape (T &data, const datatype::Datatype &mem_type, const dataspace::Dataspace &mem_space, const property::DatasetTransferList &dtpl=property::DatasetTransferList::get()) const
 
template<typename T >
void write (const T &data, const property::DatasetTransferList &dtpl=property::DatasetTransferList::get())
 write entire dataset
 
template<typename T >
void write (const T &data, const property::DatasetTransferList &dtpl=property::DatasetTransferList::get()) const
 
template<typename T >
void write_reshape (const T &data, const datatype::Datatype &mem_type, const dataspace::Dataspace &mem_space, const property::DatasetTransferList &dtpl=property::DatasetTransferList::get()) const
 write entire dataset
 
void write (const char *data, const property::DatasetTransferList &dtpl=property::DatasetTransferList::get())
 write entire dataset
 
void write (const char *data, const property::DatasetTransferList &dtpl=property::DatasetTransferList::get()) const
 
template<typename T >
void write_chunk (const T &data, std::vector< hsize_t > offset, std::uint32_t filter_mask=0, const property::DatasetTransferList &dtpl=property::DatasetTransferList::get())
 write dataset chunk
 
template<typename T >
void write_chunk (const T &data, std::vector< hsize_t > offset, std::uint32_t filter_mask=0, const property::DatasetTransferList &dtpl=property::DatasetTransferList::get()) const
 
template<typename T >
void write_chunk (const T &data, const datatype::Datatype &mem_type, const dataspace::Dataspace &mem_space, std::vector< hsize_t > &offset, std::uint32_t filter_mask=0, const property::DatasetTransferList &dtpl=property::DatasetTransferList::get()) const
 write dataset chunk
 
template<typename T >
std::uint32_t read_chunk (T &data, std::vector< hsize_t > offset, const property::DatasetTransferList &dtpl=property::DatasetTransferList::get()) const
 read dataset chunk (since hdf5 1.10.2)
 
template<typename T >
std::uint32_t read_chunk (T &data, const datatype::Datatype &mem_type, std::vector< hsize_t > &offset, const property::DatasetTransferList &dtpl=property::DatasetTransferList::get()) const
 read dataset chunk
 
hsize_t chunk_storage_size (std::vector< hsize_t > offset) const
 read dataset chunk
 
template<typename T >
void read (T &data, const property::DatasetTransferList &dtpl=property::DatasetTransferList::get())
 read entire dataset
 
template<typename T >
void read (T &data, const property::DatasetTransferList &dtpl=property::DatasetTransferList::get()) const
 
template<typename T >
void write (const T &data, const dataspace::Selection &selection, const property::DatasetTransferList &dtpl=property::DatasetTransferList::get())
 write data to a selection
 
template<typename T >
void write (const T &data, const dataspace::Selection &selection, const property::DatasetTransferList &dtpl=property::DatasetTransferList::get()) const
 
template<typename T >
void write_reshape (const T &data, const datatype::Datatype &mem_type, const dataspace::Dataspace &mem_space, const dataspace::Selection &selection, const property::DatasetTransferList &dtpl=property::DatasetTransferList::get()) const
 write data to a selection
 
template<typename T >
void read (T &data, const dataspace::Selection &selection, const property::DatasetTransferList &dtpl=property::DatasetTransferList::get())
 reading data from a selection
 
template<typename T >
void read (T &data, const dataspace::Selection &selection, const property::DatasetTransferList &dtpl=property::DatasetTransferList::get()) const
 
template<typename T >
void read_reshape (T &data, const datatype::Datatype &mem_type, const dataspace::Dataspace &mem_space, const dataspace::Selection &selection, const property::DatasetTransferList &dtpl=property::DatasetTransferList::get()) const
 reading data from a selection
 
template<typename T >
void read (T &data, const datatype::Datatype &memory_type, const dataspace::Dataspace &memory_space, const dataspace::Selection &file_selection, const property::DatasetTransferList &dtpl=property::DatasetTransferList::get()) const
 reading data from a dataset
 
filter::ExternalFilters filters () const
 get the dataset external filters for the instance
 
- Public Member Functions inherited from hdf5::node::Node
 Node (ObjectHandle &&handle, const Link &link)
 constructor
 
 Node ()
 default constructor
 
 Node (const Node &)
 copy constructor
 
Nodeoperator= (const Node &node)
 copy assignment
 
virtual ~Node ()
 destructor
 
NodeType type () const
 return the node type
 
ObjectId id () const
 get unique ID
 
 operator hid_t () const
 
bool is_valid () const
 true if an object is valid
 
void close ()
 close the node
 
const Linklink () const
 return link to object
 

Additional Inherited Members

- Public Attributes inherited from hdf5::node::Node
attribute::AttributeManager attributes
 access to the attribute manager
 

Detailed Description

This class provides an convenient interface to a chunked dataset. As a matter of fact the only thing added here is a convenient constructor where the chunk shape can be passed as an additional argument.

Constructor & Destructor Documentation

◆ ChunkedDataset() [1/3]

hdf5::node::ChunkedDataset::ChunkedDataset ( )
default

Required for STL compliance. We can use the compiler provided default implementation here.

◆ ChunkedDataset() [2/3]

hdf5::node::ChunkedDataset::ChunkedDataset ( const ChunkedDataset )
default

Required for STL compliance. We can use the compiler provided default implementation here.

◆ ChunkedDataset() [3/3]

hdf5::node::ChunkedDataset::ChunkedDataset ( const Group base,
const Path path,
const datatype::Datatype type,
const dataspace::Simple space,
const Dimensions chunk_shape,
const property::LinkCreationList lcpl = property::LinkCreationList(),
const property::DatasetCreationList dcpl = property::DatasetCreationList(),
const property::DatasetAccessList dapl = property::DatasetAccessList() 
)

As for all dataset constructors, references to the required property list can be passed as optional arguments. There are two things worth noting here

  • the dataspace for a chunked dataset must be a simple dataspace
  • independent of the configuration of an eventually user provided dataset creation property list, the layout of the dataset will be chunked with the provided chunk shape.

The user provided dataset creation property list will not be changed.

Exceptions
std::runtime_errorin case of a failure
Parameters
basethe base object for the dataset creation
paththe path to the new dataset
typeoptional reference to a datatype
spaceoptional reference to a dataspace
chunk_shapereference to the chunk shape
lcploptional reference to a link creation property list
dcploptional reference to a dataset creation property list
daploptional reference to a dataset access property list

The documentation for this class was generated from the following file: