Marray
|
HDF5 import/export support. More...
Classes | |
class | HandleCheck< false > |
class | HandleCheck< true > |
Enumerations | |
enum | FileAccessMode { READ_ONLY, READ_WRITE } |
enum | HDF5Version { HDF5_VERSION_DEFAULT, HDF5_VERSION_LATEST } |
Functions | |
template<class T > | |
void | save (const hid_t &groupHandle, const std::string &datasetName, const Marray< T > &in) |
Save an Marray as an HDF5 dataset. | |
template<class T , bool isConst> | |
void | save (const hid_t &groupHandle, const std::string &datasetName, const View< T, isConst > &in) |
Save a View as an HDF5 dataset. | |
template<class T , class BaseIterator , class ShapeIterator > | |
void | saveHyperslab (const hid_t &groupHandle, const std::string &datasetName, BaseIterator baseBegin, BaseIterator baseEnd, ShapeIterator shapeBegin, const Marray< T > &in) |
Save an Marray as a hyperslab into an HDF5 dataset. | |
template<class T , class ShapeIterator > | |
void | create (const hid_t &groupHandle, const std::string &datasetName, ShapeIterator begin, ShapeIterator end) |
Create and close an HDF5 dataset to store Marray data. | |
template<class T > | |
void | load (const hid_t &groupHandle, const std::string &datasetName, Marray< T > &out) |
Load an Marray from an HDF5 dataset. | |
template<class T > | |
void | load (const std::string &filename, const std::string &datasetName, Marray< T > &out, HDF5Version hdf5version) |
Open an HDF5 file (read only), load an Marray from an HDF5 dataset, and close the file. | |
template<class T > | |
void | loadShape (const hid_t &groupHandle, const std::string &datasetName, std::vector< T > &out) |
Load the shape of an HDF5 dataset. | |
template<class T , class BaseIterator , class ShapeIterator > | |
void | loadHyperslab (const hid_t &groupHandle, const std::string &datasetName, BaseIterator baseBegin, BaseIterator baseEnd, ShapeIterator shapeBegin, Marray< T > &out) |
Load a hyperslab from an HDF5 dataset into an Marray. | |
template<class T > | |
hid_t | uintTypeHelper () |
template<class T > | |
hid_t | intTypeHelper () |
template<class T > | |
hid_t | floatingTypeHelper () |
template<class T > | |
hid_t | hdf5Type () |
template<> | |
hid_t | hdf5Type< unsigned char > () |
template<> | |
hid_t | hdf5Type< unsigned short > () |
template<> | |
hid_t | hdf5Type< unsigned int > () |
template<> | |
hid_t | hdf5Type< unsigned long > () |
template<> | |
hid_t | hdf5Type< unsigned long long > () |
template<> | |
hid_t | hdf5Type< signed char > () |
template<> | |
hid_t | hdf5Type< char > () |
template<> | |
hid_t | hdf5Type< short > () |
template<> | |
hid_t | hdf5Type< int > () |
template<> | |
hid_t | hdf5Type< long > () |
template<> | |
hid_t | hdf5Type< long long > () |
template<> | |
hid_t | hdf5Type< float > () |
template<> | |
hid_t | hdf5Type< double > () |
hid_t | createFile (const std::string &filename, HDF5Version hdf5version=HDF5_VERSION_DEFAULT) |
Create an HDF5 file. | |
hid_t | openFile (const std::string &filename, FileAccessMode fileAccessMode=READ_ONLY, HDF5Version hdf5version=HDF5_VERSION_DEFAULT) |
Open an HDF5 file. | |
void | closeFile (const hid_t &handle) |
Close an HDF5 file. | |
hid_t | createGroup (const hid_t &parentHandle, const std::string &groupName) |
Create an HDF5 group. | |
hid_t | openGroup (const hid_t &parentHandle, const std::string &groupName) |
Open an HDF5 group. | |
void | closeGroup (const hid_t &handle) |
Close an HDF5 group. | |
template<class T > | |
void | save (const hid_t parentHandle, const std::string datasetName, const std::vector< T > &data) |
Save an std::vector to an HDF5 dataset. | |
template<class T > | |
void | load (const hid_t parentHandle, const std::string datasetName, std::vector< T > &data, HDF5Version hdf5Version=HDF5_VERSION_DEFAULT) |
Load an std::vector from an HDF5 dataset. | |
template<class T > | |
void | load (const std::string &filename, const std::string &datasetName, std::vector< T > &out, HDF5Version hdf5version) |
Open an HDF5 file (read only), load an std::vector from an HDF5 dataset, and close the file. |
Variables | |
const std::string | errorMessageLastMajorOrder = "Consider copying to an Marray in FirstMajorOrder or a one-dimensional Marray" |
HDF5 import/export support.
|
inline |
|
inline |
Close an HDF5 group.
handle | HDF5 handle on group to close. |
void andres::hdf5::create | ( | const hid_t & | groupHandle, |
const std::string & | datasetName, | ||
ShapeIterator | begin, | ||
ShapeIterator | end | ||
) |
Create and close an HDF5 dataset to store Marray data.
groupHandle | Handle of the parent HDF5 file or group. |
datasetName | Name of the HDF5 dataset. |
begin | Iterator to the beginning of a sequence that determines the shape of the dataset. |
end | Iterator to the end of a sequence that determines the shape of the dataset. |
Definition at line 53 of file marray-hdf5.hxx.
|
inline |
Create an HDF5 file.
filename | Name of the file. |
hdf5version | HDF5 version tag. |
|
inline |
Create an HDF5 group.
parentHandle | HDF5 handle on the parent group or file. |
groupName | Name of the group. |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
void andres::hdf5::load | ( | const hid_t & | groupHandle, |
const std::string & | datasetName, | ||
Marray< T > & | out | ||
) |
Load an Marray from an HDF5 dataset.
groupHandle | Handle of the parent HDF5 file or group. |
datasetName | Name of the HDF5 dataset. |
out | Marray. |
This function sets the out.coordinateOrder() to FirstMajorOrder!
Definition at line 201 of file marray-hdf5.hxx.
|
inline |
Open an HDF5 file (read only), load an Marray from an HDF5 dataset, and close the file.
filename | Name of the file. |
datasetName | Name of the HDF5 dataset. |
out | Marray. |
hdf5version | HDF5 version tag. |
This function sets the out.coordinateOrder() to FirstMajorOrder!
TODO: write a unit test for this function
Definition at line 179 of file marray-hdf5.hxx.
|
inline |
|
inline |
void andres::hdf5::loadHyperslab | ( | const hid_t & | groupHandle, |
const std::string & | datasetName, | ||
BaseIterator | baseBegin, | ||
BaseIterator | baseEnd, | ||
ShapeIterator | shapeBegin, | ||
Marray< T > & | out | ||
) |
Load a hyperslab from an HDF5 dataset into an Marray.
groupHandle | Handle of the parent HDF5 file or group. |
datasetName | Name of the HDF5 dataset. |
baseBegin | Iterator to the beginning of the sequence that determines the first coordinate of the hyperslab. |
baseEnd | Iterator to the end of the sequence that determines the first coordinate of the hyperslab. |
shapeBegin | Iterator to the beginning of the sequence that determines the shape of the hyperslab. |
out | Marray. |
This function sets the out.coordinateOrder() to FirstMajorOrder!
Definition at line 317 of file marray-hdf5.hxx.
void andres::hdf5::loadShape | ( | const hid_t & | groupHandle, |
const std::string & | datasetName, | ||
std::vector< T > & | out | ||
) |
Load the shape of an HDF5 dataset.
groupHandle | Handle of the parent HDF5 file or group. |
datasetName | Name of the HDF5 dataset. |
out | Shape. |
Definition at line 266 of file marray-hdf5.hxx.
|
inline |
Open an HDF5 file.
filename | Name of the file. |
fileAccessMode | File access mode. |
hdf5version | HDF5 version tag. |
|
inline |
Open an HDF5 group.
parentHandle | HDF5 handle on the parent group or file. |
groupName | Name of the group. |
void andres::hdf5::save | ( | const hid_t & | groupHandle, |
const std::string & | datasetName, | ||
const Marray< T > & | in | ||
) |
Save an Marray as an HDF5 dataset.
groupHandle | Handle of the parent HDF5 file or group. |
datasetName | Name of the HDF5 dataset. |
in | Marray. |
Definition at line 101 of file marray-hdf5.hxx.
|
inline |
Save a View as an HDF5 dataset.
groupHandle | Handle of the parent HDF5 file or group. |
datasetName | Name of the HDF5 dataset. |
in | View. |
Definition at line 156 of file marray-hdf5.hxx.
|
inline |
void andres::hdf5::saveHyperslab | ( | const hid_t & | groupHandle, |
const std::string & | datasetName, | ||
BaseIterator | baseBegin, | ||
BaseIterator | baseEnd, | ||
ShapeIterator | shapeBegin, | ||
const Marray< T > & | in | ||
) |
Save an Marray as a hyperslab into an HDF5 dataset.
groupHandle | Handle of the parent HDF5 file or group. |
datasetName | Name of the HDF5 dataset. |
baseBegin | Iterator to the beginning of the sequence that determines the first coordinate of the hyperslab. |
baseEnd | Iterator to the end of the sequence that determines the first coordinate of the hyperslab. |
shapeBegin | Iterator to the beginning of the sequence that determines the shape of the hyperslab. |
in | Marray. |
Definition at line 404 of file marray-hdf5.hxx.
|
inline |
const std::string andres::hdf5::errorMessageLastMajorOrder = "Consider copying to an Marray in FirstMajorOrder or a one-dimensional Marray" |
Definition at line 13 of file marray-hdf5.hxx.