/* * This example writes data to the HDF5 file. * Data conversion is performed during write operation. */ // #include /* Some macros to fix compatibility issues as long as 1.8.0 is in beta phase */ #define H5_USE_16_API 1 #include #define WRITE_H5 #define FILE "SDS.h5" #define DATASETNAME "IntArray" #define NX 5 /* dataset dimensions */ #define NY 6 #define RANK 2 /* Perhaps support a filtration/pattern matching architecture which recognizes particular patterns of values in the file and offers those patterns as a new typename in the architecture or even a particular callback. So for instance you could have a group of "dataset" with "edgecoords" is a rectilinear dataset. Otherwise we'll need to match groupnames? Could have a "type" attribute which disambiguates this because each object must have a unique text name. */ herr_t GroupOp(hid_t group_id, const char *member_name, void *operator_data){ hid_t dataset,space,datatype; hsize_t rank, dims[5]; H5T_class_t typeclass; size_t typesize; int i; printf("GroupOp: member_name = %s id %u\n",member_name,group_id); /* get info on a particular member */ dataset = H5Dopen(group_id,member_name); space = H5Dget_space(dataset); datatype = H5Dget_type(dataset); rank = H5Sget_simple_extent_ndims(space); H5Sget_simple_extent_dims(space,dims,NULL); printf("\tndims=%d Dims ",rank); for(i=0;i