diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2004-06-14 20:40:02 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2004-06-14 20:40:02 (GMT) |
commit | d66de6e699fbd5176ce7e4142e1e2a1f6d83af3a (patch) | |
tree | 3d85045eb9629ddd0268bd1d9b26ed76f3a92aea /src/H5D.c | |
parent | 1b919a11dacb836c7bd335021fa7b28a5bb3fe09 (diff) | |
download | hdf5-d66de6e699fbd5176ce7e4142e1e2a1f6d83af3a.zip hdf5-d66de6e699fbd5176ce7e4142e1e2a1f6d83af3a.tar.gz hdf5-d66de6e699fbd5176ce7e4142e1e2a1f6d83af3a.tar.bz2 |
[svn-r8687] Purpose:
Code optimization
Description:
Eliminate memcpy() when using default DXPL by pointing at existing
default object, instead of copying it.
Platforms tested:
Solaris 2.7 (arabica)
FreeBSD 4.10 (sleipnir) w/parallel
Too minor to require h5committest
Diffstat (limited to 'src/H5D.c')
-rw-r--r-- | src/H5D.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -3753,18 +3753,19 @@ H5D_set_extent(H5D_t *dset, const hsize_t *size, hid_t dxpl_id) *------------------------------------------------------------------------- */ if(shrink && H5D_CHUNKED == dset->layout.type) { - H5D_dxpl_cache_t dxpl_cache; /* Cached data transfer properties */ + H5D_dxpl_cache_t _dxpl_cache; /* Data transfer property cache buffer */ + H5D_dxpl_cache_t *dxpl_cache=&_dxpl_cache; /* Data transfer property cache */ /* Fill the DXPL cache values for later use */ if (H5D_get_dxpl_cache(dxpl_id,&dxpl_cache)<0) HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't fill dxpl cache") /* Remove excess chunks */ - if(H5D_istore_prune_by_extent(dset->ent.file, &dxpl_cache, dxpl_id, dset) < 0) + if(H5D_istore_prune_by_extent(dset->ent.file, dxpl_cache, dxpl_id, dset) < 0) HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "unable to remove chunks ") /* Reset the elements outsize the new dimensions, but in existing chunks */ - if(H5D_istore_initialize_by_extent(dset->ent.file, &dxpl_cache, dxpl_id, dset) < 0) + if(H5D_istore_initialize_by_extent(dset->ent.file, dxpl_cache, dxpl_id, dset) < 0) HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "unable to initialize chunks ") } /* end if */ } /* end if */ |