summaryrefslogtreecommitdiffstats
path: root/examples/h5_vds.c
diff options
context:
space:
mode:
authorElena Pourmal <epourmal@hdfgroup.org>2015-03-02 21:32:27 (GMT)
committerElena Pourmal <epourmal@hdfgroup.org>2015-03-02 21:32:27 (GMT)
commita726992cd88fd43f8daa46e057618138ed310795 (patch)
tree966d7b6c9dd9231ef29c68ea7d48acfa7eefed0c /examples/h5_vds.c
parent45df14138dc66dc5f4995b5da7de99604ab2d09f (diff)
downloadhdf5-a726992cd88fd43f8daa46e057618138ed310795.zip
hdf5-a726992cd88fd43f8daa46e057618138ed310795.tar.gz
hdf5-a726992cd88fd43f8daa46e057618138ed310795.tar.bz2
[svn-r26342] Added usage of the new H5S*_regular_hyperslab functions.
Tested on jam.
Diffstat (limited to 'examples/h5_vds.c')
-rw-r--r--examples/h5_vds.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/examples/h5_vds.c b/examples/h5_vds.c
index dea2ee6..ed6fa55 100644
--- a/examples/h5_vds.c
+++ b/examples/h5_vds.c
@@ -53,6 +53,10 @@ main (void)
stride[2],
count[2],
block[2];
+ hsize_t start_out[2],
+ stride_out[2],
+ count_out[2],
+ block_out[2];
int wdata[DIM0], /* Write buffer for source dataset */
rdata[VDSDIM0][VDSDIM1], /* Read buffer for virtual dataset */
i, j, k, l;
@@ -183,6 +187,14 @@ main (void)
printf("%d,", (int)buf[RANK2+k]);
printf("%d)\n", (int)buf[RANK2+k]);
}
+ /* We also can use new APIs to get start, stride, count and block */
+ if (H5Sis_regular_hyperslab(vspace)) {
+ status = H5Sget_regular_hyperslab (vspace, start_out, stride_out, count_out, block_out);
+ printf("start = [%d, %d] \n", (int)start_out[0], (int)start_out[1]);
+ printf("stride = [%d, %d] \n", (int)stride_out[0], (int)stride_out[1]);
+ printf("count = [%d, %d] \n", (int)count_out[0], (int)count_out[1]);
+ printf("block = [%d, %d] \n", (int)block_out[0], (int)block_out[1]);
+ }
}
/* Get source file name. */
len = H5Pget_virtual_filename (dcpl, (size_t)i, NULL, 0);