/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by the Board of Trustees of the University of Illinois. * * 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 files COPYING and Copyright.html. COPYING can be found at the root * * of the source code distribution tree; Copyright.html can be found at the * * root level of an installed copy of the electronic HDF5 document set and * * is linked from the top-level documents page. It can also be found at * * http://hdf.ncsa.uiuc.edu/HDF5/doc/Copyright.html. If you do not have * * access to either file, you may request a copy from hdfhelp@ncsa.uiuc.edu. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* * This program shows the concept of "mounting files". * Program creates one file with group G in it, and another * file with dataset D. Then second file is mounted in the first one * under the "mounting point" G. Dataset D is accessed in the first file * under name /G/D and data is printed out. */ #include "hdf5.h" #define FILE1 "mount1.h5" #define FILE2 "mount2.h5" #define RANK 2 #define NX 4 #define NY 5 int main(void) { hid_t fid1, fid2, gid; /* Files and group identifiers */ hid_t did, tid, sid; /* Dataset and datatype identifiers */ herr_t status; hsize_t dims[] = {NX,NY}; /* Dataset dimensions */ int i, j; int bm[NX][NY], bm_out[NX][NY]; /* Data buffers */ /* * Initialization of buffer matrix "bm" */ for(i =0; i