forked from AFD-Illinois/igrmonty2d
-
Notifications
You must be signed in to change notification settings - Fork 0
/
h5io.h
31 lines (21 loc) · 1.05 KB
/
h5io.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#ifndef H5IO_H
#define H5IO_H
#define H5IO_FMT_INT (H5T_STD_I32LE)
#define H5IO_FMT_DBL (H5T_IEEE_F64LE)
#define H5IO_FMT_STR (H5T_C_S1)
#include <string.h>
#include <hdf5.h>
// groups
void h5io_add_group(hid_t fid, const char *path);
// attributes
void h5io_add_attribute_int(hid_t fid, const char *path, const char *name, int attribute);
void h5io_add_attribute_dbl(hid_t fid, const char *path, const char *name, double attribute);
void h5io_add_attribute_str(hid_t fid, const char *path, const char *name, const char *attribute);
// data
void h5io_add_data_int(hid_t fid, const char *path, int data);
void h5io_add_data_dbl(hid_t fid, const char *path, double data);
void h5io_add_data_str(hid_t fid, const char *path, const char *data);
void h5io_add_data_dbl_1d(hid_t fid, const char *path, hsize_t n1, double data[n1]);
void h5io_add_data_dbl_2d(hid_t fid, const char *path, hsize_t n1, hsize_t n2, double data[n1][n2]);
void h5io_add_data_dbl_3d(hid_t fid, const char *path, hsize_t n1, hsize_t n2, hsize_t n3, double data[n1][n2][n3]);
#endif // H5IO_H