h5::write<T>( [ds | path], Object<T>, {offset},{size} );

Detailed Description

Templated WRITE operations Object:= std::vector<S> | arma::Row<T> | arma::Col<T> | arma::Mat<T> | arma::Cube<T>

Function Documentation

template<typename T >
void h5::write ( hid_t  ds,
const T *  ptr,
const hsize_t *  offset,
const hsize_t *  count 
)
inline

partial write HDF5 dataset from memory region defined by pointer into opened HDF5 dataset

Parameters
dsvalid HDF5 dataset descriptor
ptrpointer to in memory dataset
offsetpointer to an array with the coordinates withing HDF5 dataset with rank of the file space, for instance a cube {0,0,0}
countpointer to an array with amount of data returned, each dimension must be in (1,max_dimension), for instance {1,3,10} returns a matrix
Template Parameters
Ttype of [unsigned](char|short|int|long long)|(float|double) type
Examples:
arma-partial.cpp, arma.cpp, blaze.cpp, blitz.cpp, dlib.cpp, eigen3.cpp, itpp.cpp, stl-perf.cpp, stl.cpp, and ublas.cpp.
template<typename T >
void h5::write ( hid_t  ds,
const T *  ptr,
std::initializer_list< hsize_t >  offset,
std::initializer_list< hsize_t >  count 
)
inline

partial write HDF5 dataset into opened HDF5 dataset

Parameters
dsvalid HDF5 dataset descriptor
ptrpointer to in memory dataset
offsetthe coordinates withing HDF5 dataset with rank of the file space, for instance a cube {0,0,0}
countamount of data returned, each dimension must be in (1,max_dimension), for instance {1,3,10} returns a matrix
Template Parameters
T:= ([unsigned] ( int8_t | int16_t | int32_t | int64_t )) | ( float | double )
template<typename T , typename BaseType = typename utils::base<T>::type, size_t Rank = utils::base<T>::rank>
void h5::write ( hid_t  ds,
const T &  ref 
)
inline

write the entire object into HDF5 dataset

Parameters
dsvalid HDF5 dataset descriptor
refreference to object
Template Parameters
T:= ([unsigned] ( int8_t | int16_t | int32_t | int64_t )) | ( float | double )
template<typename T , typename BaseType = typename utils::base<T>::type>
void h5::write ( hid_t  ds,
const T &  ref,
std::initializer_list< hsize_t >  offset,
std::initializer_list< hsize_t >  count 
)
inline

partial write HDF5 dataset into opened HDF5 dataset

Parameters
dsvalid HDF5 dataset descriptor
offsetthe coordinates withing HDF5 dataset with rank of the file space, for instance a cube {0,0,0}
refreference to object
countamount of data returned, each dimension must be in (1,max_dimension), for instance {1,3,10} returns a matrix
Template Parameters
T:= ([unsigned] ( int8_t | int16_t | int32_t | int64_t )) | ( float | double )
template<typename T >
void h5::write ( hid_t  fd,
const std::string &  path,
const T &  ref 
)
inline

writes HDF5 dataset into opened HDF5 dataset as a side effect, removes existing dataset if exists

Parameters
fdvalid file descriptor
pathvalid absolute path to HDF5 dataset
refreference to object
Template Parameters
T:= ([unsigned] ( int8_t | int16_t | int32_t | int64_t )) | ( float | double )
template<typename T >
void h5::write ( hid_t  fd,
const std::string &  path,
const T &  ref,
std::initializer_list< hsize_t >  offset,
std::initializer_list< hsize_t >  count 
)
inline

partial write HDF5 dataset into opened HDF5 dataset

Parameters
fdvalid HDF5 file descriptor
pathvalid absolute path to HDF5 dataset
refreference to object
offsetthe coordinates withing HDF5 dataset with rank of the file space, for instance a cube {0,0,0}
countamount of data returned, each dimension must be in (1,max_dimension), for instance {1,3,10} returns a matrix
Template Parameters
T:= ([unsigned] ( int8_t | int16_t | int32_t | int64_t )) | ( float | double )
template<typename T >
void h5::write ( hid_t  fd,
const std::string &  path,
const T *  ptr,
std::initializer_list< hsize_t >  offset,
std::initializer_list< hsize_t >  count 
)
inline

partial write HDF5 dataset into opened HDF5 dataset

Parameters
fdvalid HDF5 file descriptor
pathvalid absolute path to HDF5 dataset
ptrpointer to in memory dataset
offsetthe coordinates withing HDF5 dataset with rank of the file space, for instance a cube {0,0,0}
countamount of data returned, each dimension must be in (1,max_dimension), for instance {1,3,10} returns a matrix
Template Parameters
T:= ([unsigned] ( int8_t | int16_t | int32_t | int64_t )) | ( float | double )
template<>
void h5::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 
)
inline

variable string specialization of std::vector partial write HDF5 dataset into opened HDF5 dataset

Parameters
dsvalid HDF5 dataset descriptor
refreference to object
offsetthe coordinates withing HDF5 dataset with rank of the file space, for instance a cube {0,0,0}
countamount of data returned, each dimension must be in (1,max_dimension), for instance {1,3,10} returns a matrix
template<>
void h5::write< std::vector< std::string > > ( hid_t  ds,
const std::vector< std::string > &  ref 
)
inline

variable string specialization of std::vector write HDF5 dataset into opened HDF5 dataset

Parameters
dsvalid HDF5 dataset descriptor
refreference to object