2017-01-27 03:34:12 +08:00
|
|
|
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
|
|
|
* Copyright by The HDF Group. *
|
|
|
|
* 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 *
|
2017-04-18 03:32:16 +08:00
|
|
|
* 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. *
|
2017-01-27 03:34:12 +08:00
|
|
|
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
|
|
|
|
|
|
|
#ifndef VDS_SWMR_H
|
|
|
|
#define VDS_SWMR_H
|
|
|
|
|
|
|
|
#include <hdf5.h>
|
|
|
|
|
|
|
|
/* virtual dataset <---> source dataset mapping and sizes
|
|
|
|
|
|
|
|
***************** --+
|
|
|
|
* A * K
|
|
|
|
***************** --+
|
|
|
|
* * |
|
|
|
|
* B * N
|
|
|
|
* * |
|
|
|
|
***************** --+
|
|
|
|
* C *
|
|
|
|
*****************
|
|
|
|
* *
|
|
|
|
* D *
|
|
|
|
* *
|
|
|
|
*****************
|
|
|
|
* E *
|
|
|
|
*****************
|
|
|
|
* *
|
|
|
|
* F *
|
|
|
|
* *
|
|
|
|
*****************
|
|
|
|
|
|
|
|
| |
|
|
|
|
+-------M-------+
|
|
|
|
|
|
|
|
|
|
|
|
dim[0]
|
|
|
|
/
|
|
|
|
/
|
|
|
|
/
|
|
|
|
-----> dim[2]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
dim[1]
|
|
|
|
|
|
|
|
|
|
|
|
NOTE: This use case also checks for varying numbers of written planes.
|
|
|
|
Dataset A contains the full number of planes and each successive
|
|
|
|
dataset contains one fewer plane, down to the last dataset, which
|
|
|
|
contains zero planes. Each dataset is set to have an (unlimited
|
|
|
|
dimension) extent equal to the number of planes written, so the
|
|
|
|
"empty" regions will contain the VDS fill value.
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/* All datasets are 3D */
|
|
|
|
#define RANK 3
|
|
|
|
|
|
|
|
/* Lengths of string identifiers (file, dataset names, etc.) */
|
|
|
|
#define NAME_LEN 32
|
|
|
|
|
|
|
|
/* Compression level */
|
|
|
|
#define COMPRESSION_LEVEL 7
|
|
|
|
|
|
|
|
/* Number of source files */
|
|
|
|
#define N_SOURCES 6
|
|
|
|
|
|
|
|
/* Dataset dimensions */
|
|
|
|
#define SM_HEIGHT 2 /* K */
|
|
|
|
#define LG_HEIGHT 4 /* N */
|
|
|
|
#define FULL_HEIGHT 18 /* (3 * K) + (3 * N) */
|
|
|
|
#define WIDTH 8 /* M */
|
|
|
|
|
|
|
|
/* Number of planes each writer will write */
|
|
|
|
#define N_PLANES_TO_WRITE 25
|
|
|
|
|
|
|
|
/* Planes */
|
2019-11-28 01:26:02 +08:00
|
|
|
static hsize_t PLANES[N_SOURCES][RANK] = {
|
|
|
|
{1, SM_HEIGHT, WIDTH},
|
|
|
|
{1, LG_HEIGHT, WIDTH},
|
|
|
|
{1, SM_HEIGHT, WIDTH},
|
|
|
|
{1, LG_HEIGHT, WIDTH},
|
|
|
|
{1, SM_HEIGHT, WIDTH},
|
|
|
|
{1, LG_HEIGHT, WIDTH}
|
|
|
|
};
|
2017-01-27 03:34:12 +08:00
|
|
|
|
|
|
|
/* File names for source datasets */
|
2019-11-28 01:26:02 +08:00
|
|
|
static char FILE_NAMES[N_SOURCES][NAME_LEN] = {
|
|
|
|
{"vds_swmr_src_a.h5"},
|
|
|
|
{"vds_swmr_src_b.h5"},
|
|
|
|
{"vds_swmr_src_c.h5"},
|
|
|
|
{"vds_swmr_src_d.h5"},
|
|
|
|
{"vds_swmr_src_e.h5"},
|
|
|
|
{"vds_swmr_src_f.h5"}
|
|
|
|
};
|
2017-01-27 03:34:12 +08:00
|
|
|
|
|
|
|
/* VDS file name */
|
2019-11-28 01:26:02 +08:00
|
|
|
static char VDS_FILE_NAME[NAME_LEN] = "vds_swmr.h5";
|
2017-01-27 03:34:12 +08:00
|
|
|
|
|
|
|
/* Dataset names */
|
2019-11-28 01:26:02 +08:00
|
|
|
static char SOURCE_DSET_PATH[NAME_LEN] = "/source_dset";
|
|
|
|
static char VDS_DSET_NAME[NAME_LEN] = "vds_dset";
|
2017-01-27 03:34:12 +08:00
|
|
|
|
|
|
|
/* Fill values */
|
|
|
|
#endif /* VDS_SWMR_H */
|
|
|
|
|