summaryrefslogtreecommitdiffstats
path: root/src/H5Dlayout.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2016-04-02 09:39:32 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2016-04-02 09:39:32 (GMT)
commit9d2178ab886ae957cfe11b6fe09f9e7f0e9ce369 (patch)
treed4256c01e3f5364ca39ec230a6a897d16f51273d /src/H5Dlayout.c
parente45885dea912a18b9fd6b1450d3ff196dcb749eb (diff)
downloadhdf5-9d2178ab886ae957cfe11b6fe09f9e7f0e9ce369.zip
hdf5-9d2178ab886ae957cfe11b6fe09f9e7f0e9ce369.tar.gz
hdf5-9d2178ab886ae957cfe11b6fe09f9e7f0e9ce369.tar.bz2
[svn-r29607] Description:
Bring "don't filter partial edge chunks" capability from revise_chunks to trunk. Tested on: MacOSX/64 10.11.4 (amazon) w/debug, production & parallel (h5committest forthcoming)
Diffstat (limited to 'src/H5Dlayout.c')
-rw-r--r--src/H5Dlayout.c34
1 files changed, 27 insertions, 7 deletions
diff --git a/src/H5Dlayout.c b/src/H5Dlayout.c
index bbaa9c5..19b1c95 100644
--- a/src/H5Dlayout.c
+++ b/src/H5Dlayout.c
@@ -164,15 +164,35 @@ H5D__layout_meta_size(const H5F_t *f, const H5O_layout_t *layout, hbool_t includ
break;
case H5D_CHUNKED:
- /* Number of dimensions (1 byte) */
- HDassert(layout->u.chunk.ndims > 0 && layout->u.chunk.ndims <= H5O_LAYOUT_NDIMS);
- ret_value++;
+ if(layout->version < H5O_LAYOUT_VERSION_4) {
+ /* Number of dimensions (1 byte) */
+ HDassert(layout->u.chunk.ndims > 0 && layout->u.chunk.ndims <= H5O_LAYOUT_NDIMS);
+ ret_value++;
- /* Dimension sizes */
- ret_value += layout->u.chunk.ndims * 4;
+ /* B-tree address */
+ ret_value += H5F_SIZEOF_ADDR(f); /* Address of data */
- /* B-tree address */
- ret_value += H5F_SIZEOF_ADDR(f); /* Address of data */
+ /* Dimension sizes */
+ ret_value += layout->u.chunk.ndims * 4;
+ } /* end if */
+ else {
+ /* Chunked layout feature flags */
+ ret_value++;
+
+ /* Number of dimensions (1 byte) */
+ HDassert(layout->u.chunk.ndims > 0 && layout->u.chunk.ndims <= H5O_LAYOUT_NDIMS);
+ ret_value++;
+
+ /* Encoded # of bytes for each chunk dimension */
+ HDassert(layout->u.chunk.enc_bytes_per_dim > 0 && layout->u.chunk.enc_bytes_per_dim <= 8);
+ ret_value++;
+
+ /* Dimension sizes */
+ ret_value += layout->u.chunk.ndims * layout->u.chunk.enc_bytes_per_dim;
+
+ /* B-tree address */
+ ret_value += H5F_SIZEOF_ADDR(f); /* Address of data */
+ } /* end else */
break;
case H5D_VIRTUAL: