/************************************************************ This example shows how to create a chunked dataset. The program first writes integers in a hyperslab selection to a chunked dataset with dataspace dimensions of DIM0xDIM1 and chunk size of CHUNK0xCHUNK1, then closes the file. Next, it reopens the file, reads back the data, and outputs it to the screen. Finally it reads the data again using a different hyperslab selection, and outputs the result to the screen. This file is intended for use with HDF5 Library version 1.8 ************************************************************/ #include "hdf5.h" #include #include #define FILE "h5ex_d_chunk.h5" #define DATASET "DS1" #define DIM0 6 #define DIM1 8 #define CHUNK0 4 #define CHUNK1 4 int main (void) { hid_t file, space, dset, dcpl; /* Handles */ herr_t status; H5D_layout_t layout; hsize_t dims[2] = {DIM0, DIM1}, chunk[2] = {CHUNK0, CHUNK1}, start[2], stride[2], count[2], block[2]; int wdata[DIM0][DIM1], /* Write buffer */ rdata[DIM0][DIM1], /* Read buffer */ i, j; /* * Initialize data to "1", to make it easier to see the selections. */ for (i=0; i