TRIQS/h5 1.3.0
C++ interface to HDF5
|
Specialized functions to read/write a std::array from/to HDF5.
The following code writes a std::array to an HDF5 file, reads the same array and outputs it to stdout:
Output:
Contents of array.h5
:
Functions | |
template<typename T , size_t N> | |
void | h5::h5_read (group g, std::string name, std::array< T, N > &a) |
Read a std::array from an HDF5 dataset/subgroup. | |
template<typename T , size_t N> | |
void | h5::h5_write (group g, std::string const &name, std::array< T, N > const &a) |
Write a std::array to an HDF5 dataset/subgroup. | |
void h5::h5_read | ( | group | g, |
std::string | name, | ||
std::array< T, N > & | a ) |
#include <h5/stl/array.hpp>
Read a std::array from an HDF5 dataset/subgroup.
T | Value type of the std::array. |
N | Size of the std::array. |
g | h5::group containing the dataset/subgroup. |
name | Name of the dataset/subgroup from which the std::array is read. |
a | std::array to read into. |
void h5::h5_write | ( | group | g, |
std::string const & | name, | ||
std::array< T, N > const & | a ) |
#include <h5/stl/array.hpp>
Write a std::array to an HDF5 dataset/subgroup.
T | Value type of the std::array. |
N | Size of the std::array. |
g | h5::group in which the dataset/subgroup is created. |
name | Name of the dataset/subgroup to which the std::array is written. |
a | std::array to be written. |