io-hdf5#
- group HDF5
I/O operations backed by HDF5.
Functions
- LogicalArray from_file(
- const std::filesystem::path &file_path,
- std::string_view dataset_name
Load a HDF5 dataset into a LogicalArray.
- Parameters:
file_path – The path to the file to load.
dataset_name – The name of the HDF5 dataset to load from the file.
- Throws:
std::system_error – If file_path does not exist.
UnusupportedHDF5DataType – If the data type cannot be converted to a Type.
InvalidDataSetError – If the dataset is invalid, or is not found.
- Returns:
LogicalArray The loaded array.
-
class UnsupportedHDF5DataTypeError : public std::invalid_argument
- #include <legate/io/hdf5/interface.h>
An exception thrown when a HDF5 datatype could not be converted to a Type.
-
class InvalidDataSetError : public std::invalid_argument
- #include <legate/io/hdf5/interface.h>
An exception thrown when an invalid dataset is encountered in an HDF5 file.
Public Functions
- InvalidDataSetError(
- const std::string &what,
- std::filesystem::path path,
- std::string dataset_name
Construct an InvalidDataSetError.
- Parameters:
what – The exception string to forward to the constructor of std::invalid_argument.
path – The path to the HDF5 file containing the dataset.
dataset_name – The name of the offending dataset.
-
const std::filesystem::path &path() const noexcept
Get the path to the file containing the dataset.
- Returns:
The path to the file containing the dataset.
-
std::string_view dataset_name() const noexcept
Get the name of the dataset.
- Returns:
The name of the dataset.