summaryrefslogtreecommitdiffstats
path: root/src/H5Dchunk.c
diff options
context:
space:
mode:
authorJerome Soumagne <jsoumagne@hdfgroup.org>2019-07-16 16:15:43 (GMT)
committerJerome Soumagne <jsoumagne@hdfgroup.org>2019-10-08 20:19:21 (GMT)
commitdabdcf95593aa97185c83006f35a0849ea012450 (patch)
treed8e20aa27fb16271e9ef355694475ca2c4437ff5 /src/H5Dchunk.c
parente9570c198b7950dd7459cd005068d772b33c7fd4 (diff)
downloadhdf5-dabdcf95593aa97185c83006f35a0849ea012450.zip
hdf5-dabdcf95593aa97185c83006f35a0849ea012450.tar.gz
hdf5-dabdcf95593aa97185c83006f35a0849ea012450.tar.bz2
Add new H5R API that abstracts object, region and attribute reference types
Also support references to external files Add new H5T_REF type and type conversion routines Support conversion from H5T_REF_OBJ/DSET_REG to H5T_REF Add H5Treclaim() API to reclaim memory of vlen/reference types Deprecate H5Dvlen_reclaim() Fix H5T_vlen_reclaim() and H5T_reclaim() to use private callback Add H5T_ref_reclaim() Move previous H5R APIs to H5Rdeprec.c Clean up H5Ocopy Separate H5O_copy_expand_ref() to H5Ocopy_ref() Add support for copying new reference types Clean up deprecated routines to go through VOL and same code path Fix return codes in existing trefer.c test Rename trefer.c to trefer_deprec.c trefer.c is for new references Add performance test for trefer Add additional obj_copy_ref test Make use of tokens and blobs to store references Skip blob encoding for object references Start adding new reference examples
Diffstat (limited to 'src/H5Dchunk.c')
-rw-r--r--src/H5Dchunk.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/src/H5Dchunk.c b/src/H5Dchunk.c
index e3bbd59..7da05cb 100644
--- a/src/H5Dchunk.c
+++ b/src/H5Dchunk.c
@@ -5956,23 +5956,15 @@ H5D__chunk_copy_cb(const H5D_chunk_rec_t *chunk_rec, void *_udata)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, H5_ITER_ERROR, "datatype conversion failed")
/* Reclaim space from variable length data */
- if(H5D_vlen_reclaim(tid_mem, buf_space, reclaim_buf) < 0)
+ if(H5T_reclaim(tid_mem, buf_space, reclaim_buf) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_BADITER, H5_ITER_ERROR, "unable to reclaim variable-length data")
} /* end if */
else if(fix_ref) {
/* Check for expanding references */
/* (background buffer has already been zeroed out, if not expanding) */
if(udata->cpy_info->expand_ref) {
- size_t ref_count;
- size_t dt_size;
-
- /* Determine # of reference elements to copy */
- if((dt_size = H5T_get_size(udata->dt_src)) == 0)
- HGOTO_ERROR(H5E_DATASET, H5E_BADVALUE, FAIL, "size must not be 0")
- ref_count = nbytes / dt_size;
-
/* Copy the reference elements */
- if(H5O_copy_expand_ref(udata->file_src, buf, udata->idx_info_dst->f, bkg, ref_count, H5T_get_ref_type(udata->dt_src), udata->cpy_info) < 0)
+ if(H5O_copy_expand_ref(udata->file_src, udata->tid_src, udata->dt_src, buf, nbytes, udata->idx_info_dst->f, bkg, udata->cpy_info) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, H5_ITER_ERROR, "unable to copy reference attribute")
} /* end if */