Template Function write_raw_data_to_h5_file¶
Defined in File h5write.hpp
Function Documentation¶
-
template<typename T>
void write_raw_data_to_h5_file(std::string_view filename, std::string_view dataset_path, const T *data_ptr, const std::vector<hsize_t> &shape)¶ Writes raw data to an HDF5 file.
This function writes a dataset to an HDF5 file. The dataset’s shape is specified by the user.
- Parameters:
filename – The path to the HDF5 file.
dataset_path – The full path to the dataset, including group hierarchies.
data_ptr – Pointer to the raw data to write to the dataset.
shape – The shape of the dataset as a vector of dimensions.
- Throws:
std::runtime_error – If the dataset cannot be created or data cannot be written.