libpressio 0.93.0
Loading...
Searching...
No Matches
Macros | Functions
hdf5.h File Reference

IO functions for simple HDF5 files. More...

Go to the source code of this file.

Functions

struct pressio_datapressio_io_data_path_h5read (const char *file_name, const char *dataset_name)
 
int pressio_io_data_path_h5write (struct pressio_data const *data, const char *file_name, const char *dataset_name)
 

Detailed Description

IO functions for simple HDF5 files.

Function Documentation

◆ pressio_io_data_path_h5read()

struct pressio_data * pressio_io_data_path_h5read ( const char *  file_name,
const char *  dataset_name 
)

reads files that use simple datatypes and dataspaces into a pressio_data

The following are not supported:

  • complex datatypes or dataspaces
  • unlimited dimension datasets.
Parameters
[in]file_namename of the file to read
[in]dataset_namename of the dataset to read from the file
Returns
a pressio_data structure or nullptr if there was an error

◆ pressio_io_data_path_h5write()

int pressio_io_data_path_h5write ( struct pressio_data const *  data,
const char *  file_name,
const char *  dataset_name 
)

writes files that use simple datatypes and dataspaces from a pressio_data

if the file already exists, it will be opened. if the file does not exist, it will be created. if the dataset already exists, it will be overwritten. if the dataset does not exist, it will be created.

Parameters
[in]datathe data to be written
[in]file_namename of the file to written
[in]dataset_namename of the dataset to written to the file
Returns
a 0 if successful, nonzero on error