diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2016-04-17 07:26:51 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2016-04-17 07:26:51 (GMT) |
commit | 36062736a5ca5729b5720982859398dfe7862394 (patch) | |
tree | ed9dc140502861a3f248c50e4e2d1d51f1145c1d /src/H5VMprivate.h | |
parent | ce8905cc906d6448b79eded0324a1e86b6e09bac (diff) | |
download | hdf5-36062736a5ca5729b5720982859398dfe7862394.zip hdf5-36062736a5ca5729b5720982859398dfe7862394.tar.gz hdf5-36062736a5ca5729b5720982859398dfe7862394.tar.bz2 |
[svn-r29722] Description:
Bring over more dataset tests from the revise_chunks branch.
Tested on:
MacOSX/64 10.11.4 (amazon) w/serial, parallel & production
(h5committest forthcoming)
Diffstat (limited to 'src/H5VMprivate.h')
-rw-r--r-- | src/H5VMprivate.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/H5VMprivate.h b/src/H5VMprivate.h index f402b36..cbe108a 100644 --- a/src/H5VMprivate.h +++ b/src/H5VMprivate.h @@ -65,6 +65,23 @@ typedef herr_t (*H5VM_opvv_func_t)(hsize_t dst_off, hsize_t src_off, } /* end if */ \ } +/* Given a coordinate offset array (COORDS) of type TYPE, move the value at + * offset 0 to offset of the unlimied dimension (UNLIM_DIM), sliding any + * intermediate values up one position. Undoes the "swizzle_coords" operation. + */ +#define H5VM_unswizzle_coords(TYPE,COORDS,UNLIM_DIM) { \ + /* COORDS must be an array of type TYPE */ \ + HDassert(sizeof(COORDS[0]) == sizeof(TYPE)); \ + \ + /* Nothing to do when unlimited dimension is at position 0 */ \ + if(0 != (UNLIM_DIM)) { \ + TYPE _tmp = (COORDS)[0]; \ + \ + HDmemmove(&(COORDS)[0], &(COORDS)[1], sizeof(TYPE) * (UNLIM_DIM)); \ + (COORDS)[UNLIM_DIM] = _tmp; \ + } /* end if */ \ +} + /* A null pointer is equivalent to a zero vector */ #define H5VM_ZERO NULL |