summaryrefslogtreecommitdiffstats
path: root/examples/h5_vds-percival-unlim-maxmin.c
diff options
context:
space:
mode:
authorNeil Fortner <nfortne2@hdfgroup.org>2015-05-05 20:15:40 (GMT)
committerNeil Fortner <nfortne2@hdfgroup.org>2015-05-05 20:15:40 (GMT)
commit8fe3dfbf9410ad5acabeaeb187bfb5f7b489042e (patch)
tree393d8485ce30da4ef690f7a1f7fc20a30347d9e4 /examples/h5_vds-percival-unlim-maxmin.c
parent8ba06cb15e5bab3b49f210ff6d635d35fc4ed1ec (diff)
downloadhdf5-8fe3dfbf9410ad5acabeaeb187bfb5f7b489042e.zip
hdf5-8fe3dfbf9410ad5acabeaeb187bfb5f7b489042e.tar.gz
hdf5-8fe3dfbf9410ad5acabeaeb187bfb5f7b489042e.tar.bz2
[svn-r27022] Add new functions H5Pset_virtual_dataspace_bounds and
H5Pget_virtual_dataspace_bounds. Minor refactor of dataset initialization code to make this cleaner. Update h5_vds-percival-unlim-maxmin.c Other minor fixes/cleanup. Tested: ummon
Diffstat (limited to 'examples/h5_vds-percival-unlim-maxmin.c')
-rw-r--r--examples/h5_vds-percival-unlim-maxmin.c31
1 files changed, 20 insertions, 11 deletions
diff --git a/examples/h5_vds-percival-unlim-maxmin.c b/examples/h5_vds-percival-unlim-maxmin.c
index c89dbac..4640b94 100644
--- a/examples/h5_vds-percival-unlim-maxmin.c
+++ b/examples/h5_vds-percival-unlim-maxmin.c
@@ -209,18 +209,27 @@ main (void)
* min extents depending on the sizes of the underlying datasets
*/
dapl = H5Pcreate (H5P_DATASET_ACCESS);
- //status = H5Pset_virtual_dataset_bounds (dapl, H5D_VDS_MAX);
- //status = H5Pset_virtual_dataset_bounds (dapl, H5D_VDS_MIN);
- vdset = H5Dopen (vfile, DATASET, dapl);
-
- /* Let's get space of the VDS and its dimension; we should get 32(or 17)x10x10 */
- vspace = H5Dget_space (vdset);
- H5Sget_simple_extent_dims (vspace, vdsdims_out, vdsdims_max_out);
- printf ("VDS dimensions: ");
- for (i=0; i<RANK; i++)
- printf (" %d ", (int)vdsdims_out[i]);
- printf ("\n");
+ for(i = 0; i < 2; i++) {
+ status = H5Pset_virtual_dataspace_bounds (dapl, i ? H5D_VDS_MAX : H5D_VDS_MIN);
+ vdset = H5Dopen (vfile, DATASET, dapl);
+
+ /* Let's get space of the VDS and its dimension; we should get 32(or 20)x10x10 */
+ vspace = H5Dget_space (vdset);
+ H5Sget_simple_extent_dims (vspace, vdsdims_out, vdsdims_max_out);
+ printf ("VDS dimensions, bounds = H5D_VDS_M%s: ", i ? "AX" : "IN");
+ for (j=0; j<RANK; j++)
+ printf (" %d ", (int)vdsdims_out[j]);
+ printf ("\n");
+
+ /* Close */
+ status = H5Dclose (vdset);
+ status = H5Sclose (vspace);
+ }
+
+ status = H5Pclose (dapl);
+
+ vdset = H5Dopen (vfile, DATASET, H5P_DEFAULT);
/*
* Get creation property list and mapping properties.