Merge branch 'hdf5_1_10' of https://bitbucket.hdfgroup.org/scm/~jake.smith/hdf5 into dset_ohdr_minimize_110

This commit is contained in:
Jacob Smith
2019-01-04 09:05:26 -06:00
10 changed files with 1391 additions and 206 deletions

View File

@@ -1625,8 +1625,6 @@
# h5dump test files
./tools/testfiles/charsets.h5
./tools/testfiles/charsets.ddl
./tools/testfiles/err_attr_dspace.h5
./tools/testfiles/err_attr_dspace.ddl
./tools/testfiles/family_file00000.h5
./tools/testfiles/family_file00001.h5
./tools/testfiles/family_file00002.h5

View File

@@ -38,7 +38,7 @@ import org.junit.rules.TestName;
public class TestH5E {
@Rule public TestName testname = new TestName();
public static final int ERRSTACK_CNT = 4;
public static final int ERRSTACK_CNT = 3;
public static final int ERRSTACK_MTY_CNT = 0;
long hdf_java_classid = -1;

View File

@@ -29,7 +29,7 @@ import org.junit.rules.TestName;
public class TestH5Edefault {
@Rule public TestName testname = new TestName();
public static final int ERRSTACK_CNT = 4;
public static final int ERRSTACK_CNT = 3;
public static final int ERRSTACK_MTY_CNT = 0;
@Before

View File

@@ -1190,7 +1190,7 @@ done:
* Parameters:
* hid_t dset_id; IN: Chunked dataset ID
* hid_t fspace_id; IN: File dataspace ID
* hsize_t index; IN: Index of written chunk
* hsize_t chk_idx; IN: Index of allocated/written chunk
* hsize_t *offset OUT: Offset coordinates of the chunk
* unsigned *filter_mask OUT: Filter mask
* haddr_t *addr OUT: Address of the chunk
@@ -1204,14 +1204,14 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
H5Dget_chunk_info(hid_t dset_id, hid_t fspace_id, hsize_t index, hsize_t *offset, unsigned *filter_mask, haddr_t *addr, hsize_t *size)
H5Dget_chunk_info(hid_t dset_id, hid_t fspace_id, hsize_t chk_idx, hsize_t *offset, unsigned *filter_mask, haddr_t *addr, hsize_t *size)
{
H5D_t *dset = NULL;
const H5S_t *space; /* Dataspace for dataset */
herr_t ret_value = SUCCEED;
FUNC_ENTER_API(FAIL)
H5TRACE7("e", "iih*h*Iu*a*h", dset_id, fspace_id, index, offset, filter_mask,
H5TRACE7("e", "iih*h*Iu*a*h", dset_id, fspace_id, chk_idx, offset, filter_mask,
addr, size);
/* Check arguments */
@@ -1226,7 +1226,7 @@ H5Dget_chunk_info(hid_t dset_id, hid_t fspace_id, hsize_t index, hsize_t *offset
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a chunked dataset")
/* Call private function to get the chunk info given the chunk's index */
if(H5D__get_chunk_info(dset, space, index, offset, filter_mask, addr, size) < 0)
if(H5D__get_chunk_info(dset, space, chk_idx, offset, filter_mask, addr, size) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get chunk info")
done:
@@ -1242,7 +1242,7 @@ done:
*
* Parameters:
* hid_t dset_id IN: Chunked dataset ID
* hsize_t *offset IN: Coordinates of the chunk
* hsize_t *offset IN: Offset coordinates of the chunk
* unsigned *filter_mask OUT: Filter mask
* haddr_t *addr OUT: Address of the chunk
* hsize_t *size OUT: Size of the chunk

View File

@@ -242,7 +242,7 @@ H5D__none_idx_iterate(const H5D_chk_idx_info_t *idx_info,
unsigned u; /* Local index variable */
int curr_dim; /* Current rank */
hsize_t idx; /* Array index of chunk */
int ret_value = -1; /* Return value */
int ret_value = H5_ITER_CONT; /* Return value */
FUNC_ENTER_STATIC_NOERR
@@ -266,7 +266,7 @@ H5D__none_idx_iterate(const H5D_chk_idx_info_t *idx_info,
HDassert(ndims > 0);
/* Iterate over all the chunks in the dataset's dataspace */
for(u = 0; u < idx_info->layout->nchunks; u++) {
for(u = 0; u < idx_info->layout->nchunks && ret_value == H5_ITER_CONT; u++) {
/* Calculate the index of this chunk */
idx = H5VM_array_offset_pre(ndims, idx_info->layout->max_down_chunks, chunk_rec.scaled);

View File

@@ -565,7 +565,7 @@ H5_DLL herr_t H5D__get_storage_size(const H5D_t *dset, hsize_t *storage_size);
H5_DLL herr_t H5D__get_chunk_storage_size(H5D_t *dset, const hsize_t *offset,
hsize_t *storage_size);
H5_DLL herr_t H5D__get_num_chunks(const H5D_t *dset, const H5S_t *space, hsize_t *nchunks);
H5_DLL herr_t H5D__get_chunk_info(const H5D_t *dset, const H5S_t *space, hsize_t index, hsize_t *coord, unsigned *filter_mask, haddr_t *offset, hsize_t *size);
H5_DLL herr_t H5D__get_chunk_info(const H5D_t *dset, const H5S_t *space, hsize_t chk_idx, hsize_t *coord, unsigned *filter_mask, haddr_t *offset, hsize_t *size);
H5_DLL herr_t H5D__get_chunk_info_by_coord(const H5D_t *dset, const hsize_t *coord, unsigned *filter_mask, haddr_t *addr, hsize_t *size);
H5_DLL haddr_t H5D__get_offset(const H5D_t *dset);
H5_DLL void *H5D__vlen_get_buf_size_alloc(size_t size, void *info);

View File

@@ -143,7 +143,7 @@ H5_DLL hsize_t H5Dget_storage_size(hid_t dset_id);
H5_DLL herr_t H5Dget_chunk_storage_size(hid_t dset_id, const hsize_t *offset, hsize_t *chunk_bytes);
H5_DLL herr_t H5Dget_num_chunks(hid_t dset_id, hid_t fspace_id, hsize_t *nchunks);
H5_DLL herr_t H5Dget_chunk_info_by_coord(hid_t dset_id, const hsize_t *coord, unsigned *filter_mask, haddr_t *addr, hsize_t *size);
H5_DLL herr_t H5Dget_chunk_info(hid_t dset_id, hid_t fspace_id, hsize_t index, hsize_t *coord, unsigned *filter_mask, haddr_t *addr, hsize_t *size);
H5_DLL herr_t H5Dget_chunk_info(hid_t dset_id, hid_t fspace_id, hsize_t chk_idx, hsize_t *coord, unsigned *filter_mask, haddr_t *addr, hsize_t *size);
H5_DLL haddr_t H5Dget_offset(hid_t dset_id);
H5_DLL herr_t H5Dread(hid_t dset_id, hid_t mem_type_id, hid_t mem_space_id,
hid_t file_space_id, hid_t plist_id, void *buf/*out*/);

View File

@@ -986,23 +986,27 @@ END_FUNC(PRIV) /* end H5EA_delete() */
* Purpose: Iterate over the elements of an extensible array
* (copied and modified from FA_iterate() in H5FA.c)
*
* Return: SUCCEED/FAIL
* Return: H5_ITER_CONT/H5_ITER_ERROR
*
* Programmer: Vailin Choi; Feb 2015
*
* Modification:
* Prototype changed (HDFFV-10661)
* - herr_t to int
* - SUCCEED/FAIL to H5_ITER_CONT/H5_ITER_ERROR
* December 24, 2018 -BMR
*-------------------------------------------------------------------------
*/
BEGIN_FUNC(PRIV, ERR,
herr_t, SUCCEED, FAIL,
int, H5_ITER_CONT, H5_ITER_ERROR,
H5EA_iterate(H5EA_t *ea, H5EA_operator_t op, void *udata))
/* Local variables */
uint8_t *elmt = NULL;
hsize_t u;
int cb_ret = H5_ITER_CONT; /* Return value from callback */
/*
* Check arguments.
*/
/* Check arguments */
HDassert(ea);
HDassert(op);
HDassert(udata);
@@ -1012,9 +1016,7 @@ H5EA_iterate(H5EA_t *ea, H5EA_operator_t op, void *udata))
H5E_THROW(H5E_CANTALLOC, "memory allocation failed for extensible array element")
/* Iterate over all elements in array */
for(u = 0; u < ea->hdr->stats.stored.max_idx_set; u++) {
int cb_ret; /* Return value from callback */
for(u = 0; u < ea->hdr->stats.stored.max_idx_set && cb_ret == H5_ITER_CONT; u++) {
/* Get array element */
if(H5EA_get(ea, u, elmt) < 0)
H5E_THROW(H5E_CANTGET, "unable to delete fixed array")

View File

@@ -685,20 +685,26 @@ END_FUNC(PRIV) /* end H5FA_delete() */
* Note: This is not very efficient, we should be iterating directly
* over the fixed array's direct block [pages].
*
* Return: SUCCEED/FAIL
* Return: H5_ITER_CONT/H5_ITER_ERROR
*
* Programmer: Vailin Choi
* Thursday, April 30, 2009
*
* Modification:
* Prototype changed (HDFFV-10661)
* - herr_t to int
* - SUCCEED/FAIL to H5_ITER_CONT/H5_ITER_ERROR
* December 24, 2018 -BMR
*-------------------------------------------------------------------------
*/
BEGIN_FUNC(PRIV, ERR,
herr_t, SUCCEED, FAIL,
int, H5_ITER_CONT, H5_ITER_ERROR,
H5FA_iterate(H5FA_t *fa, H5FA_operator_t op, void *udata))
/* Local variables */
uint8_t *elmt = NULL;
hsize_t u;
int cb_ret = H5_ITER_CONT; /* Return value from callback */
/*
* Check arguments.
@@ -712,9 +718,7 @@ H5FA_iterate(H5FA_t *fa, H5FA_operator_t op, void *udata))
H5E_THROW(H5E_CANTALLOC, "memory allocation failed for fixed array element")
/* Iterate over all elements in array */
for(u = 0; u < fa->hdr->stats.nelmts; u++) {
int cb_ret; /* Return value from callback */
for(u = 0; u < fa->hdr->stats.nelmts && cb_ret == H5_ITER_CONT; u++) {
/* Get array element */
if(H5FA_get(fa, u, elmt) < 0)
H5E_THROW(H5E_CANTGET, "unable to delete fixed array")

File diff suppressed because it is too large Load Diff