summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorJames Laird <jlaird@hdfgroup.org>2007-01-08 14:54:12 (GMT)
committerJames Laird <jlaird@hdfgroup.org>2007-01-08 14:54:12 (GMT)
commit77a2e54459cee60effc94513bdb047dbf2ef847b (patch)
tree810b00b0eb408c86d3edce96884c61ab851c6516 /examples
parent7fc6a486b94dcd8eff19db8816d9ab3b0bbeb440 (diff)
downloadhdf5-77a2e54459cee60effc94513bdb047dbf2ef847b.zip
hdf5-77a2e54459cee60effc94513bdb047dbf2ef847b.tar.gz
hdf5-77a2e54459cee60effc94513bdb047dbf2ef847b.tar.bz2
[svn-r13119] More code cleanup. Made shared messages zero-indexed instead of
one-indexed. Changed the names of some constants to be more consistent. Tested on juniper, smirom, and copper.
Diffstat (limited to 'examples')
-rw-r--r--examples/h5_shared_mesg.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/examples/h5_shared_mesg.c b/examples/h5_shared_mesg.c
index f6e806c..4094b21 100644
--- a/examples/h5_shared_mesg.c
+++ b/examples/h5_shared_mesg.c
@@ -111,7 +111,7 @@ int main(void)
* it holds. For the simple case, we'll put every message that could be
* shared in this single index.
*/
- ret = H5Pset_shared_mesg_index(fcpl_id, 1, H5O_MESG_ALL_FLAG, 40);
+ ret = H5Pset_shared_mesg_index(fcpl_id, 0, H5O_MESG_ALL_FLAG, 40);
if(ret < 0) goto error;
/* The other property that can be set for shared messages is the
@@ -147,7 +147,7 @@ int main(void)
* will be about the same size as a normal file (with just a little extra
* overhead).
*/
- ret = H5Pset_shared_mesg_index(fcpl_id, 1, H5O_MESG_ALL_FLAG, 1000);
+ ret = H5Pset_shared_mesg_index(fcpl_id, 0, H5O_MESG_ALL_FLAG, 1000);
if(ret < 0) goto error;
ret = create_standard_file("only_huge_mesgs_file.h5", fcpl_id);
@@ -158,22 +158,22 @@ int main(void)
* attributes (which might make sense if we were going to use committed
* datatypes). We could change the flags on the index:
*/
- ret = H5Pset_shared_mesg_index(fcpl_id, 1, H5O_MESG_SDSPACE_FLAG | H5O_MESG_ATTR_FLAG, 40);
+ ret = H5Pset_shared_mesg_index(fcpl_id, 0, H5O_MESG_SDSPACE_FLAG | H5O_MESG_ATTR_FLAG, 40);
if(ret < 0) goto error;
ret = create_standard_file("only_dspaces_and_attrs_file.h5", fcpl_id);
if(ret < 0) goto error;
- /* We create a second index and put attributes in it to separate them from
- * datatypes and dataspaces (and then run some performance metrics to
+ /* We could create a second index and put attributes in it to separate them
+ * from datatypes and dataspaces (and then run some performance metrics to
* see whether this improved caching performance).
*/
ret = H5Pset_shared_mesg_nindexes(fcpl_id, 2);
if(ret < 0) goto error;
- ret = H5Pset_shared_mesg_index(fcpl_id, 1, H5O_MESG_DTYPE_FLAG | H5O_MESG_SDSPACE_FLAG, 40);
+ ret = H5Pset_shared_mesg_index(fcpl_id, 0, H5O_MESG_DTYPE_FLAG | H5O_MESG_SDSPACE_FLAG, 40);
if(ret < 0) goto error;
- ret = H5Pset_shared_mesg_index(fcpl_id, 2, H5O_MESG_ATTR_FLAG, 40);
+ ret = H5Pset_shared_mesg_index(fcpl_id, 1, H5O_MESG_ATTR_FLAG, 40);
if(ret < 0) goto error;
ret = create_standard_file("separate_indexes_file.h5", fcpl_id);
@@ -186,7 +186,7 @@ int main(void)
*/
ret = H5Pset_shared_mesg_nindexes(fcpl_id, 1);
if(ret < 0) goto error;
- ret = H5Pset_shared_mesg_index(fcpl_id, 1, H5O_MESG_ALL_FLAG, 40);
+ ret = H5Pset_shared_mesg_index(fcpl_id, 0, H5O_MESG_ALL_FLAG, 40);
if(ret < 0) goto error;
ret = H5Pset_shared_mesg_phase_change(fcpl_id, 5, 0);