Source
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
* 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://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
* access to either file, you may request a copy from help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
const char *FILENAMES[] = {
"filespace_persist.h5", /* H5F_FILE_SPACE_ALL_PERSIST */
"filespace_default.h5", /* H5F_FILE_SPACE_ALL */
"filespace_aggr_vfd.h5", /* H5F_FILE_SPACE_AGGR_VFD */
"filespace_vfd.h5", /* H5F_FILE_SPACE_VFD */
"filespace_threshold.h5" /* H5F_FILE_SPACE_ALL, non-default threshold */
};
/*
* Compile and run this program in file-space branch to generate
* HDF5 files with different kinds of file space strategies
* Move the HDF5 files to the 1.6 and 1.8 branch for compatibility
* testing:test_filespace_compatible() will use the files
*/
static void gen_file(void)
{
hid_t fid;
hid_t fcpl;
hid_t dataset, space;
hsize_t dim[1];
int data[NUM_ELMTS];
size_t j; /* Local index variable */
int i; /* Local index variable */
H5F_file_space_type_t fs_type; /* File space handling strategy */
for(j = 0, fs_type = H5F_FILE_SPACE_ALL_PERSIST; j < NELMTS(FILENAMES); j++, fs_type = (H5F_file_space_type_t)(fs_type + 1)) {
/* Get a copy of the default file creation property */
fcpl = H5Pcreate(H5P_FILE_CREATE);