h5 Namespace Reference

public namespace More...

Classes

struct  context
 to maintain dataset context for state-full operations, this way reducing H5 library calls More...
 

Functions

template<typename T >
void append (h5::context< T > &ctx, const T &ref)
 extends HDF5 dataset along the first/slowest growing dimension, then writes passed object to the newly created space More...
 
template<typename T >
hid_t create (hid_t fd, const std::string &path, std::initializer_list< hsize_t > max_dims, std::initializer_list< hsize_t > chunk_dims={0}, const int32_t deflate=0)
 T template parameter defines the underlying representation of dataset created within HDF5 filesystem referenced by fd descriptor. path behaves much similar to POSIX files system path: either relative or absolute. HDF5 supports arbitrary number of dimensions which is specified by max_dim, and chunk_size controls how this array is accessed. When chunked access is used keep in mind small values may result in excessive data cache operations.
This function is general, ca More...
 
template<typename T , typename BaseType = typename utils::base<T>::type, size_t Rank = utils::base<T>::rank>
hid_t create (hid_t fd, const std::string &path, const T &ref)
 create dataset within HDF5 file space with dimensions extracted from references object More...
 
hid_t create (const std::string &path)
 create an HDF5 file with default properties, in most cases this is all you need to have a container for datasets. More...
 
hid_t open (const std::string &path, unsigned flags)
 
hid_t open (hid_t fd, const std::string &path)
 
void close (hid_t fd)
 
void mute ()
 removes default error handler preventing diagnostic error messages printed More...
 
template<typename T , typename BaseType = typename utils::base<T>::type>
read (hid_t ds) noexcept
 reads entire HDF5 dataset and returns object defined by T template More...
 
template<typename T >
T * read (hid_t ds, T *ptr, std::initializer_list< hsize_t > offset, std::initializer_list< hsize_t > count) noexcept
 partial reads HDF5 dataset into a memory region defined by pointer More...
 
template<typename T , typename BaseType = typename utils::base<T>::type>
read (hid_t ds, std::initializer_list< hsize_t > offset, std::initializer_list< hsize_t > count) noexcept
 partial reads HDF5 dataset into T object then returns it More...
 
template<typename T >
read (hid_t fd, const std::string &path)
 reads entire HDF5 dataset specified by path and returns object defined by T template throws std::runtime_error if dataset not found, and return value is undefined More...
 
template<typename T >
read (const std::string &file, const std::string &path)
 reads entire HDF5 dataset specified by path and returns object defined by T template throws std::runtime_error if dataset not found, and return value is undefined More...
 
template<typename T >
T * read (hid_t fd, const std::string &path, T *ptr, std::initializer_list< hsize_t > offset, std::initializer_list< hsize_t > count)
 partial reads HDF5 dataset into a memory region defined by pointer throws std::runtime_error if dataset not found More...
 
template<typename T >
read (hid_t fd, const std::string &path, std::initializer_list< hsize_t > offset, std::initializer_list< hsize_t > count)
 partial reads HDF5 dataset into T object then returns it More...
 
template<typename T >
void write (hid_t ds, const T *ptr, const hsize_t *offset, const hsize_t *count)
 partial write HDF5 dataset from memory region defined by pointer into opened HDF5 dataset More...
 
template<typename T >
void write (hid_t ds, const T *ptr, std::initializer_list< hsize_t > offset, std::initializer_list< hsize_t > count)
 partial write HDF5 dataset into opened HDF5 dataset More...
 
template<typename T , typename BaseType = typename utils::base<T>::type, size_t Rank = utils::base<T>::rank>
void write (hid_t ds, const T &ref)
 write the entire object into HDF5 dataset More...
 
template<typename T , typename BaseType = typename utils::base<T>::type>
void write (hid_t ds, const T &ref, std::initializer_list< hsize_t > offset, std::initializer_list< hsize_t > count)
 partial write HDF5 dataset into opened HDF5 dataset More...
 
template<typename T >
void write (hid_t fd, const std::string &path, const T &ref)
 writes HDF5 dataset into opened HDF5 dataset as a side effect, removes existing dataset if exists More...
 
template<typename T >
void write (hid_t fd, const std::string &path, const T &ref, std::initializer_list< hsize_t > offset, std::initializer_list< hsize_t > count)
 partial write HDF5 dataset into opened HDF5 dataset More...
 
template<typename T >
void write (hid_t fd, const std::string &path, const T *ptr, std::initializer_list< hsize_t > offset, std::initializer_list< hsize_t > count)
 partial write HDF5 dataset into opened HDF5 dataset More...
 
template<>
void write< std::vector< std::string > > (hid_t ds, const std::vector< std::string > &ref, std::initializer_list< hsize_t > offset, std::initializer_list< hsize_t > count)
 variable string specialization of std::vector partial write HDF5 dataset into opened HDF5 dataset More...
 
template<>
void write< std::vector< std::string > > (hid_t ds, const std::vector< std::string > &ref)
 variable string specialization of std::vector write HDF5 dataset into opened HDF5 dataset More...
 

Detailed Description

public namespace