diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2004-06-13 01:01:46 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2004-06-13 01:01:46 (GMT) |
commit | 7dfe108b5329205732ab93f494e6287cc3090f21 (patch) | |
tree | 1c7906c6461cdd2fcc18ebb1ba29217a30c0b189 /src/H5D.c | |
parent | a3668504d93f7015661ad63c29190bceb2fd2fe4 (diff) | |
download | hdf5-7dfe108b5329205732ab93f494e6287cc3090f21.zip hdf5-7dfe108b5329205732ab93f494e6287cc3090f21.tar.gz hdf5-7dfe108b5329205732ab93f494e6287cc3090f21.tar.bz2 |
[svn-r8667] Purpose:
Code optimization
Description:
Restructure conversion loop of variable-length objects to avoid walking
through memory backwards and allocating as many temporary buffers. (This uses
the optimized method used in the atomic type conversions).
Also bring back another optimization for variable-length datatypes that
avoids querying the DXPL so many times.
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, 6 insertions, 1 deletions
@@ -3380,6 +3380,7 @@ done: herr_t H5Dvlen_reclaim(hid_t type_id, hid_t space_id, hid_t plist_id, void *buf) { + H5T_vlen_alloc_info_t vl_alloc_info; /* VL allocation info */ herr_t ret_value; FUNC_ENTER_API(H5Dvlen_reclaim, FAIL) @@ -3398,8 +3399,12 @@ H5Dvlen_reclaim(hid_t type_id, hid_t space_id, hid_t plist_id, void *buf) if (TRUE!=H5P_isa_class(plist_id,H5P_DATASET_XFER)) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not xfer parms") + /* Get the allocation info */ + if(H5T_vlen_get_alloc_info(plist_id,&vl_alloc_info)<0) + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTGET, FAIL, "unable to retrieve VL allocation info"); + /* Call H5Diterate with args, etc. */ - ret_value=H5Diterate(buf,type_id,space_id,H5T_vlen_reclaim,&plist_id); + ret_value=H5Diterate(buf,type_id,space_id,H5T_vlen_reclaim,&vl_alloc_info); done: FUNC_LEAVE_API(ret_value) |