diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2018-02-22 17:59:48 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2018-02-22 17:59:48 (GMT) |
commit | 9ea358d971ae45698dba6794583a39c4023085ad (patch) | |
tree | 27db01c7d98066d4f50e1e34b4c56e726baa880b /tools/src | |
parent | 9f2802f23cad8dd16f21b85c0dd9c97008a51f76 (diff) | |
parent | 76a0003f96f8e1336062089380adc95f8b3dee56 (diff) | |
download | hdf5-9ea358d971ae45698dba6794583a39c4023085ad.zip hdf5-9ea358d971ae45698dba6794583a39c4023085ad.tar.gz hdf5-9ea358d971ae45698dba6794583a39c4023085ad.tar.bz2 |
Merge pull request #904 in HDFFV/hdf5 from ~BYRN/hdf5_adb:develop to develop
* commit '76a0003f96f8e1336062089380adc95f8b3dee56':
HDFFV-10412 update test ref files
HDFFV-10412 fix typo
HDFFV-10412 moved check back into normal path
Diffstat (limited to 'tools/src')
-rw-r--r-- | tools/src/h5repack/h5repack_filters.c | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/tools/src/h5repack/h5repack_filters.c b/tools/src/h5repack/h5repack_filters.c index ae0bfd5..0092abc 100644 --- a/tools/src/h5repack/h5repack_filters.c +++ b/tools/src/h5repack/h5repack_filters.c @@ -280,25 +280,6 @@ int apply_filters(const char* name, /* object name from traverse list */ *has_filter = 1; if (H5Premove_filter(dcpl_id, H5Z_FILTER_ALL) < 0) HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Premove_filter failed"); - - /*------------------------------------------------------------------------- - * check if there is an existent chunk - * read it only if there is not a requested layout - *------------------------------------------------------------------------- - */ - if (obj.layout == -1) { - if ((layout = H5Pget_layout(dcpl_id)) < 0) - HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pget_layout failed"); - - if (layout == H5D_CHUNKED) { - if ((rank = H5Pget_chunk(dcpl_id, NELMTS(chsize), chsize/*out*/)) < 0) - HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pget_chunk failed"); - obj.layout = H5D_CHUNKED; - obj.chunk.rank = rank; - for (i = 0; i < rank; i++) - obj.chunk.chunk_lengths[i] = chsize[i]; - } - } } else if(nfilters) { *has_filter = 1; @@ -307,6 +288,25 @@ int apply_filters(const char* name, /* object name from traverse list */ } /*------------------------------------------------------------------------- + * check if there is an existent chunk + * read it only if there is not a requested layout + *------------------------------------------------------------------------- + */ + if (obj.layout == -1) { + if ((layout = H5Pget_layout(dcpl_id)) < 0) + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pget_layout failed"); + + if (layout == H5D_CHUNKED) { + if ((rank = H5Pget_chunk(dcpl_id, NELMTS(chsize), chsize/*out*/)) < 0) + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pget_chunk failed"); + obj.layout = H5D_CHUNKED; + obj.chunk.rank = rank; + for (i = 0; i < rank; i++) + obj.chunk.chunk_lengths[i] = chsize[i]; + } + } + + /*------------------------------------------------------------------------- * the type of filter and additional parameter * type can be one of the filters * H5Z_FILTER_NONE 0 , uncompress if compressed |