diff options
author | Quincey Koziol <koziol@lbl.gov> | 2020-06-06 15:06:15 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@lbl.gov> | 2020-06-06 15:06:15 (GMT) |
commit | 1030a7ac9a2a77e03f6fc496ccc88b8bceae203a (patch) | |
tree | bd85b20c1bccf4e2edc01174bb29c7493174dd38 | |
parent | 83385326ef1588167f2b37300313a6e51e51ffca (diff) | |
parent | 20a8edb705773e6c44d67b952a3dec0a5e0d2c09 (diff) | |
download | hdf5-1030a7ac9a2a77e03f6fc496ccc88b8bceae203a.zip hdf5-1030a7ac9a2a77e03f6fc496ccc88b8bceae203a.tar.gz hdf5-1030a7ac9a2a77e03f6fc496ccc88b8bceae203a.tar.bz2 |
Merge pull request #2627 in HDFFV/hdf5 from hdf5_1_12_h5do_opt to hdf5_1_12
* commit '20a8edb705773e6c44d67b952a3dec0a5e0d2c09':
Add note about H5DOappend() optimization.
Eliminate unneccesary creation of DXPL
-rw-r--r-- | hl/src/H5DO.c | 17 | ||||
-rw-r--r-- | release_docs/RELEASE.txt | 6 |
2 files changed, 9 insertions, 14 deletions
diff --git a/hl/src/H5DO.c b/hl/src/H5DO.c index 0fbdab3..66997cb 100644 --- a/hl/src/H5DO.c +++ b/hl/src/H5DO.c @@ -106,7 +106,6 @@ herr_t H5DOappend(hid_t dset_id, hid_t dxpl_id, unsigned axis, size_t extension, hid_t memtype, const void *buf) { - hbool_t created_dxpl = FALSE; /* Whether we created a DXPL */ hsize_t size[H5S_MAX_RANK]; /* The new size (after extension */ hsize_t old_size = 0; /* The size of the dimension to be extended */ int sndims; /* Number of dimensions in dataspace (signed) */ @@ -135,14 +134,10 @@ H5DOappend(hid_t dset_id, hid_t dxpl_id, unsigned axis, size_t extension, if(H5I_DATASET != H5Iget_type(dset_id)) goto done; - /* If the user passed in a default DXPL, create one to pass to H5Dwrite() */ - if(H5P_DEFAULT == dxpl_id) { - if((dxpl_id = H5Pcreate(H5P_DATASET_XFER)) < 0) + /* If the user passed in a default DXPL, sanity check it */ + if(H5P_DEFAULT != dxpl_id) + if(TRUE != H5Pisa_class(dxpl_id, H5P_DATASET_XFER)) goto done; - created_dxpl = TRUE; - } /* end if */ - else if(TRUE != H5Pisa_class(dxpl_id, H5P_DATASET_XFER)) - goto done; /* Get the dataspace of the dataset */ if(FAIL == (space_id = H5Dget_space(dset_id))) @@ -240,12 +235,6 @@ H5DOappend(hid_t dset_id, hid_t dxpl_id, unsigned axis, size_t extension, ret_value = SUCCEED; done: - /* Close dxpl if we created it vs. one was passed in */ - if(created_dxpl) { - if(H5Pclose(dxpl_id) < 0) - ret_value = FAIL; - } /* end if */ - /* Close old dataspace */ if(space_id != FAIL && H5Sclose(space_id) < 0) ret_value = FAIL; diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index 5ecb8b6..a7f585a 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -128,6 +128,12 @@ Bug Fixes since HDF5-1.12.0 release (MSB - 2020/02/28, HDFFV-11033) + High-Level Library + ------------------ + - Eliminated unnecessary code in H5DOappend(), improving its performance. + + (QAK - 2020/06/05) + Supported Platforms |