summaryrefslogtreecommitdiffstats
path: root/test/tselect.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2007-12-10 21:38:03 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2007-12-10 21:38:03 (GMT)
commit66addd2d2c56c31137b2e50f66134e66c0bb746d (patch)
treeaf0a17a8fc8a632bb13358463544e21ef503c2b5 /test/tselect.c
parente7d0100948c274dc8d77b6aaabb8f157340db61d (diff)
downloadhdf5-66addd2d2c56c31137b2e50f66134e66c0bb746d.zip
hdf5-66addd2d2c56c31137b2e50f66134e66c0bb746d.tar.gz
hdf5-66addd2d2c56c31137b2e50f66134e66c0bb746d.tar.bz2
[svn-r14334] Description:
- Avoid trying to update 1-D dataset's chunk indices (they can't change) - Cache a copy of a dataspace describing a chunk, when doing single element I/O - Keep a 'chunk info' struct around, for single element I/O - Avoid creating a skip list for chunk infos when performing I/O on single element Also, minor formatting cleanups to testing code 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 Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in production mode
Diffstat (limited to 'test/tselect.c')
-rw-r--r--test/tselect.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/test/tselect.c b/test/tselect.c
index 3f18eb9..661226e 100644
--- a/test/tselect.c
+++ b/test/tselect.c
@@ -7629,35 +7629,35 @@ test_select_hyper_chunk_offset(void)
wbuf[i]=i;
/* Create file */
- fid = H5Fcreate (FILENAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
+ fid = H5Fcreate(FILENAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
CHECK(fid, FAIL, "H5Fcreate");
/* Create a dataset creation property list */
- dcpl = H5Pcreate (H5P_DATASET_CREATE);
+ dcpl = H5Pcreate(H5P_DATASET_CREATE);
CHECK(dcpl, FAIL, "H5Pcreate");
/* Set to chunked storage layout */
- ret=H5Pset_layout (dcpl, H5D_CHUNKED);
+ ret = H5Pset_layout(dcpl, H5D_CHUNKED);
CHECK(ret, FAIL, "H5Pset_layout");
/* Set the chunk size */
- ret=H5Pset_chunk (dcpl, 1, chunks);
+ ret = H5Pset_chunk(dcpl, 1, chunks);
CHECK(ret, FAIL, "H5Pset_chunk");
/* Create dataspace for memory */
- msid = H5Screate_simple (1, mem_dims, NULL);
+ msid = H5Screate_simple(1, mem_dims, NULL);
CHECK(msid, FAIL, "H5Screate_simple");
/* Select the correct chunk in the memory dataspace */
- 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");
/* Create dataspace for dataset */
- sid = H5Screate_simple (1, dims, maxdims);
+ sid = H5Screate_simple(1, dims, maxdims);
CHECK(sid, FAIL, "H5Screate_simple");
/* Create the dataset */
- did = H5Dcreate2 (fid, "fooData", H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT);
+ did = H5Dcreate2(fid, "fooData", H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT);
CHECK(did, FAIL, "H5Dcreate2");
/* Close the dataspace */
@@ -7684,7 +7684,7 @@ test_select_hyper_chunk_offset(void)
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 */
@@ -7693,13 +7693,13 @@ test_select_hyper_chunk_offset(void)
CHECK(ret, FAIL, "H5Soffset_simple");
/* Set the selection offset for the memory dataspace */
- offset[0] = SPACE10_DIM1-i;
+ offset[0] = SPACE10_DIM1 - i;
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);
- CHECK(ret, FAIL, "H5Soffset_simple");
+ CHECK(ret, FAIL, "H5Dwrite");
/* Close the file dataspace copy */
ret = H5Sclose(fsid);
@@ -7707,8 +7707,8 @@ test_select_hyper_chunk_offset(void)
}
/* Read the data back in */
- ret=H5Dread (did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, rbuf);
- CHECK(ret, FAIL, "H5Soffset_simple");
+ ret = H5Dread(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, rbuf);
+ CHECK(ret, FAIL, "H5Dread");
/* Verify the information read in */
for(i=0; i<SPACE10_DIM1; i+=SPACE10_CHUNK_SIZE)