diff options
author | Jerome Soumagne <jsoumagne@hdfgroup.org> | 2019-07-16 16:15:43 (GMT) |
---|---|---|
committer | Jerome Soumagne <jsoumagne@hdfgroup.org> | 2019-10-08 20:19:21 (GMT) |
commit | dabdcf95593aa97185c83006f35a0849ea012450 (patch) | |
tree | d8e20aa27fb16271e9ef355694475ca2c4437ff5 /src/H5Dcompact.c | |
parent | e9570c198b7950dd7459cd005068d772b33c7fd4 (diff) | |
download | hdf5-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/H5Dcompact.c')
-rw-r--r-- | src/H5Dcompact.c | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/src/H5Dcompact.c b/src/H5Dcompact.c index 29401f8..edad3c5 100644 --- a/src/H5Dcompact.c +++ b/src/H5Dcompact.c @@ -551,26 +551,16 @@ H5D__compact_copy(H5F_t *f_src, H5O_storage_compact_t *_storage_src, H5F_t *f_ds H5MM_memcpy(storage_dst->buf, buf, storage_dst->size); - 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, FAIL, "unable to reclaim variable-length data") } /* end if */ else if(H5T_get_class(dt_src, FALSE) == H5T_REFERENCE) { if(f_src != f_dst) { /* Check for expanding references */ if(cpy_info->expand_ref) { - size_t ref_count; - size_t src_dt_size; /* Source datatype size */ - - /* Determine largest datatype size */ - if(0 == (src_dt_size = H5T_get_size(dt_src))) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to determine datatype size") - - /* Determine # of reference elements to copy */ - ref_count = storage_src->size / src_dt_size; - /* Copy objects referenced in source buffer to destination file and set destination elements */ - if(H5O_copy_expand_ref(f_src, storage_src->buf, f_dst, - storage_dst->buf, ref_count, H5T_get_ref_type(dt_src), cpy_info) < 0) + if (H5O_copy_expand_ref(f_src, tid_src, dt_src, storage_src->buf, + storage_src->size, f_dst, storage_dst->buf, cpy_info) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "unable to copy reference attribute") } /* end if */ else |