diff options
author | Mohamad Chaarawi <chaarawi@hdfgroup.org> | 2016-02-07 15:37:33 (GMT) |
---|---|---|
committer | Mohamad Chaarawi <chaarawi@hdfgroup.org> | 2016-02-07 15:37:33 (GMT) |
commit | 48bebcc39ef565796356c159d16f09bfb0efba4d (patch) | |
tree | d571607d2e1003b4fb2d6a2294198f482c1929e1 /src/H5Pdxpl.c | |
parent | 66947641209890553871e69f4474b450ed502ae5 (diff) | |
download | hdf5-48bebcc39ef565796356c159d16f09bfb0efba4d.zip hdf5-48bebcc39ef565796356c159d16f09bfb0efba4d.tar.gz hdf5-48bebcc39ef565796356c159d16f09bfb0efba4d.tar.bz2 |
[svn-r29057] added dxpl type checking when debug mode is enabled (H5_DEBUG_BUILD)
tested on bb-8 with Serial and Parallel, debug and production builds.
Diffstat (limited to 'src/H5Pdxpl.c')
-rw-r--r-- | src/H5Pdxpl.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/src/H5Pdxpl.c b/src/H5Pdxpl.c index d56a52a..89dcd16 100644 --- a/src/H5Pdxpl.c +++ b/src/H5Pdxpl.c @@ -38,6 +38,7 @@ #include "H5ACprivate.h" /* Cache */ #include "H5Dprivate.h" /* Datasets */ #include "H5Eprivate.h" /* Error handling */ +#include "H5FDprivate.h" /* File drivers */ #include "H5Iprivate.h" /* IDs */ #include "H5MMprivate.h" /* Memory management */ #include "H5Ppkg.h" /* Property lists */ @@ -175,6 +176,11 @@ #define H5AC_XFER_RING_DEF H5AC_RING_US #define H5AC_XFER_RING_ENC H5P__encode_unsigned #define H5AC_XFER_RING_DEC H5P__decode_unsigned +#ifdef H5_DEBUG_BUILD +/* dxpl I/O type - private property */ +#define H5FD_DXPL_TYPE_SIZE sizeof(H5FD_dxpl_type_t) +#define H5FD_DXPL_TYPE_DEF H5FD_NOIO_DXPL +#endif /* H5_DEBUG_BUILD */ /******************/ /* Local Typedefs */ @@ -282,6 +288,9 @@ static const uint32_t H5D_def_direct_chunk_filters_g = H5D_XFER_DIRECT_CHUNK_WRI static const hsize_t *H5D_def_direct_chunk_offset_g = H5D_XFER_DIRECT_CHUNK_WRITE_OFFSET_DEF; /* Default value for the offset of direct chunk write */ static const uint32_t H5D_def_direct_chunk_datasize_g = H5D_XFER_DIRECT_CHUNK_WRITE_DATASIZE_DEF; /* Default value for the datasize of direct chunk write */ static const H5AC_ring_t H5D_ring_g = H5AC_XFER_RING_DEF; /* Default value for the cache entry ring type */ +#ifdef H5_DEBUG_BUILD +static const H5FD_dxpl_type_t H5D_dxpl_type_g = H5FD_NOIO_DXPL; /* Default value for the dxpl type */ +#endif /* H5_DEBUG_BUILD */ /*------------------------------------------------------------------------- @@ -476,11 +485,17 @@ H5P__dxfr_reg_prop(H5P_genclass_t *pclass) NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") - /* Register the data transform property */ + /* Register the ring property */ if(H5P_register_real(pclass, H5AC_RING_NAME, H5AC_XFER_RING_SIZE, &H5D_ring_g, NULL, NULL, NULL, H5AC_XFER_RING_ENC, H5AC_XFER_RING_DEC, NULL, NULL, NULL, NULL) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") +#ifdef H5_DEBUG_BUILD + /* Register the dxpl IO type property */ + if(H5P_register_real(pclass, H5FD_DXPL_TYPE_NAME, H5FD_DXPL_TYPE_SIZE, &H5D_dxpl_type_g, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) + HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") +#endif /* H5_DEBUG_BUILD */ done: FUNC_LEAVE_NOAPI(ret_value) |