summaryrefslogtreecommitdiffstats
path: root/src/H5D.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2004-06-14 20:39:08 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2004-06-14 20:39:08 (GMT)
commitfabb5167ba3afb1f32784d274df67f8b6195e5ea (patch)
treea8d00af71a6f9fd04127fbb42b930284765e1867 /src/H5D.c
parentef01629bb29800c8837a261b85897570e4c092c1 (diff)
downloadhdf5-fabb5167ba3afb1f32784d274df67f8b6195e5ea.zip
hdf5-fabb5167ba3afb1f32784d274df67f8b6195e5ea.tar.gz
hdf5-fabb5167ba3afb1f32784d274df67f8b6195e5ea.tar.bz2
[svn-r8686] 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.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/H5D.c b/src/H5D.c
index 8b7f69f..5ef0b4e 100644
--- a/src/H5D.c
+++ b/src/H5D.c
@@ -3852,18 +3852,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 */