#include <iostream>
#include <itpp/itbase.h>
#include <h5cpp/all>
template<class T> using Matrix = itpp::Mat<T>;
template<class T> using Colvec = itpp::Vec<T>;
int main(){
{
Matrix<short> M(2,3);
,h5::current_dims{10,20}
,h5::max_dims{10,H5S_UNLIMITED}
,
h5::chunk{2,3} | h5::fill_value<short>{3} | h5::gzip{9}
);
h5::write( ds, M, h5::offset{2,2}, h5::stride{1,3} );
}
{
Colvec<float> V(8);
h5::write(
"linalg.h5",
"one shot create write", V);
h5::write(
"linalg.h5",
"arma vec inside matrix", V
,h5::current_dims{40,50}
,h5::offset{5,0}
,h5::count{1,1}, h5::stride{3,5}, h5::block{2,4}
,h5::max_dims{40,H5S_UNLIMITED}
);
}
{
auto fd =
h5::open(
"linalg.h5", H5F_ACC_RDWR,
h5::fclose_degree_strong | h5::sec2);
}
{
}
}
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