Go to the documentation of this file.
9 #ifndef H5EASY_BITS_PUBLIC_HPP
10 #define H5EASY_BITS_PUBLIC_HPP
12 #include "../H5Easy.hpp"
19 m_compression_level = 9;
21 m_compression_level = 0;
32 return m_compression_level;
37 m_overwrite =
static_cast<bool>(mode);
42 m_flush =
static_cast<bool>(mode);
47 m_compression_level = level.
get();
50 template <
class T,
class... Args>
60 m_chunk_size = std::vector<hsize_t>(shape.begin(), shape.end());
65 m_chunk_size = std::vector<hsize_t>(shape.begin(), shape.end());
80 return m_compression_level > 0;
85 return m_compression_level;
90 return m_chunk_size.size() > 0;
126 const std::vector<size_t>& idx,
135 const std::initializer_list<size_t>& idx,
144 const std::vector<size_t>& idx) {
152 const std::initializer_list<size_t>& idx) {
191 #endif // H5EASY_BITS_MISC_HPP
DumpMode
Write mode for DataSets.
Definition: H5Easy.hpp:67
T load(const File &file, const std::string &path, const std::vector< size_t > &idx)
Load entry "(i,j)" from a rank-two DataSet in an open HDF5 file to a scalar.
Definition: H5Easy_public.hpp:157
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
bool compress() const
Check to compress.
Definition: H5Easy_public.hpp:78
Set compression level for written DataSets.
Definition: H5Easy.hpp:82
Flush
Enable/disable automatic flushing after write operations.
Definition: H5Easy.hpp:74
DataSet getDataSet(const std::string &dataset_name, const DataSetAccessProps &accessProps=DataSetAccessProps()) const
get an existing dataset in the current file
Definition: H5Node_traits_misc.hpp:95
void set(DumpMode mode)
Overwrite setting.
Definition: H5Easy_public.hpp:35
std::vector< hsize_t > getChunkSize() const
Get chunk size.
Definition: H5Easy_public.hpp:93
unsigned getCompressionLevel() const
Get compression level.
Definition: H5Easy_public.hpp:83
static Attribute dumpAttribute(File &file, const std::string &path, const std::string &key, const T &data, const DumpOptions &options)
Definition: H5Easy_scalar.hpp:45
Options for dumping data.
Definition: H5Easy.hpp:112
static T load_part(const File &file, const std::string &path, const std::vector< size_t > &idx)
Definition: H5Easy_scalar.hpp:121
std::vector< size_t > getDimensions() const
Get the dimensions of the whole DataSet. This is a shorthand for getSpace().getDimensions()
Definition: H5DataSet.hpp:83
size_t getSize(const File &file, const std::string &path)
Get the size of an existing DataSet in an open HDF5 file.
Definition: H5Easy_public.hpp:98
std::vector< size_t > getShape(const File &file, const std::string &path)
Get the shape of an existing DataSet in an readable file.
Definition: H5Easy_public.hpp:102
Definition: H5Easy.hpp:51
bool isChunked() const
Check if chunk-size is manually set (or should be computed automatically).
Definition: H5Easy_public.hpp:88
File class.
Definition: H5File.hpp:24
Class representing an attribute of a dataset or group.
Definition: H5Attribute.hpp:23
unsigned get() const
Definition: H5Easy_public.hpp:30
bool overwrite() const
Check to overwrite.
Definition: H5Easy_public.hpp:68
static T loadAttribute(const File &file, const std::string &path, const std::string &key)
Definition: H5Easy_scalar.hpp:58
Attribute dumpAttribute(File &file, const std::string &path, const std::string &key, const T &data, DumpMode mode=DumpMode::Create)
Write object (templated) to a (new) Attribute in an open HDF5 file.
Definition: H5Easy_public.hpp:167
NAME string(REPLACE ".cpp" "_bin" example_name ${example_filename}) if($
Definition: hops/Third-party/HighFive/src/examples/CMakeLists.txt:6
DataSet dump(File &file, const std::string &path, const T &data, DumpMode mode=DumpMode::Create)
Write object (templated) to a (new) DataSet in an open HDF5 file.
Definition: H5Easy_public.hpp:115
Compression(bool enable=true)
Definition: H5Easy_public.hpp:16
static T load(const File &file, const std::string &path)
Definition: H5Easy_scalar.hpp:38
bool flush() const
Check to flush.
Definition: H5Easy_public.hpp:73
T loadAttribute(const File &file, const std::string &path, const std::string &key)
Load a Attribute in an open HDF5 file to an object (templated).
Definition: H5Easy_public.hpp:185
size_t getElementCount() const
Get the total number of elements in the current dataset. E.g. 2x2x2 matrix has size 8....
Definition: H5DataSet.hpp:92
static DataSet dump(File &file, const std::string &path, const T &data, const DumpOptions &options)
Definition: H5Easy_scalar.hpp:26
Class representing a dataset.
Definition: H5DataSet.hpp:27
static DataSet dump_extend(File &file, const std::string &path, const T &data, const std::vector< size_t > &idx, const DumpOptions &options)
Definition: H5Easy_scalar.hpp:68