16#ifdef XTENSOR_VERSION_MAJOR
17#ifndef H5GT_USE_XTENSOR
18#define H5GT_USE_XTENSOR
22#ifdef H5GT_USE_XTENSOR
23#include <xtensor/xarray.hpp>
24#include <xtensor/xtensor.hpp>
28#ifdef EIGEN_WORLD_VERSION
39#ifdef CV_MAJOR_VERSION
40#ifndef H5GT_USE_OPENCV
41#define H5GT_USE_OPENCV
46#include <opencv2/opencv.hpp>
60using h5gt::ObjectType;
97 inline unsigned get()
const;
100 unsigned m_compression_level;
121 template <
class... Args>
130 inline void set(DumpMode mode);
135 inline void set(Flush mode);
145 template <
class T,
class... Args>
146 inline void set(T arg, Args... args);
157 inline void setChunkSize(std::initializer_list<size_t> shape);
165 inline bool flush()
const;
184 bool m_overwrite =
false;
186 unsigned m_compression_level = 0;
187 std::vector<hsize_t> m_chunk_size = {};
197inline size_t getSize(
const File& file,
const std::string& path);
206inline std::vector<size_t> getShape(
const File& file,
const std::string& path);
219inline DataSet dump(File& file,
220 const std::string& path,
222 DumpMode mode = DumpMode::Create);
235inline DataSet dump(File& file,
236 const std::string& path,
238 const DumpOptions& options);
251inline DataSet dump(File& file,
252 const std::string& path,
254 const std::vector<size_t>& idx);
267inline DataSet dump(File& file,
268 const std::string& path,
270 const std::initializer_list<size_t>& idx);
284inline DataSet dump(File& file,
285 const std::string& path,
287 const std::vector<size_t>& idx,
288 const DumpOptions& options);
302inline DataSet dump(File& file,
303 const std::string& path,
305 const std::initializer_list<size_t>& idx,
306 const DumpOptions& options);
318inline T load(
const File& file,
const std::string& path,
const std::vector<size_t>& idx);
329inline T load(
const File& file,
const std::string& path);
343inline Attribute dumpAttribute(File& file,
344 const std::string& path,
345 const std::string& key,
347 DumpMode mode = DumpMode::Create);
361inline Attribute dumpAttribute(File& file,
362 const std::string& path,
363 const std::string& key,
365 const DumpOptions& options);
377inline T loadAttribute(
const File& file,
const std::string& path,
const std::string& key);
381#include "h5easy_bits/H5Easy_Eigen.hpp"
382#include "h5easy_bits/H5Easy_misc.hpp"
383#include "h5easy_bits/H5Easy_opencv.hpp"
384#include "h5easy_bits/H5Easy_public.hpp"
385#include "h5easy_bits/H5Easy_scalar.hpp"
386#include "h5easy_bits/H5Easy_vector.hpp"
387#include "h5easy_bits/H5Easy_xtensor.hpp"
Set compression level for written DataSets.
Definition H5Easy.hpp:82
Options for dumping data.
Definition H5Easy.hpp:112
bool flush() const
Check to flush.
Definition H5Easy_public.hpp:73
bool isChunked() const
Check if chunk-size is manually set (or should be computed automatically).
Definition H5Easy_public.hpp:88
std::vector< hsize_t > getChunkSize() const
Get chunk size.
Definition H5Easy_public.hpp:93
DumpOptions()=default
Constructor: accept all defaults.
unsigned getCompressionLevel() const
Get compression level.
Definition H5Easy_public.hpp:83
bool overwrite() const
Check to overwrite.
Definition H5Easy_public.hpp:68
void set(DumpMode mode)
Overwrite setting.
Definition H5Easy_public.hpp:35
bool compress() const
Check to compress.
Definition H5Easy_public.hpp:78
DumpOptions(Args... args)
Constructor: overwrite (some of the) defaults.
Definition H5Easy.hpp:122
void setChunkSize(const std::vector< T > &shape)
Set chunk-size. If the input is rank (size) zero, automatic chunking is enabled.
Definition H5Easy_public.hpp:58
create an HDF5 DataType from a C++ type
Definition H5DataType.hpp:124
Class representing an attribute of a dataset or group.
Definition H5Attribute.hpp:22
Definition H5PropertyList.hpp:171
Class representing a dataset.
Definition H5DataSet.hpp:28
Class representing the space (dimensions) of a dataset.
Definition H5DataSpace.hpp:37
Basic h5gt Exception class.
Definition H5Exception.hpp:24
File class.
Definition H5File.hpp:25
Definition H5PropertyList.hpp:138
Definition H5PropertyList.hpp:129