diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2007-10-08 15:26:02 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2007-10-08 15:26:02 (GMT) |
commit | d3ee3988b68292524b3a893b9db55c074f4b9e87 (patch) | |
tree | 64395dd8ffd157ccd761ea54f7ee2c739e7b48ed /test/tselect.c | |
parent | a6f5c793469cba3e0c1168e07bd6c7f833321623 (diff) | |
download | hdf5-d3ee3988b68292524b3a893b9db55c074f4b9e87.zip hdf5-d3ee3988b68292524b3a893b9db55c074f4b9e87.tar.gz hdf5-d3ee3988b68292524b3a893b9db55c074f4b9e87.tar.bz2 |
[svn-r14192] Description:
Deprecate H5Dextend in favor of H5Dset_extent (without using API
versioning, due to changed behavior) and switch internal usage to H5Dset_extent
Tested on:
FreeBSD/32 6.2 (duty) in debug mode
FreeBSD/64 6.2 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (kagiso) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe,
in debug mode
Linux/64-amd64 2.6 (smirom) w/default API=1.6.x, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Mac OS X/32 10.4.10 (amazon) in debug mode
Diffstat (limited to 'test/tselect.c')
-rw-r--r-- | test/tselect.c | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/test/tselect.c b/test/tselect.c index 1c2c598..45b8c88 100644 --- a/test/tselect.c +++ b/test/tselect.c @@ -7309,48 +7309,48 @@ test_select_hyper_chunk_offset(void) CHECK(did, FAIL, "H5Dcreate"); /* Close the dataspace */ - ret=H5Sclose (sid); + ret = H5Sclose(sid); CHECK(ret, FAIL, "H5Sclose"); /* Close the dataset creation property list */ - ret=H5Pclose (dcpl); + ret = H5Pclose(dcpl); CHECK(ret, FAIL, "H5Pclose"); /* Loop over writing out each chunk */ - for(i=SPACE10_CHUNK_SIZE; i<=SPACE10_DIM1; i+=SPACE10_CHUNK_SIZE) { + for(i = SPACE10_CHUNK_SIZE; i <= SPACE10_DIM1; i += SPACE10_CHUNK_SIZE) { hssize_t offset[1]; /* Offset of selection */ hid_t fsid; /* File dataspace ID */ hsize_t size[1]; /* The size to extend the dataset to */ /* Extend the dataset */ size[0] = i; /* The size to extend the dataset to */ - ret=H5Dextend (did, size); - CHECK(ret, FAIL, "H5Dextend"); + ret = H5Dset_extent(did, size); + CHECK(ret, FAIL, "H5Dset_extent"); /* Get the (extended) dataspace from the dataset */ - fsid = H5Dget_space (did); + fsid = H5Dget_space(did); CHECK(fsid, FAIL, "H5Dget_space"); /* Select the correct chunk in the dataset */ - ret=H5Sselect_hyperslab (fsid, H5S_SELECT_SET, start, NULL, count, NULL); + ret = H5Sselect_hyperslab (fsid, H5S_SELECT_SET, start, NULL, count, NULL); CHECK(ret, FAIL, "H5Sselect_hyperslab"); /* Set the selection offset for the file dataspace */ offset[0] = i - SPACE10_CHUNK_SIZE; - ret=H5Soffset_simple (fsid, offset); + ret = H5Soffset_simple(fsid, offset); CHECK(ret, FAIL, "H5Soffset_simple"); /* Set the selection offset for the memory dataspace */ offset[0] = SPACE10_DIM1-i; - ret=H5Soffset_simple (msid, offset); + ret = H5Soffset_simple(msid, offset); CHECK(ret, FAIL, "H5Soffset_simple"); /* Write the data to the chunk */ - ret=H5Dwrite (did, H5T_NATIVE_INT, msid, fsid, H5P_DEFAULT, wbuf); + ret = H5Dwrite(did, H5T_NATIVE_INT, msid, fsid, H5P_DEFAULT, wbuf); CHECK(ret, FAIL, "H5Soffset_simple"); /* Close the file dataspace copy */ - ret=H5Sclose (fsid); + ret = H5Sclose(fsid); CHECK(ret, FAIL, "H5Sclose"); } @@ -7369,28 +7369,28 @@ test_select_hyper_chunk_offset(void) */ /* Re-initialize the write buffer */ - for(i=0; i<SPACE10_DIM1; i++) - wbuf[i]=i*2; + for(i = 0; i < SPACE10_DIM1; i++) + wbuf[i] = i * 2; /* Change the selected the region in the memory dataspace */ start[0] = 0; count[0] = SPACE10_CHUNK_SIZE/3; - ret=H5Sselect_hyperslab (msid, H5S_SELECT_SET, start, NULL, count, NULL); + ret = H5Sselect_hyperslab(msid, H5S_SELECT_SET, start, NULL, count, NULL); CHECK(ret, FAIL, "H5Sselect_hyperslab"); - start[0] = (2*SPACE10_CHUNK_SIZE)/3; - ret=H5Sselect_hyperslab (msid, H5S_SELECT_OR, start, NULL, count, NULL); + start[0] = (2 * SPACE10_CHUNK_SIZE)/3; + ret = H5Sselect_hyperslab(msid, H5S_SELECT_OR, start, NULL, count, NULL); CHECK(ret, FAIL, "H5Sselect_hyperslab"); /* Loop over writing out each chunk */ - for(i=SPACE10_CHUNK_SIZE; i<=SPACE10_DIM1; i+=SPACE10_CHUNK_SIZE) { + for(i = SPACE10_CHUNK_SIZE; i <= SPACE10_DIM1; i += SPACE10_CHUNK_SIZE) { hssize_t offset[1]; /* Offset of selection */ hid_t fsid; /* File dataspace ID */ hsize_t size[1]; /* The size to extend the dataset to */ /* Extend the dataset */ size[0] = i; /* The size to extend the dataset to */ - ret=H5Dextend (did, size); - CHECK(ret, FAIL, "H5Dextend"); + ret = H5Dset_extent(did, size); + CHECK(ret, FAIL, "H5Dset_extent"); /* Get the (extended) dataspace from the dataset */ fsid = H5Dget_space (did); @@ -7398,33 +7398,33 @@ test_select_hyper_chunk_offset(void) /* Select the correct region in the dataset */ start[0] = 0; - ret=H5Sselect_hyperslab (fsid, H5S_SELECT_SET, start, NULL, count, NULL); + ret = H5Sselect_hyperslab(fsid, H5S_SELECT_SET, start, NULL, count, NULL); CHECK(ret, FAIL, "H5Sselect_hyperslab"); start[0] = (2*SPACE10_CHUNK_SIZE)/3; - ret=H5Sselect_hyperslab (fsid, H5S_SELECT_OR, start, NULL, count, NULL); + ret = H5Sselect_hyperslab(fsid, H5S_SELECT_OR, start, NULL, count, NULL); CHECK(ret, FAIL, "H5Sselect_hyperslab"); /* Set the selection offset for the file dataspace */ offset[0] = i - SPACE10_CHUNK_SIZE; - ret=H5Soffset_simple (fsid, offset); + ret = H5Soffset_simple(fsid, offset); CHECK(ret, FAIL, "H5Soffset_simple"); /* Set the selection offset for the memory dataspace */ offset[0] = SPACE10_DIM1-i; - ret=H5Soffset_simple (msid, offset); + ret = H5Soffset_simple(msid, offset); CHECK(ret, FAIL, "H5Soffset_simple"); /* Write the data to the chunk */ - ret=H5Dwrite (did, H5T_NATIVE_INT, msid, fsid, H5P_DEFAULT, wbuf); + ret = H5Dwrite(did, H5T_NATIVE_INT, msid, fsid, H5P_DEFAULT, wbuf); CHECK(ret, FAIL, "H5Soffset_simple"); /* Close the file dataspace copy */ - ret=H5Sclose (fsid); + ret = H5Sclose(fsid); CHECK(ret, FAIL, "H5Sclose"); } /* Read the data back in */ - ret=H5Dread (did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, rbuf); + ret = H5Dread(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, rbuf); CHECK(ret, FAIL, "H5Soffset_simple"); /* Verify the information read in */ |