/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the files COPYING and Copyright.html. COPYING can be found at the root * * of the source code distribution tree; Copyright.html can be found at the * * root level of an installed copy of the electronic HDF5 document set and * * is linked from the top-level documents page. It can also be found at * * http://hdf.ncsa.uiuc.edu/HDF5/doc/Copyright.html. If you do not have * * access to either file, you may request a copy from hdfhelp@ncsa.uiuc.edu. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* * Programmer: Robb Matzke * Friday, January 30, 1998 * * Purpose: Tests extendible datasets. */ #include "h5test.h" 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