/* * Copyright (C) 1998 Spizella Software * All rights reserved. * * Programmer: Robb Matzke * Friday, January 30, 1998 * * Purpose: Tests extendible datasets. */ #include const char *FILENAME[] = { "extend", NULL }; #define NX 100 /* USE AN EVEN NUMBER!*/ #define NY 100 /* USE AN EVEN NUMBER!*/ /*------------------------------------------------------------------------- * Function: main * * Purpose: Tests extendible datasets * * Return: Success: exit(0) * * Failure: exit(non-zero) * * Programmer: Robb Matzke * Friday, January 30, 1998 * * Modifications: * *------------------------------------------------------------------------- */ int main (void) { hid_t file, dataset, mem_space, file_space, cparms; hid_t fapl; int i, j, k, m; static int buf1[NY][NX], buf2[NX/2][NY/2]; static const hsize_t dims[2] = {NX, NY}; static const hsize_t half_dims[2] = {NX/2, NY/2}; static const hsize_t chunk_dims[2] = {NX/2, NY/2}; static hsize_t maxdims[2] = {H5S_UNLIMITED, H5S_UNLIMITED}; static hsize_t size[2]; hssize_t offset[2]; char filename[1024]; h5_reset(); fapl = h5_fileaccess(); TESTING("dataset extend"); /* Initialize buffer and space */ for (i=0; i