#include <armadillo>
#include <vector>
#include <h5cpp/all>
int main(){
{
h5::current_dims{10,20},
h5::chunk{2,2} | h5::fill_value<float>{1} );
h5::reference_t ref = h5::reference(fd, "01", h5::offset{2,2}, h5::count{4,4});
h5::reference(fd, "01", h5::offset{2,2}, h5::count{4,4}),
h5::reference(fd, "01", h5::offset{4,8}, h5::count{1,1}),
h5::reference(fd, "01", h5::offset{6,12}, h5::count{3,3}),
h5::reference(fd, "01", h5::offset{8,16}, h5::count{2,1})
};
h5::write(fd,
"index", idx, h5::current_dims{2,2}, h5::max_dims{H5S_UNLIMITED, 2});
}
{
h5::exp::write(ds, ref, color.
data());
}
{
arma::fmat mat = h5::exp::read<arma::fmat>(ds, ref);
}
}
{
std::cout << h5::read<arma::fmat>(fd, "01") << "\n\n";
}
}
h5::at_t create(const hid_t &parent, const std::string &path, args_t &&... args)
Create a new attribute of element type T on a parent HDF5 object.
Definition H5Acreate.hpp:100
T aread(const hid_t &ds, const std::string &name, const h5::acpl_t &acpl=h5::default_acpl)
Read an attribute by name and return its value as type T.
Definition H5Aread.hpp:76
h5::at_t open(const hid_t &parent, const std::string &path, const h5::acpl_t &acpl=h5::default_acpl)
Open an existing attribute by name on a parent HDF5 object.
Definition H5Aopen.hpp:56
h5::gr_t write(const LOC &parent, const std::string &path, const T &src)
Write a sparse matrix or vector as a CSC group.
Definition H5Dsparse.hpp:185