Source
ssize_t len; /* Length of the string; also a return value */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
* distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/************************************************************
This example illustrates the concept of virtual dataset I/O
The program creates 2-dim source dataset and writes
data to it. Then it creates 2-dim virtual dataset that has
the same dimension sizes and maps the all elements of the
virtual dataset to all elements of the source dataset.
Then VDS is read back.
This file is intended for use with HDF5 Library version 1.10
************************************************************/
/* EIP Add link to the picture */
int
main (void)
{
hid_t file, space, src_space, vspace, dset; /* Handles */
hid_t dcpl;
herr_t status;
hsize_t vdsdims[2] = {DIM0, DIM1}, /* Virtual dataset dimension */
dims[2] = {DIM0, DIM1}; /* Source dataset dimensions */
int wdata[DIM0][DIM1], /* Write buffer for source dataset */
rdata[DIM0][DIM1], /* Read buffer for virtual dataset */
i, j;
H5D_layout_t layout; /* Storage layout */