6 #ifndef ECHELON_HDF5_DIMENSION_SCALE_HPP 7 #define ECHELON_HDF5_DIMENSION_SCALE_HPP 9 #include <echelon/hdf5/storage_layer.hpp> 10 #include <echelon/hdf5/container_adaption.hpp> 11 #include <echelon/object.hpp> 13 #include <echelon/hdf5/precursor/dimension_scale.hpp> 34 const std::vector<hsize_t>& extent,
const std::string& scale_name);
38 std::vector<hsize_t>
shape()
const;
53 auto current_shape = shape_adl(source);
55 std::vector<hsize_t> mem_shape(begin(current_shape), end(current_shape));
57 hdf5::precursor::dataspace mem_space(mem_shape);
58 hdf5::precursor::dataspace file_space = sink.dim_scale_.get_space();
59 hdf5::precursor::type datatype = sink.dim_scale_.datatype();
61 write(sink.dim_scale_, datatype, mem_space, file_space, source);
75 auto current_shape = shape_adl(sink);
77 std::vector<hsize_t> mem_shape(begin(current_shape), end(current_shape));
79 hdf5::precursor::dataspace mem_space(mem_shape);
80 hdf5::precursor::dataspace file_space = source.dim_scale_.get_space();
81 hdf5::precursor::type datatype = source.dim_scale_.datatype();
83 read(source.dim_scale_, datatype, mem_space, file_space, sink);
91 hdf5::precursor::dimension_scale dim_scale_;
echelon's core namespace
Definition: attribute.cpp:10
std::vector< hsize_t > shape() const
The shape of the dimension scale.
Definition: hdf5/dimension_scale.cpp:26
friend void operator<<=(dimension_scale &sink, const T &source)
Writes the content of a data source into the dimension scale.
Definition: hdf5/dimension_scale.hpp:51
friend void operator<<=(T &sink, const dimension_scale &source)
Reads the content of the dimension scale into a data sink.
Definition: hdf5/dimension_scale.hpp:73
A handle to an HDF5 type.
Definition: hdf5/type.hpp:23
const native_handle_type & native_handle() const
The underlying HDF5 low-level handle.
Definition: hdf5/dimension_scale.cpp:31
A handle to a dimension scale.
Definition: hdf5/dimension_scale.hpp:26
hdf5::precursor::dimension_scale native_handle_type
Type of the underlying HDF5 low-level handle.
Definition: hdf5/dimension_scale.hpp:31