mirror of
https://github.com/HDFGroup/hdf5.git
synced 2025-04-12 17:31:09 +08:00
[svn-r22287] Description:
Clean up more FUNC_ENTER/FUNC_LEAVE macros and move H5D & H5T code toward the final design (as exemplified by the H5EA & H5FA code). Tested on: Mac OSX/64 10.7.3 (amazon) w/debug & parallel
This commit is contained in:
parent
bdb6e538ac
commit
a07c8f9247
35
src/H5D.c
35
src/H5D.c
@ -20,7 +20,7 @@
|
||||
#define H5D_PACKAGE /*suppress error about including H5Dpkg */
|
||||
|
||||
/* Interface initialization */
|
||||
#define H5_INTERFACE_INIT_FUNC H5D_init_pub_interface
|
||||
#define H5_INTERFACE_INIT_FUNC H5D__init_pub_interface
|
||||
|
||||
|
||||
/***********/
|
||||
@ -47,6 +47,8 @@
|
||||
/* Local Prototypes */
|
||||
/********************/
|
||||
|
||||
static herr_t H5D__init_pub_interface(void);
|
||||
|
||||
|
||||
/*********************/
|
||||
/* Package Variables */
|
||||
@ -75,9 +77,9 @@ H5FL_BLK_EXTERN(type_conv);
|
||||
|
||||
/*--------------------------------------------------------------------------
|
||||
NAME
|
||||
H5D_init_pub_interface -- Initialize interface-specific information
|
||||
H5D__init_pub_interface -- Initialize interface-specific information
|
||||
USAGE
|
||||
herr_t H5D_init_pub_interface()
|
||||
herr_t H5D__init_pub_interface()
|
||||
RETURNS
|
||||
Non-negative on success/Negative on failure
|
||||
DESCRIPTION
|
||||
@ -86,12 +88,12 @@ DESCRIPTION
|
||||
|
||||
--------------------------------------------------------------------------*/
|
||||
static herr_t
|
||||
H5D_init_pub_interface(void)
|
||||
H5D__init_pub_interface(void)
|
||||
{
|
||||
FUNC_ENTER_NOAPI_NOINIT
|
||||
FUNC_ENTER_STATIC_NOERR
|
||||
|
||||
FUNC_LEAVE_NOAPI(H5D_init())
|
||||
} /* H5D_init_pub_interface() */
|
||||
} /* H5D__init_pub_interface() */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
@ -248,7 +250,7 @@ H5Dcreate_anon(hid_t loc_id, hid_t type_id, hid_t space_id, hid_t dcpl_id,
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not dataset access property list")
|
||||
|
||||
/* build and open the new dataset */
|
||||
if(NULL == (dset = H5D_create(loc.oloc->file, type_id, space, dcpl_id, dapl_id, H5AC_dxpl_id)))
|
||||
if(NULL == (dset = H5D__create(loc.oloc->file, type_id, space, dcpl_id, dapl_id, H5AC_dxpl_id)))
|
||||
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to create dataset")
|
||||
|
||||
/* Register the new dataset to get an ID for it */
|
||||
@ -484,7 +486,7 @@ H5Dget_space_status(hid_t dset_id, H5D_space_status_t *allocation)
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataset")
|
||||
|
||||
/* Read data space address and return */
|
||||
if(FAIL==(ret_value=H5D_get_space_status(dset, allocation, H5AC_ind_dxpl_id)))
|
||||
if(H5D__get_space_status(dset, allocation, H5AC_ind_dxpl_id) < 0)
|
||||
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to get space status")
|
||||
|
||||
done:
|
||||
@ -786,7 +788,8 @@ H5Dget_storage_size(hid_t dset_id)
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, 0, "not a dataset")
|
||||
|
||||
/* Set return value */
|
||||
ret_value = H5D_get_storage_size(dset, H5AC_ind_dxpl_id);
|
||||
if(H5D__get_storage_size(dset, H5AC_ind_dxpl_id, &ret_value) < 0)
|
||||
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, 0, "can't get size of dataset's storage")
|
||||
|
||||
done:
|
||||
FUNC_LEAVE_API(ret_value)
|
||||
@ -821,7 +824,9 @@ H5Dget_offset(hid_t dset_id)
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, HADDR_UNDEF, "not a dataset")
|
||||
|
||||
/* Set return value */
|
||||
ret_value = H5D_get_offset(dset);
|
||||
ret_value = H5D__get_offset(dset);
|
||||
if(!H5F_addr_defined(ret_value))
|
||||
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, HADDR_UNDEF, "unable to get space status")
|
||||
|
||||
done:
|
||||
FUNC_LEAVE_API(ret_value)
|
||||
@ -909,7 +914,7 @@ H5Diterate(void *buf, hid_t type_id, hid_t space_id, H5D_operator_t op,
|
||||
if(!(H5S_has_extent(space)))
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "dataspace does not have extent set")
|
||||
|
||||
ret_value = H5D_iterate(buf, type_id, space, op, operator_data);
|
||||
ret_value = H5D__iterate(buf, type_id, space, op, operator_data);
|
||||
|
||||
done:
|
||||
FUNC_LEAVE_API(ret_value)
|
||||
@ -1040,14 +1045,14 @@ H5Dvlen_get_buf_size(hid_t dataset_id, hid_t type_id, hid_t space_id,
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataset transfer property list")
|
||||
|
||||
/* Set the memory manager to the special allocation routine */
|
||||
if(H5P_set_vlen_mem_manager(plist, H5D_vlen_get_buf_size_alloc, &vlen_bufsize, NULL, NULL) < 0)
|
||||
if(H5P_set_vlen_mem_manager(plist, H5D__vlen_get_buf_size_alloc, &vlen_bufsize, NULL, NULL) < 0)
|
||||
HGOTO_ERROR(H5E_PLIST, H5E_CANTINIT, FAIL, "can't set VL data allocation routine")
|
||||
|
||||
/* Set the initial number of bytes required */
|
||||
vlen_bufsize.size = 0;
|
||||
|
||||
/* Call H5D_iterate with args, etc. */
|
||||
ret_value = H5D_iterate(&bogus, type_id, space, H5D_vlen_get_buf_size, &vlen_bufsize);
|
||||
/* Call H5D__iterate with args, etc. */
|
||||
ret_value = H5D__iterate(&bogus, type_id, space, H5D__vlen_get_buf_size, &vlen_bufsize);
|
||||
|
||||
/* Get the size if we succeeded */
|
||||
if(ret_value >= 0)
|
||||
@ -1098,7 +1103,7 @@ H5Dset_extent(hid_t dset_id, const hsize_t size[])
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no size specified")
|
||||
|
||||
/* Private function */
|
||||
if(H5D_set_extent(dset, size, H5AC_dxpl_id) < 0)
|
||||
if(H5D__set_extent(dset, size, H5AC_dxpl_id) < 0)
|
||||
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to set extend dataset")
|
||||
|
||||
done:
|
||||
|
326
src/H5Dbtree.c
326
src/H5Dbtree.c
@ -97,58 +97,58 @@ typedef struct H5D_btree_dbg_t {
|
||||
/* Local Prototypes */
|
||||
/********************/
|
||||
|
||||
static herr_t H5D_btree_shared_create(const H5F_t *f, H5O_storage_chunk_t *store,
|
||||
static herr_t H5D__btree_shared_create(const H5F_t *f, H5O_storage_chunk_t *store,
|
||||
unsigned ndims);
|
||||
|
||||
/* B-tree iterator callbacks */
|
||||
static int H5D_btree_idx_iterate_cb(H5F_t *f, hid_t dxpl_id, const void *left_key,
|
||||
static int H5D__btree_idx_iterate_cb(H5F_t *f, hid_t dxpl_id, const void *left_key,
|
||||
haddr_t addr, const void *right_key, void *_udata);
|
||||
|
||||
/* B-tree callbacks */
|
||||
static H5RC_t *H5D_btree_get_shared(const H5F_t *f, const void *_udata);
|
||||
static herr_t H5D_btree_new_node(H5F_t *f, hid_t dxpl_id, H5B_ins_t, void *_lt_key,
|
||||
static H5RC_t *H5D__btree_get_shared(const H5F_t *f, const void *_udata);
|
||||
static herr_t H5D__btree_new_node(H5F_t *f, hid_t dxpl_id, H5B_ins_t, void *_lt_key,
|
||||
void *_udata, void *_rt_key, haddr_t *addr_p /*out*/);
|
||||
static int H5D_btree_cmp2(void *_lt_key, void *_udata, void *_rt_key);
|
||||
static int H5D_btree_cmp3(void *_lt_key, void *_udata, void *_rt_key);
|
||||
static htri_t H5D_btree_found(H5F_t *f, hid_t dxpl_id, haddr_t addr,
|
||||
static int H5D__btree_cmp2(void *_lt_key, void *_udata, void *_rt_key);
|
||||
static int H5D__btree_cmp3(void *_lt_key, void *_udata, void *_rt_key);
|
||||
static htri_t H5D__btree_found(H5F_t *f, hid_t dxpl_id, haddr_t addr,
|
||||
const void *_lt_key, void *_udata);
|
||||
static H5B_ins_t H5D_btree_insert(H5F_t *f, hid_t dxpl_id, haddr_t addr,
|
||||
static H5B_ins_t H5D__btree_insert(H5F_t *f, hid_t dxpl_id, haddr_t addr,
|
||||
void *_lt_key, hbool_t *lt_key_changed, void *_md_key, void *_udata,
|
||||
void *_rt_key, hbool_t *rt_key_changed, haddr_t *new_node/*out*/);
|
||||
static H5B_ins_t H5D_btree_remove( H5F_t *f, hid_t dxpl_id, haddr_t addr,
|
||||
static H5B_ins_t H5D__btree_remove( H5F_t *f, hid_t dxpl_id, haddr_t addr,
|
||||
void *_lt_key, hbool_t *lt_key_changed, void *_udata, void *_rt_key,
|
||||
hbool_t *rt_key_changed);
|
||||
static herr_t H5D_btree_decode_key(const H5B_shared_t *shared, const uint8_t *raw,
|
||||
static herr_t H5D__btree_decode_key(const H5B_shared_t *shared, const uint8_t *raw,
|
||||
void *_key);
|
||||
static herr_t H5D_btree_encode_key(const H5B_shared_t *shared, uint8_t *raw,
|
||||
static herr_t H5D__btree_encode_key(const H5B_shared_t *shared, uint8_t *raw,
|
||||
const void *_key);
|
||||
static herr_t H5D_btree_debug_key(FILE *stream, int indent, int fwidth,
|
||||
static herr_t H5D__btree_debug_key(FILE *stream, int indent, int fwidth,
|
||||
const void *key, const void *udata);
|
||||
|
||||
/* Chunked layout indexing callbacks */
|
||||
static herr_t H5D_btree_idx_init(const H5D_chk_idx_info_t *idx_info,
|
||||
static herr_t H5D__btree_idx_init(const H5D_chk_idx_info_t *idx_info,
|
||||
const H5S_t *space, haddr_t dset_ohdr_addr);
|
||||
static herr_t H5D_btree_idx_create(const H5D_chk_idx_info_t *idx_info);
|
||||
static hbool_t H5D_btree_idx_is_space_alloc(const H5O_storage_chunk_t *storage);
|
||||
static herr_t H5D_btree_idx_insert(const H5D_chk_idx_info_t *idx_info,
|
||||
static herr_t H5D__btree_idx_create(const H5D_chk_idx_info_t *idx_info);
|
||||
static hbool_t H5D__btree_idx_is_space_alloc(const H5O_storage_chunk_t *storage);
|
||||
static herr_t H5D__btree_idx_insert(const H5D_chk_idx_info_t *idx_info,
|
||||
H5D_chunk_ud_t *udata);
|
||||
static herr_t H5D_btree_idx_get_addr(const H5D_chk_idx_info_t *idx_info,
|
||||
static herr_t H5D__btree_idx_get_addr(const H5D_chk_idx_info_t *idx_info,
|
||||
H5D_chunk_ud_t *udata);
|
||||
static int H5D_btree_idx_iterate(const H5D_chk_idx_info_t *idx_info,
|
||||
static int H5D__btree_idx_iterate(const H5D_chk_idx_info_t *idx_info,
|
||||
H5D_chunk_cb_func_t chunk_cb, void *chunk_udata);
|
||||
static herr_t H5D_btree_idx_remove(const H5D_chk_idx_info_t *idx_info,
|
||||
static herr_t H5D__btree_idx_remove(const H5D_chk_idx_info_t *idx_info,
|
||||
H5D_chunk_common_ud_t *udata);
|
||||
static herr_t H5D_btree_idx_delete(const H5D_chk_idx_info_t *idx_info);
|
||||
static herr_t H5D_btree_idx_copy_setup(const H5D_chk_idx_info_t *idx_info_src,
|
||||
static herr_t H5D__btree_idx_delete(const H5D_chk_idx_info_t *idx_info);
|
||||
static herr_t H5D__btree_idx_copy_setup(const H5D_chk_idx_info_t *idx_info_src,
|
||||
const H5D_chk_idx_info_t *idx_info_dst);
|
||||
static herr_t H5D_btree_idx_copy_shutdown(H5O_storage_chunk_t *storage_src,
|
||||
static herr_t H5D__btree_idx_copy_shutdown(H5O_storage_chunk_t *storage_src,
|
||||
H5O_storage_chunk_t *storage_dst, hid_t dxpl_id);
|
||||
static herr_t H5D_btree_idx_size(const H5D_chk_idx_info_t *idx_info,
|
||||
static herr_t H5D__btree_idx_size(const H5D_chk_idx_info_t *idx_info,
|
||||
hsize_t *size);
|
||||
static herr_t H5D_btree_idx_reset(H5O_storage_chunk_t *storage, hbool_t reset_addr);
|
||||
static herr_t H5D_btree_idx_dump(const H5O_storage_chunk_t *storage,
|
||||
static herr_t H5D__btree_idx_reset(H5O_storage_chunk_t *storage, hbool_t reset_addr);
|
||||
static herr_t H5D__btree_idx_dump(const H5O_storage_chunk_t *storage,
|
||||
FILE *stream);
|
||||
static herr_t H5D_btree_idx_dest(const H5D_chk_idx_info_t *idx_info);
|
||||
static herr_t H5D__btree_idx_dest(const H5D_chk_idx_info_t *idx_info);
|
||||
|
||||
|
||||
/*********************/
|
||||
@ -157,21 +157,21 @@ static herr_t H5D_btree_idx_dest(const H5D_chk_idx_info_t *idx_info);
|
||||
|
||||
/* v1 B-tree indexed chunk I/O ops */
|
||||
const H5D_chunk_ops_t H5D_COPS_BTREE[1] = {{
|
||||
H5D_btree_idx_init,
|
||||
H5D_btree_idx_create,
|
||||
H5D_btree_idx_is_space_alloc,
|
||||
H5D_btree_idx_insert,
|
||||
H5D_btree_idx_get_addr,
|
||||
H5D__btree_idx_init,
|
||||
H5D__btree_idx_create,
|
||||
H5D__btree_idx_is_space_alloc,
|
||||
H5D__btree_idx_insert,
|
||||
H5D__btree_idx_get_addr,
|
||||
NULL,
|
||||
H5D_btree_idx_iterate,
|
||||
H5D_btree_idx_remove,
|
||||
H5D_btree_idx_delete,
|
||||
H5D_btree_idx_copy_setup,
|
||||
H5D_btree_idx_copy_shutdown,
|
||||
H5D_btree_idx_size,
|
||||
H5D_btree_idx_reset,
|
||||
H5D_btree_idx_dump,
|
||||
H5D_btree_idx_dest
|
||||
H5D__btree_idx_iterate,
|
||||
H5D__btree_idx_remove,
|
||||
H5D__btree_idx_delete,
|
||||
H5D__btree_idx_copy_setup,
|
||||
H5D__btree_idx_copy_shutdown,
|
||||
H5D__btree_idx_size,
|
||||
H5D__btree_idx_reset,
|
||||
H5D__btree_idx_dump,
|
||||
H5D__btree_idx_dest
|
||||
}};
|
||||
|
||||
|
||||
@ -183,19 +183,19 @@ const H5D_chunk_ops_t H5D_COPS_BTREE[1] = {{
|
||||
H5B_class_t H5B_BTREE[1] = {{
|
||||
H5B_CHUNK_ID, /*id */
|
||||
sizeof(H5D_btree_key_t), /*sizeof_nkey */
|
||||
H5D_btree_get_shared, /*get_shared */
|
||||
H5D_btree_new_node, /*new */
|
||||
H5D_btree_cmp2, /*cmp2 */
|
||||
H5D_btree_cmp3, /*cmp3 */
|
||||
H5D_btree_found, /*found */
|
||||
H5D_btree_insert, /*insert */
|
||||
H5D__btree_get_shared, /*get_shared */
|
||||
H5D__btree_new_node, /*new */
|
||||
H5D__btree_cmp2, /*cmp2 */
|
||||
H5D__btree_cmp3, /*cmp3 */
|
||||
H5D__btree_found, /*found */
|
||||
H5D__btree_insert, /*insert */
|
||||
FALSE, /*follow min branch? */
|
||||
FALSE, /*follow max branch? */
|
||||
H5B_LEFT, /*critical key */
|
||||
H5D_btree_remove, /*remove */
|
||||
H5D_btree_decode_key, /*decode */
|
||||
H5D_btree_encode_key, /*encode */
|
||||
H5D_btree_debug_key, /*debug */
|
||||
H5D__btree_remove, /*remove */
|
||||
H5D__btree_decode_key, /*decode */
|
||||
H5D__btree_encode_key, /*encode */
|
||||
H5D__btree_debug_key, /*debug */
|
||||
}};
|
||||
|
||||
|
||||
@ -205,7 +205,7 @@ H5B_class_t H5B_BTREE[1] = {{
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5D_btree_get_shared
|
||||
* Function: H5D__btree_get_shared
|
||||
*
|
||||
* Purpose: Returns the shared B-tree info for the specified UDATA.
|
||||
*
|
||||
@ -220,11 +220,11 @@ H5B_class_t H5B_BTREE[1] = {{
|
||||
*/
|
||||
/* ARGSUSED */
|
||||
static H5RC_t *
|
||||
H5D_btree_get_shared(const H5F_t UNUSED *f, const void *_udata)
|
||||
H5D__btree_get_shared(const H5F_t UNUSED *f, const void *_udata)
|
||||
{
|
||||
const H5D_chunk_common_ud_t *udata = (const H5D_chunk_common_ud_t *) _udata;
|
||||
|
||||
FUNC_ENTER_NOAPI_NOINIT_NOERR
|
||||
FUNC_ENTER_STATIC_NOERR
|
||||
|
||||
HDassert(udata);
|
||||
HDassert(udata->storage);
|
||||
@ -233,11 +233,11 @@ H5D_btree_get_shared(const H5F_t UNUSED *f, const void *_udata)
|
||||
|
||||
/* Return the pointer to the ref-count object */
|
||||
FUNC_LEAVE_NOAPI(udata->storage->u.btree.shared)
|
||||
} /* end H5D_btree_get_shared() */
|
||||
} /* end H5D__btree_get_shared() */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5D_btree_new_node
|
||||
* Function: H5D__btree_new_node
|
||||
*
|
||||
* Purpose: Adds a new entry to an i-storage B-tree. We can assume that
|
||||
* the domain represented by UDATA doesn't intersect the domain
|
||||
@ -255,7 +255,7 @@ H5D_btree_get_shared(const H5F_t UNUSED *f, const void *_udata)
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
static herr_t
|
||||
H5D_btree_new_node(H5F_t *f, hid_t dxpl_id, H5B_ins_t op,
|
||||
H5D__btree_new_node(H5F_t *f, hid_t dxpl_id, H5B_ins_t op,
|
||||
void *_lt_key, void *_udata, void *_rt_key,
|
||||
haddr_t *addr_p/*out*/)
|
||||
{
|
||||
@ -265,7 +265,7 @@ H5D_btree_new_node(H5F_t *f, hid_t dxpl_id, H5B_ins_t op,
|
||||
unsigned u;
|
||||
herr_t ret_value = SUCCEED; /* Return value */
|
||||
|
||||
FUNC_ENTER_NOAPI_NOINIT
|
||||
FUNC_ENTER_STATIC
|
||||
|
||||
/* check args */
|
||||
HDassert(f);
|
||||
@ -307,11 +307,11 @@ H5D_btree_new_node(H5F_t *f, hid_t dxpl_id, H5B_ins_t op,
|
||||
|
||||
done:
|
||||
FUNC_LEAVE_NOAPI(ret_value)
|
||||
} /* end H5D_btree_new_node() */
|
||||
} /* end H5D__btree_new_node() */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5D_btree_cmp2
|
||||
* Function: H5D__btree_cmp2
|
||||
*
|
||||
* Purpose: Compares two keys sort of like strcmp(). The UDATA pointer
|
||||
* is only to supply extra information not carried in the keys
|
||||
@ -330,14 +330,14 @@ done:
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
static int
|
||||
H5D_btree_cmp2(void *_lt_key, void *_udata, void *_rt_key)
|
||||
H5D__btree_cmp2(void *_lt_key, void *_udata, void *_rt_key)
|
||||
{
|
||||
H5D_btree_key_t *lt_key = (H5D_btree_key_t *) _lt_key;
|
||||
H5D_btree_key_t *rt_key = (H5D_btree_key_t *) _rt_key;
|
||||
H5D_chunk_common_ud_t *udata = (H5D_chunk_common_ud_t *) _udata;
|
||||
int ret_value;
|
||||
|
||||
FUNC_ENTER_NOAPI_NOINIT_NOERR
|
||||
FUNC_ENTER_STATIC_NOERR
|
||||
|
||||
HDassert(lt_key);
|
||||
HDassert(rt_key);
|
||||
@ -348,11 +348,11 @@ H5D_btree_cmp2(void *_lt_key, void *_udata, void *_rt_key)
|
||||
ret_value = H5V_vector_cmp_u(udata->layout->ndims, lt_key->offset, rt_key->offset);
|
||||
|
||||
FUNC_LEAVE_NOAPI(ret_value)
|
||||
} /* end H5D_btree_cmp2() */
|
||||
} /* end H5D__btree_cmp2() */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5D_btree_cmp3
|
||||
* Function: H5D__btree_cmp3
|
||||
*
|
||||
* Purpose: Compare the requested datum UDATA with the left and right
|
||||
* keys of the B-tree.
|
||||
@ -379,14 +379,14 @@ H5D_btree_cmp2(void *_lt_key, void *_udata, void *_rt_key)
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
static int
|
||||
H5D_btree_cmp3(void *_lt_key, void *_udata, void *_rt_key)
|
||||
H5D__btree_cmp3(void *_lt_key, void *_udata, void *_rt_key)
|
||||
{
|
||||
H5D_btree_key_t *lt_key = (H5D_btree_key_t *) _lt_key;
|
||||
H5D_btree_key_t *rt_key = (H5D_btree_key_t *) _rt_key;
|
||||
H5D_chunk_common_ud_t *udata = (H5D_chunk_common_ud_t *) _udata;
|
||||
int ret_value = 0;
|
||||
|
||||
FUNC_ENTER_NOAPI_NOINIT_NOERR
|
||||
FUNC_ENTER_STATIC_NOERR
|
||||
|
||||
HDassert(lt_key);
|
||||
HDassert(rt_key);
|
||||
@ -416,11 +416,11 @@ H5D_btree_cmp3(void *_lt_key, void *_udata, void *_rt_key)
|
||||
} /* end else */
|
||||
|
||||
FUNC_LEAVE_NOAPI(ret_value)
|
||||
} /* end H5D_btree_cmp3() */
|
||||
} /* end H5D__btree_cmp3() */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5D_btree_found
|
||||
* Function: H5D__btree_found
|
||||
*
|
||||
* Purpose: This function is called when the B-tree search engine has
|
||||
* found the leaf entry that points to a chunk of storage that
|
||||
@ -445,7 +445,7 @@ H5D_btree_cmp3(void *_lt_key, void *_udata, void *_rt_key)
|
||||
*/
|
||||
/* ARGSUSED */
|
||||
static htri_t
|
||||
H5D_btree_found(H5F_t UNUSED *f, hid_t UNUSED dxpl_id, haddr_t addr, const void *_lt_key,
|
||||
H5D__btree_found(H5F_t UNUSED *f, hid_t UNUSED dxpl_id, haddr_t addr, const void *_lt_key,
|
||||
void *_udata)
|
||||
{
|
||||
H5D_chunk_ud_t *udata = (H5D_chunk_ud_t *) _udata;
|
||||
@ -453,7 +453,7 @@ H5D_btree_found(H5F_t UNUSED *f, hid_t UNUSED dxpl_id, haddr_t addr, const void
|
||||
unsigned u;
|
||||
htri_t ret_value = TRUE; /* Return value */
|
||||
|
||||
FUNC_ENTER_NOAPI_NOINIT_NOERR
|
||||
FUNC_ENTER_STATIC_NOERR
|
||||
|
||||
/* Check arguments */
|
||||
HDassert(f);
|
||||
@ -474,11 +474,11 @@ H5D_btree_found(H5F_t UNUSED *f, hid_t UNUSED dxpl_id, haddr_t addr, const void
|
||||
|
||||
done:
|
||||
FUNC_LEAVE_NOAPI(ret_value)
|
||||
} /* end H5D_btree_found() */
|
||||
} /* end H5D__btree_found() */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5D_btree_insert
|
||||
* Function: H5D__btree_insert
|
||||
*
|
||||
* Purpose: This function is called when the B-tree insert engine finds
|
||||
* the node to use to insert new data. The UDATA argument
|
||||
@ -507,7 +507,7 @@ done:
|
||||
*/
|
||||
/* ARGSUSED */
|
||||
static H5B_ins_t
|
||||
H5D_btree_insert(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_lt_key,
|
||||
H5D__btree_insert(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_lt_key,
|
||||
hbool_t *lt_key_changed,
|
||||
void *_md_key, void *_udata, void *_rt_key,
|
||||
hbool_t UNUSED *rt_key_changed,
|
||||
@ -521,7 +521,7 @@ H5D_btree_insert(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_lt_key,
|
||||
unsigned u;
|
||||
H5B_ins_t ret_value;
|
||||
|
||||
FUNC_ENTER_NOAPI_NOINIT
|
||||
FUNC_ENTER_STATIC
|
||||
|
||||
/* check args */
|
||||
HDassert(f);
|
||||
@ -533,7 +533,7 @@ H5D_btree_insert(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_lt_key,
|
||||
HDassert(rt_key);
|
||||
HDassert(new_node_p);
|
||||
|
||||
cmp = H5D_btree_cmp3(lt_key, udata, rt_key);
|
||||
cmp = H5D__btree_cmp3(lt_key, udata, rt_key);
|
||||
HDassert(cmp <= 0);
|
||||
|
||||
if(cmp < 0) {
|
||||
@ -611,11 +611,11 @@ H5D_btree_insert(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_lt_key,
|
||||
|
||||
done:
|
||||
FUNC_LEAVE_NOAPI(ret_value)
|
||||
} /* end H5D_btree_insert() */
|
||||
} /* end H5D__btree_insert() */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5D_btree_remove
|
||||
* Function: H5D__btree_remove
|
||||
*
|
||||
* Purpose: Removes chunks that are no longer necessary in the B-tree.
|
||||
*
|
||||
@ -629,7 +629,7 @@ done:
|
||||
*/
|
||||
/* ARGSUSED */
|
||||
static H5B_ins_t
|
||||
H5D_btree_remove(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_lt_key /*in,out */ ,
|
||||
H5D__btree_remove(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_lt_key /*in,out */ ,
|
||||
hbool_t *lt_key_changed /*out */ ,
|
||||
void UNUSED * _udata /*in,out */ ,
|
||||
void UNUSED * _rt_key /*in,out */ ,
|
||||
@ -638,7 +638,7 @@ H5D_btree_remove(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_lt_key /*in,out *
|
||||
H5D_btree_key_t *lt_key = (H5D_btree_key_t *)_lt_key;
|
||||
H5B_ins_t ret_value=H5B_INS_REMOVE; /* Return value */
|
||||
|
||||
FUNC_ENTER_NOAPI_NOINIT
|
||||
FUNC_ENTER_STATIC
|
||||
|
||||
/* Remove raw data chunk from file */
|
||||
H5_CHECK_OVERFLOW(lt_key->nbytes, uint32_t, hsize_t);
|
||||
@ -651,11 +651,11 @@ H5D_btree_remove(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_lt_key /*in,out *
|
||||
|
||||
done:
|
||||
FUNC_LEAVE_NOAPI(ret_value)
|
||||
} /* end H5D_btree_remove() */
|
||||
} /* end H5D__btree_remove() */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5D_btree_decode_key
|
||||
* Function: H5D__btree_decode_key
|
||||
*
|
||||
* Purpose: Decodes a raw key into a native key for the B-tree
|
||||
*
|
||||
@ -667,13 +667,13 @@ done:
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
static herr_t
|
||||
H5D_btree_decode_key(const H5B_shared_t *shared, const uint8_t *raw, void *_key)
|
||||
H5D__btree_decode_key(const H5B_shared_t *shared, const uint8_t *raw, void *_key)
|
||||
{
|
||||
H5D_btree_key_t *key = (H5D_btree_key_t *) _key;
|
||||
size_t ndims;
|
||||
unsigned u;
|
||||
|
||||
FUNC_ENTER_NOAPI_NOINIT_NOERR
|
||||
FUNC_ENTER_STATIC_NOERR
|
||||
|
||||
/* check args */
|
||||
HDassert(shared);
|
||||
@ -689,11 +689,11 @@ H5D_btree_decode_key(const H5B_shared_t *shared, const uint8_t *raw, void *_key)
|
||||
UINT64DECODE(raw, key->offset[u]);
|
||||
|
||||
FUNC_LEAVE_NOAPI(SUCCEED)
|
||||
} /* end H5D_btree_decode_key() */
|
||||
} /* end H5D__btree_decode_key() */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5D_btree_encode_key
|
||||
* Function: H5D__btree_encode_key
|
||||
*
|
||||
* Purpose: Encode a key from native format to raw format.
|
||||
*
|
||||
@ -705,13 +705,13 @@ H5D_btree_decode_key(const H5B_shared_t *shared, const uint8_t *raw, void *_key)
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
static herr_t
|
||||
H5D_btree_encode_key(const H5B_shared_t *shared, uint8_t *raw, const void *_key)
|
||||
H5D__btree_encode_key(const H5B_shared_t *shared, uint8_t *raw, const void *_key)
|
||||
{
|
||||
const H5D_btree_key_t *key = (const H5D_btree_key_t *)_key;
|
||||
size_t ndims;
|
||||
unsigned u;
|
||||
|
||||
FUNC_ENTER_NOAPI_NOINIT_NOERR
|
||||
FUNC_ENTER_STATIC_NOERR
|
||||
|
||||
/* check args */
|
||||
HDassert(shared);
|
||||
@ -727,11 +727,11 @@ H5D_btree_encode_key(const H5B_shared_t *shared, uint8_t *raw, const void *_key)
|
||||
UINT64ENCODE(raw, key->offset[u]);
|
||||
|
||||
FUNC_LEAVE_NOAPI(SUCCEED)
|
||||
} /* end H5D_btree_encode_key() */
|
||||
} /* end H5D__btree_encode_key() */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5D_btree_debug_key
|
||||
* Function: H5D__btree_debug_key
|
||||
*
|
||||
* Purpose: Prints a key.
|
||||
*
|
||||
@ -744,14 +744,14 @@ H5D_btree_encode_key(const H5B_shared_t *shared, uint8_t *raw, const void *_key)
|
||||
*/
|
||||
/* ARGSUSED */
|
||||
static herr_t
|
||||
H5D_btree_debug_key(FILE *stream, int indent, int fwidth, const void *_key,
|
||||
H5D__btree_debug_key(FILE *stream, int indent, int fwidth, const void *_key,
|
||||
const void *_udata)
|
||||
{
|
||||
const H5D_btree_key_t *key = (const H5D_btree_key_t *)_key;
|
||||
const H5D_btree_dbg_t *udata = (const H5D_btree_dbg_t *)_udata;
|
||||
unsigned u;
|
||||
|
||||
FUNC_ENTER_NOAPI_NOINIT_NOERR
|
||||
FUNC_ENTER_STATIC_NOERR
|
||||
|
||||
HDassert(key);
|
||||
|
||||
@ -763,11 +763,11 @@ H5D_btree_debug_key(FILE *stream, int indent, int fwidth, const void *_key,
|
||||
HDfputs("}\n", stream);
|
||||
|
||||
FUNC_LEAVE_NOAPI(SUCCEED)
|
||||
} /* end H5D_btree_debug_key() */
|
||||
} /* end H5D__btree_debug_key() */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5D_btree_shared_create
|
||||
* Function: H5D__btree_shared_create
|
||||
*
|
||||
* Purpose: Create & initialize B-tree shared info
|
||||
*
|
||||
@ -779,13 +779,13 @@ H5D_btree_debug_key(FILE *stream, int indent, int fwidth, const void *_key,
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
static herr_t
|
||||
H5D_btree_shared_create(const H5F_t *f, H5O_storage_chunk_t *store, unsigned ndims)
|
||||
H5D__btree_shared_create(const H5F_t *f, H5O_storage_chunk_t *store, unsigned ndims)
|
||||
{
|
||||
H5B_shared_t *shared; /* Shared B-tree node info */
|
||||
size_t sizeof_rkey; /* Size of raw (disk) key */
|
||||
herr_t ret_value = SUCCEED; /* Return value */
|
||||
|
||||
FUNC_ENTER_NOAPI_NOINIT
|
||||
FUNC_ENTER_STATIC
|
||||
|
||||
/* Set the raw key size */
|
||||
sizeof_rkey = 4 + /*storage size */
|
||||
@ -805,11 +805,11 @@ H5D_btree_shared_create(const H5F_t *f, H5O_storage_chunk_t *store, unsigned ndi
|
||||
|
||||
done:
|
||||
FUNC_LEAVE_NOAPI(ret_value)
|
||||
} /* end H5D_btree_shared_create() */
|
||||
} /* end H5D__btree_shared_create() */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5D_btree_idx_init
|
||||
* Function: H5D__btree_idx_init
|
||||
*
|
||||
* Purpose: Initialize the indexing information for a dataset.
|
||||
*
|
||||
@ -821,12 +821,12 @@ done:
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
static herr_t
|
||||
H5D_btree_idx_init(const H5D_chk_idx_info_t *idx_info, const H5S_t UNUSED *space,
|
||||
H5D__btree_idx_init(const H5D_chk_idx_info_t *idx_info, const H5S_t UNUSED *space,
|
||||
haddr_t dset_ohdr_addr)
|
||||
{
|
||||
herr_t ret_value = SUCCEED; /* Return value */
|
||||
|
||||
FUNC_ENTER_NOAPI_NOINIT
|
||||
FUNC_ENTER_STATIC
|
||||
|
||||
/* Check args */
|
||||
HDassert(idx_info);
|
||||
@ -839,16 +839,16 @@ H5D_btree_idx_init(const H5D_chk_idx_info_t *idx_info, const H5S_t UNUSED *space
|
||||
idx_info->storage->u.btree.dset_ohdr_addr = dset_ohdr_addr;
|
||||
|
||||
/* Allocate the shared structure */
|
||||
if(H5D_btree_shared_create(idx_info->f, idx_info->storage, idx_info->layout->ndims) < 0)
|
||||
if(H5D__btree_shared_create(idx_info->f, idx_info->storage, idx_info->layout->ndims) < 0)
|
||||
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTINIT, FAIL, "can't create wrapper for shared B-tree info")
|
||||
|
||||
done:
|
||||
FUNC_LEAVE_NOAPI(ret_value)
|
||||
} /* end H5D_btree_idx_init() */
|
||||
} /* end H5D__btree_idx_init() */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5D_btree_idx_create
|
||||
* Function: H5D__btree_idx_create
|
||||
*
|
||||
* Purpose: Creates a new indexed-storage B-tree and initializes the
|
||||
* layout struct with information about the storage. The
|
||||
@ -866,12 +866,12 @@ done:
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
static herr_t
|
||||
H5D_btree_idx_create(const H5D_chk_idx_info_t *idx_info)
|
||||
H5D__btree_idx_create(const H5D_chk_idx_info_t *idx_info)
|
||||
{
|
||||
H5D_chunk_common_ud_t udata; /* User data for B-tree callback */
|
||||
herr_t ret_value = SUCCEED; /* Return value */
|
||||
|
||||
FUNC_ENTER_NOAPI_NOINIT
|
||||
FUNC_ENTER_STATIC
|
||||
|
||||
/* Check args */
|
||||
HDassert(idx_info);
|
||||
@ -891,11 +891,11 @@ H5D_btree_idx_create(const H5D_chk_idx_info_t *idx_info)
|
||||
|
||||
done:
|
||||
FUNC_LEAVE_NOAPI(ret_value)
|
||||
} /* end H5D_btree_idx_create() */
|
||||
} /* end H5D__btree_idx_create() */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5D_btree_idx_is_space_alloc
|
||||
* Function: H5D__btree_idx_is_space_alloc
|
||||
*
|
||||
* Purpose: Query if space is allocated for index method
|
||||
*
|
||||
@ -907,11 +907,11 @@ done:
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
static hbool_t
|
||||
H5D_btree_idx_is_space_alloc(const H5O_storage_chunk_t *storage)
|
||||
H5D__btree_idx_is_space_alloc(const H5O_storage_chunk_t *storage)
|
||||
{
|
||||
hbool_t ret_value; /* Return value */
|
||||
|
||||
FUNC_ENTER_NOAPI_NOINIT_NOERR
|
||||
FUNC_ENTER_STATIC_NOERR
|
||||
|
||||
/* Check args */
|
||||
HDassert(storage);
|
||||
@ -920,11 +920,11 @@ H5D_btree_idx_is_space_alloc(const H5O_storage_chunk_t *storage)
|
||||
ret_value = (hbool_t)H5F_addr_defined(storage->idx_addr);
|
||||
|
||||
FUNC_LEAVE_NOAPI(ret_value)
|
||||
} /* end H5D_btree_idx_is_space_alloc() */
|
||||
} /* end H5D__btree_idx_is_space_alloc() */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5D_btree_idx_insert
|
||||
* Function: H5D__btree_idx_insert
|
||||
*
|
||||
* Purpose: Create the chunk it if it doesn't exist, or reallocate the
|
||||
* chunk if its size changed.
|
||||
@ -937,11 +937,11 @@ H5D_btree_idx_is_space_alloc(const H5O_storage_chunk_t *storage)
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
static herr_t
|
||||
H5D_btree_idx_insert(const H5D_chk_idx_info_t *idx_info, H5D_chunk_ud_t *udata)
|
||||
H5D__btree_idx_insert(const H5D_chk_idx_info_t *idx_info, H5D_chunk_ud_t *udata)
|
||||
{
|
||||
herr_t ret_value = SUCCEED; /* Return value */
|
||||
|
||||
FUNC_ENTER_NOAPI_NOINIT
|
||||
FUNC_ENTER_STATIC
|
||||
|
||||
HDassert(idx_info);
|
||||
HDassert(idx_info->f);
|
||||
@ -960,11 +960,11 @@ H5D_btree_idx_insert(const H5D_chk_idx_info_t *idx_info, H5D_chunk_ud_t *udata)
|
||||
|
||||
done:
|
||||
FUNC_LEAVE_NOAPI(ret_value)
|
||||
} /* H5D_btree_idx_insert() */
|
||||
} /* H5D__btree_idx_insert() */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5D_btree_idx_get_addr
|
||||
* Function: H5D__btree_idx_get_addr
|
||||
*
|
||||
* Purpose: Get the file address of a chunk if file space has been
|
||||
* assigned. Save the retrieved information in the udata
|
||||
@ -978,11 +978,11 @@ done:
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
static herr_t
|
||||
H5D_btree_idx_get_addr(const H5D_chk_idx_info_t *idx_info, H5D_chunk_ud_t *udata)
|
||||
H5D__btree_idx_get_addr(const H5D_chk_idx_info_t *idx_info, H5D_chunk_ud_t *udata)
|
||||
{
|
||||
herr_t ret_value = SUCCEED; /* Return value */
|
||||
|
||||
FUNC_ENTER_NOAPI_NOINIT
|
||||
FUNC_ENTER_STATIC
|
||||
|
||||
HDassert(idx_info);
|
||||
HDassert(idx_info->f);
|
||||
@ -999,11 +999,11 @@ H5D_btree_idx_get_addr(const H5D_chk_idx_info_t *idx_info, H5D_chunk_ud_t *udata
|
||||
|
||||
done:
|
||||
FUNC_LEAVE_NOAPI(ret_value)
|
||||
} /* H5D_btree_idx_get_addr() */
|
||||
} /* H5D__btree_idx_get_addr() */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5D_btree_idx_iterate_cb
|
||||
* Function: H5D__btree_idx_iterate_cb
|
||||
*
|
||||
* Purpose: Translate the B-tree specific chunk record into a generic
|
||||
* form and make the callback to the generic chunk callback
|
||||
@ -1019,7 +1019,7 @@ done:
|
||||
*/
|
||||
/* ARGSUSED */
|
||||
static int
|
||||
H5D_btree_idx_iterate_cb(H5F_t UNUSED *f, hid_t UNUSED dxpl_id,
|
||||
H5D__btree_idx_iterate_cb(H5F_t UNUSED *f, hid_t UNUSED dxpl_id,
|
||||
const void *_lt_key, haddr_t addr, const void UNUSED *_rt_key,
|
||||
void *_udata)
|
||||
{
|
||||
@ -1028,7 +1028,7 @@ H5D_btree_idx_iterate_cb(H5F_t UNUSED *f, hid_t UNUSED dxpl_id,
|
||||
H5D_chunk_rec_t chunk_rec; /* Generic chunk record for callback */
|
||||
int ret_value; /* Return value */
|
||||
|
||||
FUNC_ENTER_NOAPI_NOINIT_NOERR
|
||||
FUNC_ENTER_STATIC_NOERR
|
||||
|
||||
/* Sanity check for memcpy() */
|
||||
HDcompile_assert(offsetof(H5D_chunk_rec_t, nbytes) == offsetof(H5D_btree_key_t, nbytes));
|
||||
@ -1047,11 +1047,11 @@ H5D_btree_idx_iterate_cb(H5F_t UNUSED *f, hid_t UNUSED dxpl_id,
|
||||
HERROR(H5E_DATASET, H5E_CALLBACK, "failure in generic chunk iterator callback");
|
||||
|
||||
FUNC_LEAVE_NOAPI(ret_value)
|
||||
} /* H5D_btree_idx_iterate_cb() */
|
||||
} /* H5D__btree_idx_iterate_cb() */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5D_btree_idx_iterate
|
||||
* Function: H5D__btree_idx_iterate
|
||||
*
|
||||
* Purpose: Iterate over the chunks in an index, making a callback
|
||||
* for each one.
|
||||
@ -1064,13 +1064,13 @@ H5D_btree_idx_iterate_cb(H5F_t UNUSED *f, hid_t UNUSED dxpl_id,
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
static int
|
||||
H5D_btree_idx_iterate(const H5D_chk_idx_info_t *idx_info,
|
||||
H5D__btree_idx_iterate(const H5D_chk_idx_info_t *idx_info,
|
||||
H5D_chunk_cb_func_t chunk_cb, void *chunk_udata)
|
||||
{
|
||||
H5D_btree_it_ud_t udata; /* User data for B-tree iterator callback */
|
||||
int ret_value; /* Return value */
|
||||
|
||||
FUNC_ENTER_NOAPI_NOINIT_NOERR
|
||||
FUNC_ENTER_STATIC_NOERR
|
||||
|
||||
HDassert(idx_info);
|
||||
HDassert(idx_info->f);
|
||||
@ -1089,15 +1089,15 @@ H5D_btree_idx_iterate(const H5D_chk_idx_info_t *idx_info,
|
||||
udata.udata = chunk_udata;
|
||||
|
||||
/* Iterate over existing chunks */
|
||||
if((ret_value = H5B_iterate(idx_info->f, idx_info->dxpl_id, H5B_BTREE, idx_info->storage->idx_addr, H5D_btree_idx_iterate_cb, &udata)) < 0)
|
||||
if((ret_value = H5B_iterate(idx_info->f, idx_info->dxpl_id, H5B_BTREE, idx_info->storage->idx_addr, H5D__btree_idx_iterate_cb, &udata)) < 0)
|
||||
HERROR(H5E_DATASET, H5E_BADITER, "unable to iterate over chunk B-tree");
|
||||
|
||||
FUNC_LEAVE_NOAPI(ret_value)
|
||||
} /* end H5D_btree_idx_iterate() */
|
||||
} /* end H5D__btree_idx_iterate() */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5D_btree_idx_remove
|
||||
* Function: H5D__btree_idx_remove
|
||||
*
|
||||
* Purpose: Remove chunk from index.
|
||||
*
|
||||
@ -1109,11 +1109,11 @@ H5D_btree_idx_iterate(const H5D_chk_idx_info_t *idx_info,
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
static herr_t
|
||||
H5D_btree_idx_remove(const H5D_chk_idx_info_t *idx_info, H5D_chunk_common_ud_t *udata)
|
||||
H5D__btree_idx_remove(const H5D_chk_idx_info_t *idx_info, H5D_chunk_common_ud_t *udata)
|
||||
{
|
||||
herr_t ret_value = SUCCEED; /* Return value */
|
||||
|
||||
FUNC_ENTER_NOAPI_NOINIT
|
||||
FUNC_ENTER_STATIC
|
||||
|
||||
HDassert(idx_info);
|
||||
HDassert(idx_info->f);
|
||||
@ -1131,11 +1131,11 @@ H5D_btree_idx_remove(const H5D_chk_idx_info_t *idx_info, H5D_chunk_common_ud_t *
|
||||
|
||||
done:
|
||||
FUNC_LEAVE_NOAPI(ret_value)
|
||||
} /* H5D_btree_idx_remove() */
|
||||
} /* H5D__btree_idx_remove() */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5D_btree_idx_delete
|
||||
* Function: H5D__btree_idx_delete
|
||||
*
|
||||
* Purpose: Delete index and raw data storage for entire dataset
|
||||
* (i.e. all chunks)
|
||||
@ -1149,11 +1149,11 @@ done:
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
static herr_t
|
||||
H5D_btree_idx_delete(const H5D_chk_idx_info_t *idx_info)
|
||||
H5D__btree_idx_delete(const H5D_chk_idx_info_t *idx_info)
|
||||
{
|
||||
herr_t ret_value = SUCCEED; /* Return value */
|
||||
|
||||
FUNC_ENTER_NOAPI_NOINIT
|
||||
FUNC_ENTER_STATIC
|
||||
|
||||
/* Sanity checks */
|
||||
HDassert(idx_info);
|
||||
@ -1171,7 +1171,7 @@ H5D_btree_idx_delete(const H5D_chk_idx_info_t *idx_info)
|
||||
tmp_storage = *idx_info->storage;
|
||||
|
||||
/* Set up the shared structure */
|
||||
if(H5D_btree_shared_create(idx_info->f, &tmp_storage, idx_info->layout->ndims) < 0)
|
||||
if(H5D__btree_shared_create(idx_info->f, &tmp_storage, idx_info->layout->ndims) < 0)
|
||||
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't create wrapper for shared B-tree info")
|
||||
|
||||
/* Set up B-tree user data */
|
||||
@ -1192,11 +1192,11 @@ H5D_btree_idx_delete(const H5D_chk_idx_info_t *idx_info)
|
||||
|
||||
done:
|
||||
FUNC_LEAVE_NOAPI(ret_value)
|
||||
} /* end H5D_btree_idx_delete() */
|
||||
} /* end H5D__btree_idx_delete() */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5D_btree_idx_copy_setup
|
||||
* Function: H5D__btree_idx_copy_setup
|
||||
*
|
||||
* Purpose: Set up any necessary information for copying chunks
|
||||
*
|
||||
@ -1208,12 +1208,12 @@ done:
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
static herr_t
|
||||
H5D_btree_idx_copy_setup(const H5D_chk_idx_info_t *idx_info_src,
|
||||
H5D__btree_idx_copy_setup(const H5D_chk_idx_info_t *idx_info_src,
|
||||
const H5D_chk_idx_info_t *idx_info_dst)
|
||||
{
|
||||
herr_t ret_value = SUCCEED; /* Return value */
|
||||
|
||||
FUNC_ENTER_NOAPI_NOINIT_TAG(idx_info_dst->dxpl_id, H5AC__COPIED_TAG, FAIL)
|
||||
FUNC_ENTER_STATIC_TAG(idx_info_dst->dxpl_id, H5AC__COPIED_TAG, FAIL)
|
||||
|
||||
HDassert(idx_info_src);
|
||||
HDassert(idx_info_src->f);
|
||||
@ -1228,23 +1228,23 @@ H5D_btree_idx_copy_setup(const H5D_chk_idx_info_t *idx_info_src,
|
||||
HDassert(!H5F_addr_defined(idx_info_dst->storage->idx_addr));
|
||||
|
||||
/* Create shared B-tree info for each file */
|
||||
if(H5D_btree_shared_create(idx_info_src->f, idx_info_src->storage, idx_info_src->layout->ndims) < 0)
|
||||
if(H5D__btree_shared_create(idx_info_src->f, idx_info_src->storage, idx_info_src->layout->ndims) < 0)
|
||||
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTINIT, FAIL, "can't create wrapper for source shared B-tree info")
|
||||
if(H5D_btree_shared_create(idx_info_dst->f, idx_info_dst->storage, idx_info_dst->layout->ndims) < 0)
|
||||
if(H5D__btree_shared_create(idx_info_dst->f, idx_info_dst->storage, idx_info_dst->layout->ndims) < 0)
|
||||
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTINIT, FAIL, "can't create wrapper for destination shared B-tree info")
|
||||
|
||||
/* Create the root of the B-tree that describes chunked storage in the dest. file */
|
||||
if(H5D_btree_idx_create(idx_info_dst) < 0)
|
||||
if(H5D__btree_idx_create(idx_info_dst) < 0)
|
||||
HGOTO_ERROR(H5E_IO, H5E_CANTINIT, FAIL, "unable to initialize chunked storage")
|
||||
HDassert(H5F_addr_defined(idx_info_dst->storage->idx_addr));
|
||||
|
||||
done:
|
||||
FUNC_LEAVE_NOAPI_TAG(ret_value, FAIL)
|
||||
} /* end H5D_btree_idx_copy_setup() */
|
||||
} /* end H5D__btree_idx_copy_setup() */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5D_btree_idx_copy_shutdown
|
||||
* Function: H5D__btree_idx_copy_shutdown
|
||||
*
|
||||
* Purpose: Shutdown any information from copying chunks
|
||||
*
|
||||
@ -1256,13 +1256,13 @@ done:
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
static herr_t
|
||||
H5D_btree_idx_copy_shutdown(H5O_storage_chunk_t *storage_src,
|
||||
H5D__btree_idx_copy_shutdown(H5O_storage_chunk_t *storage_src,
|
||||
H5O_storage_chunk_t *storage_dst,
|
||||
hid_t UNUSED dxpl_id)
|
||||
{
|
||||
herr_t ret_value = SUCCEED; /* Return value */
|
||||
|
||||
FUNC_ENTER_NOAPI_NOINIT
|
||||
FUNC_ENTER_STATIC
|
||||
|
||||
HDassert(storage_src);
|
||||
HDassert(storage_dst);
|
||||
@ -1275,11 +1275,11 @@ H5D_btree_idx_copy_shutdown(H5O_storage_chunk_t *storage_src,
|
||||
|
||||
done:
|
||||
FUNC_LEAVE_NOAPI(ret_value)
|
||||
} /* end H5D_btree_idx_copy_shutdown() */
|
||||
} /* end H5D__btree_idx_copy_shutdown() */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5D_btree_idx_size
|
||||
* Function: H5D__btree_idx_size
|
||||
*
|
||||
* Purpose: Retrieve the amount of index storage for chunked dataset
|
||||
*
|
||||
@ -1292,14 +1292,14 @@ done:
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
static herr_t
|
||||
H5D_btree_idx_size(const H5D_chk_idx_info_t *idx_info, hsize_t *index_size)
|
||||
H5D__btree_idx_size(const H5D_chk_idx_info_t *idx_info, hsize_t *index_size)
|
||||
{
|
||||
H5D_chunk_common_ud_t udata; /* User-data for loading B-tree nodes */
|
||||
H5B_info_t bt_info; /* B-tree info */
|
||||
hbool_t shared_init = FALSE; /* Whether shared B-tree info is initialized */
|
||||
herr_t ret_value = SUCCEED; /* Return value */
|
||||
|
||||
FUNC_ENTER_NOAPI_NOINIT
|
||||
FUNC_ENTER_STATIC
|
||||
|
||||
/* Check args */
|
||||
HDassert(idx_info);
|
||||
@ -1310,7 +1310,7 @@ H5D_btree_idx_size(const H5D_chk_idx_info_t *idx_info, hsize_t *index_size)
|
||||
HDassert(index_size);
|
||||
|
||||
/* Initialize the shared info for the B-tree traversal */
|
||||
if(H5D_btree_shared_create(idx_info->f, idx_info->storage, idx_info->layout->ndims) < 0)
|
||||
if(H5D__btree_shared_create(idx_info->f, idx_info->storage, idx_info->layout->ndims) < 0)
|
||||
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTINIT, FAIL, "can't create wrapper for shared B-tree info")
|
||||
shared_init = TRUE;
|
||||
|
||||
@ -1335,11 +1335,11 @@ done:
|
||||
} /* end if */
|
||||
|
||||
FUNC_LEAVE_NOAPI(ret_value)
|
||||
} /* end H5D_btree_idx_size() */
|
||||
} /* end H5D__btree_idx_size() */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5D_btree_idx_reset
|
||||
* Function: H5D__btree_idx_reset
|
||||
*
|
||||
* Purpose: Reset indexing information.
|
||||
*
|
||||
@ -1351,9 +1351,9 @@ done:
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
static herr_t
|
||||
H5D_btree_idx_reset(H5O_storage_chunk_t *storage, hbool_t reset_addr)
|
||||
H5D__btree_idx_reset(H5O_storage_chunk_t *storage, hbool_t reset_addr)
|
||||
{
|
||||
FUNC_ENTER_NOAPI_NOINIT_NOERR
|
||||
FUNC_ENTER_STATIC_NOERR
|
||||
|
||||
HDassert(storage);
|
||||
|
||||
@ -1363,11 +1363,11 @@ H5D_btree_idx_reset(H5O_storage_chunk_t *storage, hbool_t reset_addr)
|
||||
storage->u.btree.shared = NULL;
|
||||
|
||||
FUNC_LEAVE_NOAPI(SUCCEED)
|
||||
} /* end H5D_btree_idx_reset() */
|
||||
} /* end H5D__btree_idx_reset() */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5D_btree_idx_dump
|
||||
* Function: H5D__btree_idx_dump
|
||||
*
|
||||
* Purpose: Dump indexing information to a stream.
|
||||
*
|
||||
@ -1379,9 +1379,9 @@ H5D_btree_idx_reset(H5O_storage_chunk_t *storage, hbool_t reset_addr)
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
static herr_t
|
||||
H5D_btree_idx_dump(const H5O_storage_chunk_t *storage, FILE *stream)
|
||||
H5D__btree_idx_dump(const H5O_storage_chunk_t *storage, FILE *stream)
|
||||
{
|
||||
FUNC_ENTER_NOAPI_NOINIT_NOERR
|
||||
FUNC_ENTER_STATIC_NOERR
|
||||
|
||||
HDassert(storage);
|
||||
HDassert(stream);
|
||||
@ -1389,11 +1389,11 @@ H5D_btree_idx_dump(const H5O_storage_chunk_t *storage, FILE *stream)
|
||||
HDfprintf(stream, " Address: %a\n", storage->idx_addr);
|
||||
|
||||
FUNC_LEAVE_NOAPI(SUCCEED)
|
||||
} /* end H5D_btree_idx_dump() */
|
||||
} /* end H5D__btree_idx_dump() */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5D_btree_idx_dest
|
||||
* Function: H5D__btree_idx_dest
|
||||
*
|
||||
* Purpose: Release indexing information in memory.
|
||||
*
|
||||
@ -1405,11 +1405,11 @@ H5D_btree_idx_dump(const H5O_storage_chunk_t *storage, FILE *stream)
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
static herr_t
|
||||
H5D_btree_idx_dest(const H5D_chk_idx_info_t *idx_info)
|
||||
H5D__btree_idx_dest(const H5D_chk_idx_info_t *idx_info)
|
||||
{
|
||||
herr_t ret_value = SUCCEED; /* Return value */
|
||||
|
||||
FUNC_ENTER_NOAPI_NOINIT
|
||||
FUNC_ENTER_STATIC
|
||||
|
||||
HDassert(idx_info);
|
||||
HDassert(idx_info->f);
|
||||
@ -1425,7 +1425,7 @@ H5D_btree_idx_dest(const H5D_chk_idx_info_t *idx_info)
|
||||
|
||||
done:
|
||||
FUNC_LEAVE_NOAPI(ret_value)
|
||||
} /* end H5D_btree_idx_dest() */
|
||||
} /* end H5D__btree_idx_dest() */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
@ -1456,7 +1456,7 @@ H5D_btree_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE * stream, int indent
|
||||
storage.idx_type = H5D_CHUNK_BTREE;
|
||||
|
||||
/* Allocate the shared structure */
|
||||
if(H5D_btree_shared_create(f, &storage, ndims) < 0)
|
||||
if(H5D__btree_shared_create(f, &storage, ndims) < 0)
|
||||
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTINIT, FAIL, "can't create wrapper for shared B-tree info")
|
||||
shared_init = TRUE;
|
||||
|
||||
|
620
src/H5Dchunk.c
620
src/H5Dchunk.c
File diff suppressed because it is too large
Load Diff
100
src/H5Dcompact.c
100
src/H5Dcompact.c
@ -58,18 +58,18 @@
|
||||
/********************/
|
||||
|
||||
/* Layout operation callbacks */
|
||||
static herr_t H5D_compact_construct(H5F_t *f, H5D_t *dset);
|
||||
static hbool_t H5D_compact_is_space_alloc(const H5O_storage_t *storage);
|
||||
static herr_t H5D_compact_io_init(const H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
|
||||
static herr_t H5D__compact_construct(H5F_t *f, H5D_t *dset);
|
||||
static hbool_t H5D__compact_is_space_alloc(const H5O_storage_t *storage);
|
||||
static herr_t H5D__compact_io_init(const H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
|
||||
hsize_t nelmts, const H5S_t *file_space, const H5S_t *mem_space,
|
||||
H5D_chunk_map_t *cm);
|
||||
static ssize_t H5D_compact_readvv(const H5D_io_info_t *io_info,
|
||||
static ssize_t H5D__compact_readvv(const H5D_io_info_t *io_info,
|
||||
size_t dset_max_nseq, size_t *dset_curr_seq, size_t dset_size_arr[], hsize_t dset_offset_arr[],
|
||||
size_t mem_max_nseq, size_t *mem_curr_seq, size_t mem_size_arr[], hsize_t mem_offset_arr[]);
|
||||
static ssize_t H5D_compact_writevv(const H5D_io_info_t *io_info,
|
||||
static ssize_t H5D__compact_writevv(const H5D_io_info_t *io_info,
|
||||
size_t dset_max_nseq, size_t *dset_curr_seq, size_t dset_size_arr[], hsize_t dset_offset_arr[],
|
||||
size_t mem_max_nseq, size_t *mem_curr_seq, size_t mem_size_arr[], hsize_t mem_offset_arr[]);
|
||||
static herr_t H5D_compact_flush(H5D_t *dset, hid_t dxpl_id);
|
||||
static herr_t H5D__compact_flush(H5D_t *dset, hid_t dxpl_id);
|
||||
|
||||
|
||||
/*********************/
|
||||
@ -78,19 +78,19 @@ static herr_t H5D_compact_flush(H5D_t *dset, hid_t dxpl_id);
|
||||
|
||||
/* Compact storage layout I/O ops */
|
||||
const H5D_layout_ops_t H5D_LOPS_COMPACT[1] = {{
|
||||
H5D_compact_construct,
|
||||
H5D__compact_construct,
|
||||
NULL,
|
||||
H5D_compact_is_space_alloc,
|
||||
H5D_compact_io_init,
|
||||
H5D_contig_read,
|
||||
H5D_contig_write,
|
||||
H5D__compact_is_space_alloc,
|
||||
H5D__compact_io_init,
|
||||
H5D__contig_read,
|
||||
H5D__contig_write,
|
||||
#ifdef H5_HAVE_PARALLEL
|
||||
NULL,
|
||||
NULL,
|
||||
#endif /* H5_HAVE_PARALLEL */
|
||||
H5D_compact_readvv,
|
||||
H5D_compact_writevv,
|
||||
H5D_compact_flush,
|
||||
H5D__compact_readvv,
|
||||
H5D__compact_writevv,
|
||||
H5D__compact_flush,
|
||||
NULL
|
||||
}};
|
||||
|
||||
@ -105,7 +105,7 @@ H5FL_BLK_EXTERN(type_conv);
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5D_compact_fill
|
||||
* Function: H5D__compact_fill
|
||||
*
|
||||
* Purpose: Write fill values to a compactly stored dataset.
|
||||
*
|
||||
@ -117,13 +117,13 @@ H5FL_BLK_EXTERN(type_conv);
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
herr_t
|
||||
H5D_compact_fill(H5D_t *dset, hid_t dxpl_id)
|
||||
H5D__compact_fill(H5D_t *dset, hid_t dxpl_id)
|
||||
{
|
||||
H5D_fill_buf_info_t fb_info; /* Dataset's fill buffer info */
|
||||
hbool_t fb_info_init = FALSE; /* Whether the fill value buffer has been initialized */
|
||||
herr_t ret_value = SUCCEED; /* Return value */
|
||||
|
||||
FUNC_ENTER_NOAPI(FAIL)
|
||||
FUNC_ENTER_PACKAGE
|
||||
|
||||
/* Check args */
|
||||
HDassert(TRUE == H5P_isa_class(dxpl_id, H5P_DATASET_XFER));
|
||||
@ -134,7 +134,7 @@ H5D_compact_fill(H5D_t *dset, hid_t dxpl_id)
|
||||
|
||||
/* Initialize the fill value buffer */
|
||||
/* (use the compact dataset storage buffer as the fill value buffer) */
|
||||
if(H5D_fill_init(&fb_info, dset->shared->layout.storage.u.compact.buf,
|
||||
if(H5D__fill_init(&fb_info, dset->shared->layout.storage.u.compact.buf,
|
||||
NULL, NULL, NULL, NULL,
|
||||
&dset->shared->dcpl_cache.fill, dset->shared->type,
|
||||
dset->shared->type_id, (size_t)0, dset->shared->layout.storage.u.compact.size, dxpl_id) < 0)
|
||||
@ -144,20 +144,20 @@ H5D_compact_fill(H5D_t *dset, hid_t dxpl_id)
|
||||
/* Check for VL datatype & non-default fill value */
|
||||
if(fb_info.has_vlen_fill_type)
|
||||
/* Fill the buffer with VL datatype fill values */
|
||||
if(H5D_fill_refill_vl(&fb_info, fb_info.elmts_per_buf, dxpl_id) < 0)
|
||||
if(H5D__fill_refill_vl(&fb_info, fb_info.elmts_per_buf, dxpl_id) < 0)
|
||||
HGOTO_ERROR(H5E_DATASET, H5E_CANTCONVERT, FAIL, "can't refill fill value buffer")
|
||||
|
||||
done:
|
||||
/* Release the fill buffer info, if it's been initialized */
|
||||
if(fb_info_init && H5D_fill_term(&fb_info) < 0)
|
||||
if(fb_info_init && H5D__fill_term(&fb_info) < 0)
|
||||
HDONE_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "Can't release fill buffer info")
|
||||
|
||||
FUNC_LEAVE_NOAPI(ret_value)
|
||||
} /* end H5D_compact_fill() */
|
||||
} /* end H5D__compact_fill() */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5D_compact_construct
|
||||
* Function: H5D__compact_construct
|
||||
*
|
||||
* Purpose: Constructs new compact layout information for dataset
|
||||
*
|
||||
@ -169,7 +169,7 @@ done:
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
static herr_t
|
||||
H5D_compact_construct(H5F_t *f, H5D_t *dset)
|
||||
H5D__compact_construct(H5F_t *f, H5D_t *dset)
|
||||
{
|
||||
hssize_t stmp_size; /* Temporary holder for raw data size */
|
||||
hsize_t tmp_size; /* Temporary holder for raw data size */
|
||||
@ -180,7 +180,7 @@ H5D_compact_construct(H5F_t *f, H5D_t *dset)
|
||||
int i; /* Local index variable */
|
||||
herr_t ret_value = SUCCEED; /* Return value */
|
||||
|
||||
FUNC_ENTER_NOAPI_NOINIT
|
||||
FUNC_ENTER_STATIC
|
||||
|
||||
/* Sanity checks */
|
||||
HDassert(f);
|
||||
@ -207,17 +207,17 @@ H5D_compact_construct(H5F_t *f, H5D_t *dset)
|
||||
/* Verify data size is smaller than maximum header message size
|
||||
* (64KB) minus other layout message fields.
|
||||
*/
|
||||
max_comp_data_size = H5O_MESG_MAX_SIZE - H5D_layout_meta_size(f, &(dset->shared->layout), FALSE);
|
||||
max_comp_data_size = H5O_MESG_MAX_SIZE - H5D__layout_meta_size(f, &(dset->shared->layout), FALSE);
|
||||
if(dset->shared->layout.storage.u.compact.size > max_comp_data_size)
|
||||
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "compact dataset size is bigger than header message maximum size")
|
||||
|
||||
done:
|
||||
FUNC_LEAVE_NOAPI(ret_value)
|
||||
} /* end H5D_compact_construct() */
|
||||
} /* end H5D__compact_construct() */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5D_compact_is_space_alloc
|
||||
* Function: H5D__compact_is_space_alloc
|
||||
*
|
||||
* Purpose: Query if space is allocated for layout
|
||||
*
|
||||
@ -229,20 +229,20 @@ done:
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
static hbool_t
|
||||
H5D_compact_is_space_alloc(const H5O_storage_t UNUSED *storage)
|
||||
H5D__compact_is_space_alloc(const H5O_storage_t UNUSED *storage)
|
||||
{
|
||||
FUNC_ENTER_NOAPI_NOINIT_NOERR
|
||||
FUNC_ENTER_STATIC_NOERR
|
||||
|
||||
/* Sanity checks */
|
||||
HDassert(storage);
|
||||
|
||||
/* Compact storage is currently always allocated */
|
||||
FUNC_LEAVE_NOAPI(TRUE)
|
||||
} /* end H5D_compact_is_space_alloc() */
|
||||
} /* end H5D__compact_is_space_alloc() */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5D_compact_io_init
|
||||
* Function: H5D__compact_io_init
|
||||
*
|
||||
* Purpose: Performs initialization before any sort of I/O on the raw data
|
||||
*
|
||||
@ -254,21 +254,21 @@ H5D_compact_is_space_alloc(const H5O_storage_t UNUSED *storage)
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
static herr_t
|
||||
H5D_compact_io_init(const H5D_io_info_t *io_info, const H5D_type_info_t UNUSED *type_info,
|
||||
H5D__compact_io_init(const H5D_io_info_t *io_info, const H5D_type_info_t UNUSED *type_info,
|
||||
hsize_t UNUSED nelmts, const H5S_t UNUSED *file_space, const H5S_t UNUSED *mem_space,
|
||||
H5D_chunk_map_t UNUSED *cm)
|
||||
{
|
||||
FUNC_ENTER_NOAPI_NOINIT_NOERR
|
||||
FUNC_ENTER_STATIC_NOERR
|
||||
|
||||
io_info->store->compact.buf = io_info->dset->shared->layout.storage.u.compact.buf;
|
||||
io_info->store->compact.dirty = &io_info->dset->shared->layout.storage.u.compact.dirty;
|
||||
|
||||
FUNC_LEAVE_NOAPI(SUCCEED)
|
||||
} /* end H5D_compact_io_init() */
|
||||
} /* end H5D__compact_io_init() */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5D_compact_readvv
|
||||
* Function: H5D__compact_readvv
|
||||
*
|
||||
* Purpose: Reads some data vectors from a dataset into a buffer.
|
||||
* The data is in compact dataset. The address is relative
|
||||
@ -286,13 +286,13 @@ H5D_compact_io_init(const H5D_io_info_t *io_info, const H5D_type_info_t UNUSED *
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
static ssize_t
|
||||
H5D_compact_readvv(const H5D_io_info_t *io_info,
|
||||
H5D__compact_readvv(const H5D_io_info_t *io_info,
|
||||
size_t dset_max_nseq, size_t *dset_curr_seq, size_t dset_size_arr[], hsize_t dset_offset_arr[],
|
||||
size_t mem_max_nseq, size_t *mem_curr_seq, size_t mem_size_arr[], hsize_t mem_offset_arr[])
|
||||
{
|
||||
ssize_t ret_value; /* Return value */
|
||||
|
||||
FUNC_ENTER_NOAPI_NOINIT
|
||||
FUNC_ENTER_STATIC
|
||||
|
||||
HDassert(io_info);
|
||||
|
||||
@ -302,11 +302,11 @@ H5D_compact_readvv(const H5D_io_info_t *io_info,
|
||||
|
||||
done:
|
||||
FUNC_LEAVE_NOAPI(ret_value)
|
||||
} /* end H5D_compact_readvv() */
|
||||
} /* end H5D__compact_readvv() */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5D_compact_writevv
|
||||
* Function: H5D__compact_writevv
|
||||
*
|
||||
* Purpose: Writes some data vectors from a dataset into a buffer.
|
||||
* The data is in compact dataset. The address is relative
|
||||
@ -327,13 +327,13 @@ done:
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
static ssize_t
|
||||
H5D_compact_writevv(const H5D_io_info_t *io_info,
|
||||
H5D__compact_writevv(const H5D_io_info_t *io_info,
|
||||
size_t dset_max_nseq, size_t *dset_curr_seq, size_t dset_size_arr[], hsize_t dset_offset_arr[],
|
||||
size_t mem_max_nseq, size_t *mem_curr_seq, size_t mem_size_arr[], hsize_t mem_offset_arr[])
|
||||
{
|
||||
ssize_t ret_value; /* Return value */
|
||||
|
||||
FUNC_ENTER_NOAPI_NOINIT
|
||||
FUNC_ENTER_STATIC
|
||||
|
||||
HDassert(io_info);
|
||||
|
||||
@ -346,11 +346,11 @@ H5D_compact_writevv(const H5D_io_info_t *io_info,
|
||||
|
||||
done:
|
||||
FUNC_LEAVE_NOAPI(ret_value)
|
||||
} /* end H5D_compact_writevv() */
|
||||
} /* end H5D__compact_writevv() */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5D_compact_flush
|
||||
* Function: H5D__compact_flush
|
||||
*
|
||||
* Purpose: Writes dirty compact data to object header
|
||||
*
|
||||
@ -362,11 +362,11 @@ done:
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
static herr_t
|
||||
H5D_compact_flush(H5D_t *dset, hid_t dxpl_id)
|
||||
H5D__compact_flush(H5D_t *dset, hid_t dxpl_id)
|
||||
{
|
||||
herr_t ret_value = SUCCEED; /* Return value */
|
||||
|
||||
FUNC_ENTER_NOAPI_NOINIT
|
||||
FUNC_ENTER_STATIC
|
||||
|
||||
/* Sanity check */
|
||||
HDassert(dset);
|
||||
@ -380,11 +380,11 @@ H5D_compact_flush(H5D_t *dset, hid_t dxpl_id)
|
||||
|
||||
done:
|
||||
FUNC_LEAVE_NOAPI(ret_value)
|
||||
} /* end H5D_compact_flush() */
|
||||
} /* end H5D__compact_flush() */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5D_compact_copy
|
||||
* Function: H5D__compact_copy
|
||||
*
|
||||
* Purpose: Copy compact storage raw data from SRC file to DST file.
|
||||
*
|
||||
@ -396,7 +396,7 @@ done:
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
herr_t
|
||||
H5D_compact_copy(H5F_t *f_src, H5O_storage_compact_t *storage_src, H5F_t *f_dst,
|
||||
H5D__compact_copy(H5F_t *f_src, H5O_storage_compact_t *storage_src, H5F_t *f_dst,
|
||||
H5O_storage_compact_t *storage_dst, H5T_t *dt_src, H5O_copy_t *cpy_info,
|
||||
hid_t dxpl_id)
|
||||
{
|
||||
@ -409,7 +409,7 @@ H5D_compact_copy(H5F_t *f_src, H5O_storage_compact_t *storage_src, H5F_t *f_dst,
|
||||
hid_t buf_sid = -1; /* ID for buffer dataspace */
|
||||
herr_t ret_value = SUCCEED; /* Return value */
|
||||
|
||||
FUNC_ENTER_NOAPI(FAIL)
|
||||
FUNC_ENTER_PACKAGE
|
||||
|
||||
/* Check args */
|
||||
HDassert(f_src);
|
||||
@ -574,5 +574,5 @@ done:
|
||||
bkg = H5FL_BLK_FREE(type_conv, bkg);
|
||||
|
||||
FUNC_LEAVE_NOAPI(ret_value)
|
||||
} /* end H5D_compact_copy() */
|
||||
} /* end H5D__compact_copy() */
|
||||
|
||||
|
227
src/H5Dcontig.c
227
src/H5Dcontig.c
@ -95,20 +95,20 @@ typedef struct H5D_contig_writevv_ud_t {
|
||||
/********************/
|
||||
|
||||
/* Layout operation callbacks */
|
||||
static herr_t H5D_contig_construct(H5F_t *f, H5D_t *dset);
|
||||
static herr_t H5D_contig_io_init(const H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
|
||||
static herr_t H5D__contig_construct(H5F_t *f, H5D_t *dset);
|
||||
static herr_t H5D__contig_io_init(const H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
|
||||
hsize_t nelmts, const H5S_t *file_space, const H5S_t *mem_space,
|
||||
H5D_chunk_map_t *cm);
|
||||
static ssize_t H5D_contig_readvv(const H5D_io_info_t *io_info,
|
||||
static ssize_t H5D__contig_readvv(const H5D_io_info_t *io_info,
|
||||
size_t dset_max_nseq, size_t *dset_curr_seq, size_t dset_len_arr[], hsize_t dset_offset_arr[],
|
||||
size_t mem_max_nseq, size_t *mem_curr_seq, size_t mem_len_arr[], hsize_t mem_offset_arr[]);
|
||||
static ssize_t H5D_contig_writevv(const H5D_io_info_t *io_info,
|
||||
static ssize_t H5D__contig_writevv(const H5D_io_info_t *io_info,
|
||||
size_t dset_max_nseq, size_t *dset_curr_seq, size_t dset_len_arr[], hsize_t dset_offset_arr[],
|
||||
size_t mem_max_nseq, size_t *mem_curr_seq, size_t mem_len_arr[], hsize_t mem_offset_arr[]);
|
||||
static herr_t H5D_contig_flush(H5D_t *dset, hid_t dxpl_id);
|
||||
static herr_t H5D__contig_flush(H5D_t *dset, hid_t dxpl_id);
|
||||
|
||||
/* Helper routines */
|
||||
static herr_t H5D_contig_write_one(H5D_io_info_t *io_info, hsize_t offset,
|
||||
static herr_t H5D__contig_write_one(H5D_io_info_t *io_info, hsize_t offset,
|
||||
size_t size);
|
||||
|
||||
|
||||
@ -118,19 +118,19 @@ static herr_t H5D_contig_write_one(H5D_io_info_t *io_info, hsize_t offset,
|
||||
|
||||
/* Contiguous storage layout I/O ops */
|
||||
const H5D_layout_ops_t H5D_LOPS_CONTIG[1] = {{
|
||||
H5D_contig_construct,
|
||||
H5D__contig_construct,
|
||||
NULL,
|
||||
H5D_contig_is_space_alloc,
|
||||
H5D_contig_io_init,
|
||||
H5D_contig_read,
|
||||
H5D_contig_write,
|
||||
H5D__contig_is_space_alloc,
|
||||
H5D__contig_io_init,
|
||||
H5D__contig_read,
|
||||
H5D__contig_write,
|
||||
#ifdef H5_HAVE_PARALLEL
|
||||
H5D_contig_collective_read,
|
||||
H5D_contig_collective_write,
|
||||
H5D__contig_collective_read,
|
||||
H5D__contig_collective_write,
|
||||
#endif /* H5_HAVE_PARALLEL */
|
||||
H5D_contig_readvv,
|
||||
H5D_contig_writevv,
|
||||
H5D_contig_flush,
|
||||
H5D__contig_readvv,
|
||||
H5D__contig_writevv,
|
||||
H5D__contig_flush,
|
||||
NULL
|
||||
}};
|
||||
|
||||
@ -148,7 +148,7 @@ H5FL_BLK_EXTERN(type_conv);
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5D_contig_alloc
|
||||
* Function: H5D__contig_alloc
|
||||
*
|
||||
* Purpose: Allocate file space for a contiguously stored dataset
|
||||
*
|
||||
@ -160,11 +160,11 @@ H5FL_BLK_EXTERN(type_conv);
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
herr_t
|
||||
H5D_contig_alloc(H5F_t *f, hid_t dxpl_id, H5O_storage_contig_t *storage /*out */ )
|
||||
H5D__contig_alloc(H5F_t *f, hid_t dxpl_id, H5O_storage_contig_t *storage /*out */ )
|
||||
{
|
||||
herr_t ret_value = SUCCEED; /* Return value */
|
||||
|
||||
FUNC_ENTER_NOAPI(FAIL)
|
||||
FUNC_ENTER_PACKAGE
|
||||
|
||||
/* check args */
|
||||
HDassert(f);
|
||||
@ -176,11 +176,11 @@ H5D_contig_alloc(H5F_t *f, hid_t dxpl_id, H5O_storage_contig_t *storage /*out */
|
||||
|
||||
done:
|
||||
FUNC_LEAVE_NOAPI(ret_value)
|
||||
} /* end H5D_contig_alloc */
|
||||
} /* end H5D__contig_alloc */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5D_contig_fill
|
||||
* Function: H5D__contig_fill
|
||||
*
|
||||
* Purpose: Write fill values to a contiguously stored dataset.
|
||||
*
|
||||
@ -192,7 +192,7 @@ done:
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
herr_t
|
||||
H5D_contig_fill(H5D_t *dset, hid_t dxpl_id)
|
||||
H5D__contig_fill(H5D_t *dset, hid_t dxpl_id)
|
||||
{
|
||||
H5D_io_info_t ioinfo; /* Dataset I/O info */
|
||||
H5D_storage_t store; /* Union of storage info for dataset */
|
||||
@ -213,7 +213,7 @@ H5D_contig_fill(H5D_t *dset, hid_t dxpl_id)
|
||||
hid_t my_dxpl_id; /* DXPL ID to use for this operation */
|
||||
herr_t ret_value = SUCCEED; /* Return value */
|
||||
|
||||
FUNC_ENTER_NOAPI(FAIL)
|
||||
FUNC_ENTER_PACKAGE
|
||||
|
||||
/* Check args */
|
||||
HDassert(TRUE == H5P_isa_class(dxpl_id, H5P_DATASET_XFER));
|
||||
@ -249,7 +249,7 @@ H5D_contig_fill(H5D_t *dset, hid_t dxpl_id)
|
||||
#endif /* H5_HAVE_PARALLEL */
|
||||
|
||||
/* Fill the DXPL cache values for later use */
|
||||
if(H5D_get_dxpl_cache(my_dxpl_id, &dxpl_cache) < 0)
|
||||
if(H5D__get_dxpl_cache(my_dxpl_id, &dxpl_cache) < 0)
|
||||
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't fill dxpl cache")
|
||||
|
||||
/* Initialize storage info for this dataset */
|
||||
@ -262,7 +262,7 @@ H5D_contig_fill(H5D_t *dset, hid_t dxpl_id)
|
||||
H5_ASSIGN_OVERFLOW(npoints, snpoints, hssize_t, size_t);
|
||||
|
||||
/* Initialize the fill value buffer */
|
||||
if(H5D_fill_init(&fb_info, NULL, NULL, NULL, NULL, NULL,
|
||||
if(H5D__fill_init(&fb_info, NULL, NULL, NULL, NULL, NULL,
|
||||
&dset->shared->dcpl_cache.fill,
|
||||
dset->shared->type, dset->shared->type_id, npoints,
|
||||
dxpl_cache->max_temp_buf, my_dxpl_id) < 0)
|
||||
@ -293,7 +293,7 @@ H5D_contig_fill(H5D_t *dset, hid_t dxpl_id)
|
||||
/* Check for VL datatype & non-default fill value */
|
||||
if(fb_info.has_vlen_fill_type)
|
||||
/* Re-fill the buffer to use for this I/O operation */
|
||||
if(H5D_fill_refill_vl(&fb_info, curr_points, my_dxpl_id) < 0)
|
||||
if(H5D__fill_refill_vl(&fb_info, curr_points, my_dxpl_id) < 0)
|
||||
HGOTO_ERROR(H5E_DATASET, H5E_CANTCONVERT, FAIL, "can't refill fill value buffer")
|
||||
|
||||
#ifdef H5_HAVE_PARALLEL
|
||||
@ -302,7 +302,7 @@ H5D_contig_fill(H5D_t *dset, hid_t dxpl_id)
|
||||
/* Write the chunks out from only one process */
|
||||
/* !! Use the internal "independent" DXPL!! -QAK */
|
||||
if(H5_PAR_META_WRITE == mpi_rank)
|
||||
if(H5D_contig_write_one(&ioinfo, offset, size) < 0)
|
||||
if(H5D__contig_write_one(&ioinfo, offset, size) < 0)
|
||||
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to write fill value to dataset")
|
||||
|
||||
/* Indicate that blocks are being written */
|
||||
@ -311,7 +311,7 @@ H5D_contig_fill(H5D_t *dset, hid_t dxpl_id)
|
||||
else {
|
||||
#endif /* H5_HAVE_PARALLEL */
|
||||
H5_CHECK_OVERFLOW(size, size_t, hsize_t);
|
||||
if(H5D_contig_write_one(&ioinfo, offset, size) < 0)
|
||||
if(H5D__contig_write_one(&ioinfo, offset, size) < 0)
|
||||
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to write fill value to dataset")
|
||||
#ifdef H5_HAVE_PARALLEL
|
||||
} /* end else */
|
||||
@ -336,15 +336,15 @@ H5D_contig_fill(H5D_t *dset, hid_t dxpl_id)
|
||||
|
||||
done:
|
||||
/* Release the fill buffer info, if it's been initialized */
|
||||
if(fb_info_init && H5D_fill_term(&fb_info) < 0)
|
||||
if(fb_info_init && H5D__fill_term(&fb_info) < 0)
|
||||
HDONE_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "Can't release fill buffer info")
|
||||
|
||||
FUNC_LEAVE_NOAPI(ret_value)
|
||||
} /* end H5D_contig_fill() */
|
||||
} /* end H5D__contig_fill() */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5D_contig_delete
|
||||
* Function: H5D__contig_delete
|
||||
*
|
||||
* Purpose: Delete the file space for a contiguously stored dataset
|
||||
*
|
||||
@ -356,11 +356,11 @@ done:
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
herr_t
|
||||
H5D_contig_delete(H5F_t *f, hid_t dxpl_id, const H5O_storage_t *storage)
|
||||
H5D__contig_delete(H5F_t *f, hid_t dxpl_id, const H5O_storage_t *storage)
|
||||
{
|
||||
herr_t ret_value = SUCCEED; /* Return value */
|
||||
|
||||
FUNC_ENTER_NOAPI(FAIL)
|
||||
FUNC_ENTER_PACKAGE
|
||||
|
||||
/* check args */
|
||||
HDassert(f);
|
||||
@ -372,36 +372,11 @@ H5D_contig_delete(H5F_t *f, hid_t dxpl_id, const H5O_storage_t *storage)
|
||||
|
||||
done:
|
||||
FUNC_LEAVE_NOAPI(ret_value)
|
||||
} /* end H5D_contig_delete */
|
||||
} /* end H5D__contig_delete */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5D_contig_get_addr
|
||||
*
|
||||
* Purpose: Get the offset of the contiguous data on disk
|
||||
*
|
||||
* Return: Non-negative on success/Negative on failure
|
||||
*
|
||||
* Programmer: Quincey Koziol
|
||||
* June 2, 2004
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
haddr_t
|
||||
H5D_contig_get_addr(const H5D_t *dset)
|
||||
{
|
||||
FUNC_ENTER_NOAPI_NOERR
|
||||
|
||||
/* check args */
|
||||
HDassert(dset);
|
||||
HDassert(dset->shared->layout.type == H5D_CONTIGUOUS);
|
||||
|
||||
FUNC_LEAVE_NOAPI(dset->shared->layout.storage.u.contig.addr)
|
||||
} /* end H5D_contig_get_addr() */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5D_contig_construct
|
||||
* Function: H5D__contig_construct
|
||||
*
|
||||
* Purpose: Constructs new contiguous layout information for dataset
|
||||
*
|
||||
@ -414,7 +389,7 @@ H5D_contig_get_addr(const H5D_t *dset)
|
||||
*/
|
||||
/* ARGSUSED */
|
||||
static herr_t
|
||||
H5D_contig_construct(H5F_t *f, H5D_t *dset)
|
||||
H5D__contig_construct(H5F_t *f, H5D_t *dset)
|
||||
{
|
||||
hssize_t snelmts; /* Temporary holder for number of elements in dataspace */
|
||||
hsize_t nelmts; /* Number of elements in dataspace */
|
||||
@ -427,7 +402,7 @@ H5D_contig_construct(H5F_t *f, H5D_t *dset)
|
||||
int i; /* Local index variable */
|
||||
herr_t ret_value = SUCCEED; /* Return value */
|
||||
|
||||
FUNC_ENTER_NOAPI_NOINIT
|
||||
FUNC_ENTER_STATIC
|
||||
|
||||
/* Sanity checks */
|
||||
HDassert(f);
|
||||
@ -477,11 +452,11 @@ H5D_contig_construct(H5F_t *f, H5D_t *dset)
|
||||
|
||||
done:
|
||||
FUNC_LEAVE_NOAPI(ret_value)
|
||||
} /* end H5D_contig_construct() */
|
||||
} /* end H5D__contig_construct() */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5D_contig_is_space_alloc
|
||||
* Function: H5D__contig_is_space_alloc
|
||||
*
|
||||
* Purpose: Query if space is allocated for layout
|
||||
*
|
||||
@ -493,11 +468,11 @@ done:
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
hbool_t
|
||||
H5D_contig_is_space_alloc(const H5O_storage_t *storage)
|
||||
H5D__contig_is_space_alloc(const H5O_storage_t *storage)
|
||||
{
|
||||
hbool_t ret_value; /* Return value */
|
||||
|
||||
FUNC_ENTER_NOAPI_NOINIT_NOERR
|
||||
FUNC_ENTER_PACKAGE_NOERR
|
||||
|
||||
/* Sanity checks */
|
||||
HDassert(storage);
|
||||
@ -506,11 +481,11 @@ H5D_contig_is_space_alloc(const H5O_storage_t *storage)
|
||||
ret_value = (hbool_t)H5F_addr_defined(storage->u.contig.addr);
|
||||
|
||||
FUNC_LEAVE_NOAPI(ret_value)
|
||||
} /* end H5D_contig_is_space_alloc() */
|
||||
} /* end H5D__contig_is_space_alloc() */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5D_contig_io_init
|
||||
* Function: H5D__contig_io_init
|
||||
*
|
||||
* Purpose: Performs initialization before any sort of I/O on the raw data
|
||||
*
|
||||
@ -522,21 +497,21 @@ H5D_contig_is_space_alloc(const H5O_storage_t *storage)
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
static herr_t
|
||||
H5D_contig_io_init(const H5D_io_info_t *io_info, const H5D_type_info_t UNUSED *type_info,
|
||||
H5D__contig_io_init(const H5D_io_info_t *io_info, const H5D_type_info_t UNUSED *type_info,
|
||||
hsize_t UNUSED nelmts, const H5S_t UNUSED *file_space, const H5S_t UNUSED *mem_space,
|
||||
H5D_chunk_map_t UNUSED *cm)
|
||||
{
|
||||
FUNC_ENTER_NOAPI_NOINIT_NOERR
|
||||
FUNC_ENTER_STATIC_NOERR
|
||||
|
||||
io_info->store->contig.dset_addr = io_info->dset->shared->layout.storage.u.contig.addr;
|
||||
io_info->store->contig.dset_size = io_info->dset->shared->layout.storage.u.contig.size;
|
||||
|
||||
FUNC_LEAVE_NOAPI(SUCCEED)
|
||||
} /* end H5D_contig_io_init() */
|
||||
} /* end H5D__contig_io_init() */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5D_contig_read
|
||||
* Function: H5D__contig_read
|
||||
*
|
||||
* Purpose: Read from a contiguous dataset.
|
||||
*
|
||||
@ -548,13 +523,13 @@ H5D_contig_io_init(const H5D_io_info_t *io_info, const H5D_type_info_t UNUSED *t
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
herr_t
|
||||
H5D_contig_read(H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
|
||||
H5D__contig_read(H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
|
||||
hsize_t nelmts, const H5S_t *file_space, const H5S_t *mem_space,
|
||||
H5D_chunk_map_t UNUSED *fm)
|
||||
{
|
||||
herr_t ret_value = SUCCEED; /*return value */
|
||||
|
||||
FUNC_ENTER_NOAPI_NOINIT
|
||||
FUNC_ENTER_PACKAGE
|
||||
|
||||
/* Sanity check */
|
||||
HDassert(io_info);
|
||||
@ -569,11 +544,11 @@ H5D_contig_read(H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
|
||||
|
||||
done:
|
||||
FUNC_LEAVE_NOAPI(ret_value)
|
||||
} /* end H5D_contig_read() */
|
||||
} /* end H5D__contig_read() */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5D_contig_write
|
||||
* Function: H5D__contig_write
|
||||
*
|
||||
* Purpose: Write to a contiguous dataset.
|
||||
*
|
||||
@ -585,13 +560,13 @@ done:
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
herr_t
|
||||
H5D_contig_write(H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
|
||||
H5D__contig_write(H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
|
||||
hsize_t nelmts, const H5S_t *file_space, const H5S_t *mem_space,
|
||||
H5D_chunk_map_t UNUSED *fm)
|
||||
{
|
||||
herr_t ret_value = SUCCEED; /*return value */
|
||||
|
||||
FUNC_ENTER_NOAPI_NOINIT
|
||||
FUNC_ENTER_PACKAGE
|
||||
|
||||
/* Sanity check */
|
||||
HDassert(io_info);
|
||||
@ -606,11 +581,11 @@ H5D_contig_write(H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
|
||||
|
||||
done:
|
||||
FUNC_LEAVE_NOAPI(ret_value)
|
||||
} /* end H5D_contig_write() */
|
||||
} /* end H5D__contig_write() */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5D_contig_write_one
|
||||
* Function: H5D__contig_write_one
|
||||
*
|
||||
* Purpose: Writes some data from a dataset into a buffer.
|
||||
* The data is contiguous. The address is relative to the base
|
||||
@ -624,7 +599,7 @@ done:
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
static herr_t
|
||||
H5D_contig_write_one(H5D_io_info_t *io_info, hsize_t offset, size_t size)
|
||||
H5D__contig_write_one(H5D_io_info_t *io_info, hsize_t offset, size_t size)
|
||||
{
|
||||
hsize_t dset_off = offset; /* Offset in dataset */
|
||||
size_t dset_len = size; /* Length in dataset */
|
||||
@ -634,23 +609,23 @@ H5D_contig_write_one(H5D_io_info_t *io_info, hsize_t offset, size_t size)
|
||||
size_t mem_curr_seq = 0; /* "Current sequence" in memory */
|
||||
herr_t ret_value = SUCCEED; /* Return value */
|
||||
|
||||
FUNC_ENTER_NOAPI_NOINIT
|
||||
FUNC_ENTER_STATIC
|
||||
|
||||
HDassert(io_info);
|
||||
|
||||
if(H5D_contig_writevv(io_info, (size_t)1, &dset_curr_seq, &dset_len, &dset_off,
|
||||
if(H5D__contig_writevv(io_info, (size_t)1, &dset_curr_seq, &dset_len, &dset_off,
|
||||
(size_t)1, &mem_curr_seq, &mem_len, &mem_off) < 0)
|
||||
HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "vector write failed")
|
||||
|
||||
done:
|
||||
FUNC_LEAVE_NOAPI(ret_value)
|
||||
} /* end H5D_contig_write_one() */
|
||||
} /* end H5D__contig_write_one() */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5D_contig_readvv_sieve_cb
|
||||
* Function: H5D__contig_readvv_sieve_cb
|
||||
*
|
||||
* Purpose: Callback operator for H5D_contig_readvv() with sieve buffer.
|
||||
* Purpose: Callback operator for H5D__contig_readvv() with sieve buffer.
|
||||
*
|
||||
* Return: Non-negative on success/Negative on failure
|
||||
*
|
||||
@ -660,7 +635,7 @@ done:
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
static herr_t
|
||||
H5D_contig_readvv_sieve_cb(hsize_t dst_off, hsize_t src_off, size_t len,
|
||||
H5D__contig_readvv_sieve_cb(hsize_t dst_off, hsize_t src_off, size_t len,
|
||||
void *_udata)
|
||||
{
|
||||
H5D_contig_readvv_sieve_ud_t *udata = (H5D_contig_readvv_sieve_ud_t *)_udata; /* User data for H5V_opvv() operator */
|
||||
@ -676,7 +651,7 @@ H5D_contig_readvv_sieve_cb(hsize_t dst_off, hsize_t src_off, size_t len,
|
||||
hsize_t max_data; /* Actual maximum size of data to cache */
|
||||
herr_t ret_value = SUCCEED; /* Return value */
|
||||
|
||||
FUNC_ENTER_NOAPI_NOINIT
|
||||
FUNC_ENTER_STATIC
|
||||
|
||||
/* Stash local copies of these value */
|
||||
if(dset_contig->sieve_buf != NULL) {
|
||||
@ -811,13 +786,13 @@ H5D_contig_readvv_sieve_cb(hsize_t dst_off, hsize_t src_off, size_t len,
|
||||
|
||||
done:
|
||||
FUNC_LEAVE_NOAPI(ret_value)
|
||||
} /* end H5D_contig_readvv_sieve_cb() */
|
||||
} /* end H5D__contig_readvv_sieve_cb() */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5D_contig_readvv_cb
|
||||
* Function: H5D__contig_readvv_cb
|
||||
*
|
||||
* Purpose: Callback operator for H5D_contig_readvv() without sieve buffer.
|
||||
* Purpose: Callback operator for H5D__contig_readvv() without sieve buffer.
|
||||
*
|
||||
* Return: Non-negative on success/Negative on failure
|
||||
*
|
||||
@ -827,12 +802,12 @@ done:
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
static herr_t
|
||||
H5D_contig_readvv_cb(hsize_t dst_off, hsize_t src_off, size_t len, void *_udata)
|
||||
H5D__contig_readvv_cb(hsize_t dst_off, hsize_t src_off, size_t len, void *_udata)
|
||||
{
|
||||
H5D_contig_readvv_ud_t *udata = (H5D_contig_readvv_ud_t *)_udata; /* User data for H5V_opvv() operator */
|
||||
herr_t ret_value = SUCCEED; /* Return value */
|
||||
|
||||
FUNC_ENTER_NOAPI_NOINIT
|
||||
FUNC_ENTER_STATIC
|
||||
|
||||
/* Write data */
|
||||
if(H5F_block_read(udata->file, H5FD_MEM_DRAW, (udata->dset_addr + dst_off),
|
||||
@ -841,11 +816,11 @@ H5D_contig_readvv_cb(hsize_t dst_off, hsize_t src_off, size_t len, void *_udata)
|
||||
|
||||
done:
|
||||
FUNC_LEAVE_NOAPI(ret_value)
|
||||
} /* end H5D_contig_readvv_cb() */
|
||||
} /* end H5D__contig_readvv_cb() */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5D_contig_readvv
|
||||
* Function: H5D__contig_readvv
|
||||
*
|
||||
* Purpose: Reads some data vectors from a dataset into a buffer.
|
||||
* The data is contiguous. The address is the start of the dataset,
|
||||
@ -863,13 +838,13 @@ done:
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
static ssize_t
|
||||
H5D_contig_readvv(const H5D_io_info_t *io_info,
|
||||
H5D__contig_readvv(const H5D_io_info_t *io_info,
|
||||
size_t dset_max_nseq, size_t *dset_curr_seq, size_t dset_len_arr[], hsize_t dset_off_arr[],
|
||||
size_t mem_max_nseq, size_t *mem_curr_seq, size_t mem_len_arr[], hsize_t mem_off_arr[])
|
||||
{
|
||||
ssize_t ret_value; /* Return value */
|
||||
|
||||
FUNC_ENTER_NOAPI_NOINIT
|
||||
FUNC_ENTER_STATIC
|
||||
|
||||
/* Check args */
|
||||
HDassert(io_info);
|
||||
@ -894,7 +869,7 @@ H5D_contig_readvv(const H5D_io_info_t *io_info,
|
||||
/* Call generic sequence operation routine */
|
||||
if((ret_value = H5V_opvv(dset_max_nseq, dset_curr_seq, dset_len_arr, dset_off_arr,
|
||||
mem_max_nseq, mem_curr_seq, mem_len_arr, mem_off_arr,
|
||||
H5D_contig_readvv_sieve_cb, &udata)) < 0)
|
||||
H5D__contig_readvv_sieve_cb, &udata)) < 0)
|
||||
HGOTO_ERROR(H5E_DATASET, H5E_CANTOPERATE, FAIL, "can't perform vectorized sieve buffer read")
|
||||
} /* end if */
|
||||
else {
|
||||
@ -909,19 +884,19 @@ H5D_contig_readvv(const H5D_io_info_t *io_info,
|
||||
/* Call generic sequence operation routine */
|
||||
if((ret_value = H5V_opvv(dset_max_nseq, dset_curr_seq, dset_len_arr, dset_off_arr,
|
||||
mem_max_nseq, mem_curr_seq, mem_len_arr, mem_off_arr,
|
||||
H5D_contig_readvv_cb, &udata)) < 0)
|
||||
H5D__contig_readvv_cb, &udata)) < 0)
|
||||
HGOTO_ERROR(H5E_DATASET, H5E_CANTOPERATE, FAIL, "can't perform vectorized read")
|
||||
} /* end else */
|
||||
|
||||
done:
|
||||
FUNC_LEAVE_NOAPI(ret_value)
|
||||
} /* end H5D_contig_readvv() */
|
||||
} /* end H5D__contig_readvv() */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5D_contig_writevv_sieve_cb
|
||||
* Function: H5D__contig_writevv_sieve_cb
|
||||
*
|
||||
* Purpose: Callback operator for H5D_contig_writevv() with sieve buffer.
|
||||
* Purpose: Callback operator for H5D__contig_writevv() with sieve buffer.
|
||||
*
|
||||
* Return: Non-negative on success/Negative on failure
|
||||
*
|
||||
@ -931,7 +906,7 @@ done:
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
static herr_t
|
||||
H5D_contig_writevv_sieve_cb(hsize_t dst_off, hsize_t src_off, size_t len,
|
||||
H5D__contig_writevv_sieve_cb(hsize_t dst_off, hsize_t src_off, size_t len,
|
||||
void *_udata)
|
||||
{
|
||||
H5D_contig_writevv_sieve_ud_t *udata = (H5D_contig_writevv_sieve_ud_t *)_udata; /* User data for H5V_opvv() operator */
|
||||
@ -947,7 +922,7 @@ H5D_contig_writevv_sieve_cb(hsize_t dst_off, hsize_t src_off, size_t len,
|
||||
hsize_t max_data; /* Actual maximum size of data to cache */
|
||||
herr_t ret_value = SUCCEED; /* Return value */
|
||||
|
||||
FUNC_ENTER_NOAPI_NOINIT
|
||||
FUNC_ENTER_STATIC
|
||||
|
||||
/* Stash local copies of these values */
|
||||
if(dset_contig->sieve_buf != NULL) {
|
||||
@ -1133,13 +1108,13 @@ if(dset_contig->sieve_size > len)
|
||||
|
||||
done:
|
||||
FUNC_LEAVE_NOAPI(ret_value)
|
||||
} /* end H5D_contig_writevv_sieve_cb() */
|
||||
} /* end H5D__contig_writevv_sieve_cb() */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5D_contig_writevv_cb
|
||||
* Function: H5D__contig_writevv_cb
|
||||
*
|
||||
* Purpose: Callback operator for H5D_contig_writevv().
|
||||
* Purpose: Callback operator for H5D__contig_writevv().
|
||||
*
|
||||
* Return: Non-negative on success/Negative on failure
|
||||
*
|
||||
@ -1149,12 +1124,12 @@ done:
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
static herr_t
|
||||
H5D_contig_writevv_cb(hsize_t dst_off, hsize_t src_off, size_t len, void *_udata)
|
||||
H5D__contig_writevv_cb(hsize_t dst_off, hsize_t src_off, size_t len, void *_udata)
|
||||
{
|
||||
H5D_contig_writevv_ud_t *udata = (H5D_contig_writevv_ud_t *)_udata; /* User data for H5V_opvv() operator */
|
||||
herr_t ret_value = SUCCEED; /* Return value */
|
||||
|
||||
FUNC_ENTER_NOAPI_NOINIT
|
||||
FUNC_ENTER_STATIC
|
||||
|
||||
/* Write data */
|
||||
if(H5F_block_write(udata->file, H5FD_MEM_DRAW, (udata->dset_addr + dst_off), len, udata->dxpl_id, (udata->wbuf + src_off)) < 0)
|
||||
@ -1162,11 +1137,11 @@ H5D_contig_writevv_cb(hsize_t dst_off, hsize_t src_off, size_t len, void *_udata
|
||||
|
||||
done:
|
||||
FUNC_LEAVE_NOAPI(ret_value)
|
||||
} /* end H5D_contig_writevv_cb() */
|
||||
} /* end H5D__contig_writevv_cb() */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5D_contig_writevv
|
||||
* Function: H5D__contig_writevv
|
||||
*
|
||||
* Purpose: Writes some data vectors into a dataset from vectors into a
|
||||
* buffer. The address is the start of the dataset,
|
||||
@ -1184,13 +1159,13 @@ done:
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
static ssize_t
|
||||
H5D_contig_writevv(const H5D_io_info_t *io_info,
|
||||
H5D__contig_writevv(const H5D_io_info_t *io_info,
|
||||
size_t dset_max_nseq, size_t *dset_curr_seq, size_t dset_len_arr[], hsize_t dset_off_arr[],
|
||||
size_t mem_max_nseq, size_t *mem_curr_seq, size_t mem_len_arr[], hsize_t mem_off_arr[])
|
||||
{
|
||||
ssize_t ret_value; /* Return value (Size of sequence in bytes) */
|
||||
|
||||
FUNC_ENTER_NOAPI_NOINIT
|
||||
FUNC_ENTER_STATIC
|
||||
|
||||
/* Check args */
|
||||
HDassert(io_info);
|
||||
@ -1215,7 +1190,7 @@ H5D_contig_writevv(const H5D_io_info_t *io_info,
|
||||
/* Call generic sequence operation routine */
|
||||
if((ret_value = H5V_opvv(dset_max_nseq, dset_curr_seq, dset_len_arr, dset_off_arr,
|
||||
mem_max_nseq, mem_curr_seq, mem_len_arr, mem_off_arr,
|
||||
H5D_contig_writevv_sieve_cb, &udata)) < 0)
|
||||
H5D__contig_writevv_sieve_cb, &udata)) < 0)
|
||||
HGOTO_ERROR(H5E_DATASET, H5E_CANTOPERATE, FAIL, "can't perform vectorized sieve buffer write")
|
||||
} /* end if */
|
||||
else {
|
||||
@ -1230,17 +1205,17 @@ H5D_contig_writevv(const H5D_io_info_t *io_info,
|
||||
/* Call generic sequence operation routine */
|
||||
if((ret_value = H5V_opvv(dset_max_nseq, dset_curr_seq, dset_len_arr, dset_off_arr,
|
||||
mem_max_nseq, mem_curr_seq, mem_len_arr, mem_off_arr,
|
||||
H5D_contig_writevv_cb, &udata)) < 0)
|
||||
H5D__contig_writevv_cb, &udata)) < 0)
|
||||
HGOTO_ERROR(H5E_DATASET, H5E_CANTOPERATE, FAIL, "can't perform vectorized read")
|
||||
} /* end else */
|
||||
|
||||
done:
|
||||
FUNC_LEAVE_NOAPI(ret_value)
|
||||
} /* end H5D_contig_writevv() */
|
||||
} /* end H5D__contig_writevv() */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5D_contig_flush
|
||||
* Function: H5D__contig_flush
|
||||
*
|
||||
* Purpose: Writes all dirty data to disk.
|
||||
*
|
||||
@ -1252,26 +1227,26 @@ done:
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
static herr_t
|
||||
H5D_contig_flush(H5D_t *dset, hid_t dxpl_id)
|
||||
H5D__contig_flush(H5D_t *dset, hid_t dxpl_id)
|
||||
{
|
||||
herr_t ret_value = SUCCEED; /* Return value */
|
||||
|
||||
FUNC_ENTER_NOAPI_NOINIT
|
||||
FUNC_ENTER_STATIC
|
||||
|
||||
/* Sanity check */
|
||||
HDassert(dset);
|
||||
|
||||
/* Flush any data in sieve buffer */
|
||||
if(H5D_flush_sieve_buf(dset, dxpl_id) < 0)
|
||||
if(H5D__flush_sieve_buf(dset, dxpl_id) < 0)
|
||||
HGOTO_ERROR(H5E_DATASET, H5E_CANTFLUSH, FAIL, "unable to flush sieve buffer")
|
||||
|
||||
done:
|
||||
FUNC_LEAVE_NOAPI(ret_value)
|
||||
} /* end H5D_contig_flush() */
|
||||
} /* end H5D__contig_flush() */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5D_contig_copy
|
||||
* Function: H5D__contig_copy
|
||||
*
|
||||
* Purpose: Copy contiguous storage raw data from SRC file to DST file.
|
||||
*
|
||||
@ -1283,7 +1258,7 @@ done:
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
herr_t
|
||||
H5D_contig_copy(H5F_t *f_src, const H5O_storage_contig_t *storage_src,
|
||||
H5D__contig_copy(H5F_t *f_src, const H5O_storage_contig_t *storage_src,
|
||||
H5F_t *f_dst, H5O_storage_contig_t *storage_dst, H5T_t *dt_src,
|
||||
H5O_copy_t *cpy_info, hid_t dxpl_id)
|
||||
{
|
||||
@ -1315,7 +1290,7 @@ H5D_contig_copy(H5F_t *f_src, const H5O_storage_contig_t *storage_src,
|
||||
hbool_t fix_ref = FALSE; /* Flag to indicate that ref values should be fixed */
|
||||
herr_t ret_value = SUCCEED; /* Return value */
|
||||
|
||||
FUNC_ENTER_NOAPI(FAIL)
|
||||
FUNC_ENTER_PACKAGE
|
||||
|
||||
/* Check args */
|
||||
HDassert(f_src);
|
||||
@ -1325,7 +1300,7 @@ H5D_contig_copy(H5F_t *f_src, const H5O_storage_contig_t *storage_src,
|
||||
HDassert(dt_src);
|
||||
|
||||
/* Allocate space for destination raw data */
|
||||
if(H5D_contig_alloc(f_dst, dxpl_id, storage_dst) < 0)
|
||||
if(H5D__contig_alloc(f_dst, dxpl_id, storage_dst) < 0)
|
||||
HGOTO_ERROR(H5E_IO, H5E_CANTINIT, FAIL, "unable to allocate contiguous storage")
|
||||
|
||||
/* Set up number of bytes to copy, and initial buffer size */
|
||||
@ -1532,5 +1507,5 @@ done:
|
||||
bkg = H5FL_BLK_FREE(type_conv, bkg);
|
||||
|
||||
FUNC_LEAVE_NOAPI(ret_value)
|
||||
} /* end H5D_contig_copy() */
|
||||
} /* end H5D__contig_copy() */
|
||||
|
||||
|
14
src/H5Ddbg.c
14
src/H5Ddbg.c
@ -20,7 +20,7 @@
|
||||
#define H5D_PACKAGE /*suppress error about including H5Dpkg */
|
||||
|
||||
/* Interface initialization */
|
||||
#define H5_INTERFACE_INIT_FUNC H5D_init_dbg_interface
|
||||
#define H5_INTERFACE_INIT_FUNC H5D__init_dbg_interface
|
||||
|
||||
|
||||
/***********/
|
||||
@ -64,9 +64,9 @@
|
||||
|
||||
/*--------------------------------------------------------------------------
|
||||
NAME
|
||||
H5D_init_dbg_interface -- Initialize interface-specific information
|
||||
H5D__init_dbg_interface -- Initialize interface-specific information
|
||||
USAGE
|
||||
herr_t H5D_init_dbg_interface()
|
||||
herr_t H5D__init_dbg_interface()
|
||||
RETURNS
|
||||
Non-negative on success/Negative on failure
|
||||
DESCRIPTION
|
||||
@ -75,12 +75,12 @@ DESCRIPTION
|
||||
|
||||
--------------------------------------------------------------------------*/
|
||||
static herr_t
|
||||
H5D_init_dbg_interface(void)
|
||||
H5D__init_dbg_interface(void)
|
||||
{
|
||||
FUNC_ENTER_NOAPI_NOINIT_NOERR
|
||||
FUNC_ENTER_STATIC_NOERR
|
||||
|
||||
FUNC_LEAVE_NOAPI(H5D_init())
|
||||
} /* H5D_init_dbg_interface() */
|
||||
} /* H5D__init_dbg_interface() */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
@ -113,7 +113,7 @@ H5Ddebug(hid_t dset_id)
|
||||
|
||||
/* Print B-tree information */
|
||||
if(H5D_CHUNKED == dset->shared->layout.type)
|
||||
(void)H5D_chunk_dump_index(dset, H5AC_dxpl_id, stdout);
|
||||
(void)H5D__chunk_dump_index(dset, H5AC_dxpl_id, stdout);
|
||||
else if(H5D_CONTIGUOUS == dset->shared->layout.type)
|
||||
HDfprintf(stdout, " %-10s %a\n", "Address:", dset->shared->layout.storage.u.contig.addr);
|
||||
|
||||
|
@ -34,7 +34,7 @@
|
||||
#define H5D_PACKAGE /*suppress error about including H5Dpkg */
|
||||
|
||||
/* Interface initialization */
|
||||
#define H5_INTERFACE_INIT_FUNC H5D_init_deprec_interface
|
||||
#define H5_INTERFACE_INIT_FUNC H5D__init_deprec_interface
|
||||
|
||||
|
||||
/***********/
|
||||
@ -66,7 +66,7 @@
|
||||
/********************/
|
||||
|
||||
#ifndef H5_NO_DEPRECATED_SYMBOLS
|
||||
static herr_t H5D_extend(H5D_t *dataset, const hsize_t *size, hid_t dxpl_id);
|
||||
static herr_t H5D__extend(H5D_t *dataset, const hsize_t *size, hid_t dxpl_id);
|
||||
#endif /* H5_NO_DEPRECATED_SYMBOLS */
|
||||
|
||||
|
||||
@ -88,9 +88,9 @@ static herr_t H5D_extend(H5D_t *dataset, const hsize_t *size, hid_t dxpl_id);
|
||||
|
||||
/*--------------------------------------------------------------------------
|
||||
NAME
|
||||
H5D_init_deprec_interface -- Initialize interface-specific information
|
||||
H5D__init_deprec_interface -- Initialize interface-specific information
|
||||
USAGE
|
||||
herr_t H5D_init_deprec_interface()
|
||||
herr_t H5D__init_deprec_interface()
|
||||
RETURNS
|
||||
Non-negative on success/Negative on failure
|
||||
DESCRIPTION
|
||||
@ -99,12 +99,12 @@ DESCRIPTION
|
||||
|
||||
--------------------------------------------------------------------------*/
|
||||
static herr_t
|
||||
H5D_init_deprec_interface(void)
|
||||
H5D__init_deprec_interface(void)
|
||||
{
|
||||
FUNC_ENTER_NOAPI_NOINIT_NOERR
|
||||
FUNC_ENTER_STATIC_NOERR
|
||||
|
||||
FUNC_LEAVE_NOAPI(H5D_init())
|
||||
} /* H5D_init_deprec_interface() */
|
||||
} /* H5D__init_deprec_interface() */
|
||||
|
||||
#ifndef H5_NO_DEPRECATED_SYMBOLS
|
||||
|
||||
@ -293,7 +293,7 @@ H5Dextend(hid_t dset_id, const hsize_t size[])
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no size specified")
|
||||
|
||||
/* Increase size */
|
||||
if(H5D_extend(dset, size, H5AC_dxpl_id) < 0)
|
||||
if(H5D__extend(dset, size, H5AC_dxpl_id) < 0)
|
||||
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to extend dataset")
|
||||
|
||||
done:
|
||||
@ -302,7 +302,7 @@ done:
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5D_extend
|
||||
* Function: H5D__extend
|
||||
*
|
||||
* Purpose: Increases the size of a dataset.
|
||||
*
|
||||
@ -314,7 +314,7 @@ done:
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
static herr_t
|
||||
H5D_extend(H5D_t *dataset, const hsize_t *size, hid_t dxpl_id)
|
||||
H5D__extend(H5D_t *dataset, const hsize_t *size, hid_t dxpl_id)
|
||||
{
|
||||
htri_t changed; /* Flag to indicate that the dataspace was successfully extended */
|
||||
H5S_t *space; /* Dataset's dataspace */
|
||||
@ -323,14 +323,14 @@ H5D_extend(H5D_t *dataset, const hsize_t *size, hid_t dxpl_id)
|
||||
H5O_fill_t *fill; /* Dataset's fill value */
|
||||
herr_t ret_value = SUCCEED; /* Return value */
|
||||
|
||||
FUNC_ENTER_NOAPI_NOINIT
|
||||
FUNC_ENTER_STATIC
|
||||
|
||||
/* Check args */
|
||||
HDassert(dataset);
|
||||
HDassert(size);
|
||||
|
||||
/* Check if the filters in the DCPL will need to encode, and if so, can they? */
|
||||
if(H5D_check_filters(dataset) < 0)
|
||||
if(H5D__check_filters(dataset) < 0)
|
||||
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't apply filters")
|
||||
|
||||
/*
|
||||
@ -352,26 +352,26 @@ H5D_extend(H5D_t *dataset, const hsize_t *size, hid_t dxpl_id)
|
||||
if(changed) {
|
||||
/* Update the index values for the cached chunks for this dataset */
|
||||
if(H5D_CHUNKED == dataset->shared->layout.type) {
|
||||
if(H5D_chunk_set_info(dataset) < 0)
|
||||
if(H5D__chunk_set_info(dataset) < 0)
|
||||
HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "unable to update # of chunks")
|
||||
if(H5D_chunk_update_cache(dataset, dxpl_id) < 0)
|
||||
if(H5D__chunk_update_cache(dataset, dxpl_id) < 0)
|
||||
HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "unable to update cached chunk indices")
|
||||
} /* end if */
|
||||
|
||||
/* Allocate space for the new parts of the dataset, if appropriate */
|
||||
fill = &dataset->shared->dcpl_cache.fill;
|
||||
if(fill->alloc_time == H5D_ALLOC_TIME_EARLY)
|
||||
if(H5D_alloc_storage(dataset, dxpl_id, H5D_ALLOC_EXTEND, FALSE,
|
||||
if(H5D__alloc_storage(dataset, dxpl_id, H5D_ALLOC_EXTEND, FALSE,
|
||||
curr_dims) < 0)
|
||||
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to initialize dataset with fill value")
|
||||
|
||||
/* Mark the dataspace as dirty, for later writing to the file */
|
||||
if(H5D_mark(dataset, dxpl_id, H5D_MARK_SPACE) < 0)
|
||||
if(H5D__mark(dataset, dxpl_id, H5D_MARK_SPACE) < 0)
|
||||
HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "unable to mark dataspace as dirty")
|
||||
} /* end if */
|
||||
|
||||
done:
|
||||
FUNC_LEAVE_NOAPI(ret_value)
|
||||
} /* end H5D_extend() */
|
||||
} /* end H5D__extend() */
|
||||
#endif /* H5_NO_DEPRECATED_SYMBOLS */
|
||||
|
||||
|
146
src/H5Defl.c
146
src/H5Defl.c
@ -63,21 +63,21 @@ typedef struct H5D_efl_writevv_ud_t {
|
||||
/********************/
|
||||
|
||||
/* Layout operation callbacks */
|
||||
static herr_t H5D_efl_construct(H5F_t *f, H5D_t *dset);
|
||||
static herr_t H5D_efl_io_init(const H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
|
||||
static herr_t H5D__efl_construct(H5F_t *f, H5D_t *dset);
|
||||
static herr_t H5D__efl_io_init(const H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
|
||||
hsize_t nelmts, const H5S_t *file_space, const H5S_t *mem_space,
|
||||
H5D_chunk_map_t *cm);
|
||||
static ssize_t H5D_efl_readvv(const H5D_io_info_t *io_info,
|
||||
static ssize_t H5D__efl_readvv(const H5D_io_info_t *io_info,
|
||||
size_t dset_max_nseq, size_t *dset_curr_seq, size_t dset_len_arr[], hsize_t dset_offset_arr[],
|
||||
size_t mem_max_nseq, size_t *mem_curr_seq, size_t mem_len_arr[], hsize_t mem_offset_arr[]);
|
||||
static ssize_t H5D_efl_writevv(const H5D_io_info_t *io_info,
|
||||
static ssize_t H5D__efl_writevv(const H5D_io_info_t *io_info,
|
||||
size_t dset_max_nseq, size_t *dset_curr_seq, size_t dset_len_arr[], hsize_t dset_offset_arr[],
|
||||
size_t mem_max_nseq, size_t *mem_curr_seq, size_t mem_len_arr[], hsize_t mem_offset_arr[]);
|
||||
|
||||
/* Helper routines */
|
||||
static herr_t H5D_efl_read(const H5O_efl_t *efl, haddr_t addr, size_t size,
|
||||
static herr_t H5D__efl_read(const H5O_efl_t *efl, haddr_t addr, size_t size,
|
||||
uint8_t *buf);
|
||||
static herr_t H5D_efl_write(const H5O_efl_t *efl, haddr_t addr, size_t size,
|
||||
static herr_t H5D__efl_write(const H5O_efl_t *efl, haddr_t addr, size_t size,
|
||||
const uint8_t *buf);
|
||||
|
||||
|
||||
@ -87,18 +87,18 @@ static herr_t H5D_efl_write(const H5O_efl_t *efl, haddr_t addr, size_t size,
|
||||
|
||||
/* External File List (EFL) storage layout I/O ops */
|
||||
const H5D_layout_ops_t H5D_LOPS_EFL[1] = {{
|
||||
H5D_efl_construct,
|
||||
H5D__efl_construct,
|
||||
NULL,
|
||||
H5D_efl_is_space_alloc,
|
||||
H5D_efl_io_init,
|
||||
H5D_contig_read,
|
||||
H5D_contig_write,
|
||||
H5D__efl_is_space_alloc,
|
||||
H5D__efl_io_init,
|
||||
H5D__contig_read,
|
||||
H5D__contig_write,
|
||||
#ifdef H5_HAVE_PARALLEL
|
||||
NULL,
|
||||
NULL,
|
||||
#endif /* H5_HAVE_PARALLEL */
|
||||
H5D_efl_readvv,
|
||||
H5D_efl_writevv,
|
||||
H5D__efl_readvv,
|
||||
H5D__efl_writevv,
|
||||
NULL,
|
||||
NULL
|
||||
}};
|
||||
@ -111,7 +111,7 @@ const H5D_layout_ops_t H5D_LOPS_EFL[1] = {{
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5D_efl_construct
|
||||
* Function: H5D__efl_construct
|
||||
*
|
||||
* Purpose: Constructs new EFL layout information for dataset
|
||||
*
|
||||
@ -123,7 +123,7 @@ const H5D_layout_ops_t H5D_LOPS_EFL[1] = {{
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
static herr_t
|
||||
H5D_efl_construct(H5F_t *f, H5D_t *dset)
|
||||
H5D__efl_construct(H5F_t *f, H5D_t *dset)
|
||||
{
|
||||
size_t dt_size; /* Size of datatype */
|
||||
hsize_t dim[H5O_LAYOUT_NDIMS]; /* Current size of data in elements */
|
||||
@ -136,7 +136,7 @@ H5D_efl_construct(H5F_t *f, H5D_t *dset)
|
||||
int i; /* Local index variable */
|
||||
herr_t ret_value = SUCCEED; /* Return value */
|
||||
|
||||
FUNC_ENTER_NOAPI_NOINIT
|
||||
FUNC_ENTER_STATIC
|
||||
|
||||
/* Sanity checks */
|
||||
HDassert(f);
|
||||
@ -182,11 +182,11 @@ H5D_efl_construct(H5F_t *f, H5D_t *dset)
|
||||
|
||||
done:
|
||||
FUNC_LEAVE_NOAPI(ret_value)
|
||||
} /* end H5D_efl_construct() */
|
||||
} /* end H5D__efl_construct() */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5D_efl_is_space_alloc
|
||||
* Function: H5D__efl_is_space_alloc
|
||||
*
|
||||
* Purpose: Query if space is allocated for layout
|
||||
*
|
||||
@ -198,20 +198,20 @@ done:
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
hbool_t
|
||||
H5D_efl_is_space_alloc(const H5O_storage_t UNUSED *storage)
|
||||
H5D__efl_is_space_alloc(const H5O_storage_t UNUSED *storage)
|
||||
{
|
||||
FUNC_ENTER_NOAPI_NOINIT_NOERR
|
||||
FUNC_ENTER_PACKAGE_NOERR
|
||||
|
||||
/* Sanity checks */
|
||||
HDassert(storage);
|
||||
|
||||
/* EFL storage is currently always treated as allocated */
|
||||
FUNC_LEAVE_NOAPI(TRUE)
|
||||
} /* end H5D_efl_is_space_alloc() */
|
||||
} /* end H5D__efl_is_space_alloc() */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5D_efl_io_init
|
||||
* Function: H5D__efl_io_init
|
||||
*
|
||||
* Purpose: Performs initialization before any sort of I/O on the raw data
|
||||
*
|
||||
@ -223,20 +223,20 @@ H5D_efl_is_space_alloc(const H5O_storage_t UNUSED *storage)
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
static herr_t
|
||||
H5D_efl_io_init(const H5D_io_info_t *io_info, const H5D_type_info_t UNUSED *type_info,
|
||||
H5D__efl_io_init(const H5D_io_info_t *io_info, const H5D_type_info_t UNUSED *type_info,
|
||||
hsize_t UNUSED nelmts, const H5S_t UNUSED *file_space, const H5S_t UNUSED *mem_space,
|
||||
H5D_chunk_map_t UNUSED *cm)
|
||||
{
|
||||
FUNC_ENTER_NOAPI_NOINIT_NOERR
|
||||
FUNC_ENTER_STATIC_NOERR
|
||||
|
||||
HDmemcpy(&io_info->store->efl, &(io_info->dset->shared->dcpl_cache.efl), sizeof(H5O_efl_t));
|
||||
|
||||
FUNC_LEAVE_NOAPI(SUCCEED)
|
||||
} /* end H5D_efl_io_init() */
|
||||
} /* end H5D__efl_io_init() */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5D_efl_read
|
||||
* Function: H5D__efl_read
|
||||
*
|
||||
* Purpose: Reads data from an external file list. It is an error to
|
||||
* read past the logical end of file, but reading past the end
|
||||
@ -254,7 +254,7 @@ H5D_efl_io_init(const H5D_io_info_t *io_info, const H5D_type_info_t UNUSED *type
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
static herr_t
|
||||
H5D_efl_read(const H5O_efl_t *efl, haddr_t addr, size_t size, uint8_t *buf)
|
||||
H5D__efl_read(const H5O_efl_t *efl, haddr_t addr, size_t size, uint8_t *buf)
|
||||
{
|
||||
int fd = -1;
|
||||
size_t to_read;
|
||||
@ -267,40 +267,40 @@ H5D_efl_read(const H5O_efl_t *efl, haddr_t addr, size_t size, uint8_t *buf)
|
||||
size_t u; /* Local index variable */
|
||||
herr_t ret_value = SUCCEED; /* Return value */
|
||||
|
||||
FUNC_ENTER_NOAPI_NOINIT
|
||||
FUNC_ENTER_STATIC
|
||||
|
||||
/* Check args */
|
||||
HDassert(efl && efl->nused>0);
|
||||
HDassert(efl && efl->nused > 0);
|
||||
HDassert(H5F_addr_defined(addr));
|
||||
HDassert(size < SIZET_MAX);
|
||||
HDassert(buf || 0 == size);
|
||||
|
||||
/* Find the first efl member from which to read */
|
||||
for (u=0, cur=0; u<efl->nused; u++) {
|
||||
if (H5O_EFL_UNLIMITED==efl->slot[u].size || addr < cur+efl->slot[u].size) {
|
||||
if(H5O_EFL_UNLIMITED == efl->slot[u].size || addr < cur + efl->slot[u].size) {
|
||||
skip = addr - cur;
|
||||
break;
|
||||
}
|
||||
} /* end if */
|
||||
cur += efl->slot[u].size;
|
||||
}
|
||||
} /* end for */
|
||||
|
||||
/* Read the data */
|
||||
while(size) {
|
||||
HDassert(buf);
|
||||
if(u>=efl->nused)
|
||||
if(u >= efl->nused)
|
||||
HGOTO_ERROR(H5E_EFL, H5E_OVERFLOW, FAIL, "read past logical end of file")
|
||||
if(H5F_OVERFLOW_HSIZET2OFFT (efl->slot[u].offset + skip))
|
||||
if(H5F_OVERFLOW_HSIZET2OFFT(efl->slot[u].offset + skip))
|
||||
HGOTO_ERROR(H5E_EFL, H5E_OVERFLOW, FAIL, "external file address overflowed")
|
||||
if((fd = HDopen(efl->slot[u].name, O_RDONLY, 0)) < 0)
|
||||
HGOTO_ERROR(H5E_EFL, H5E_CANTOPENFILE, FAIL, "unable to open external raw data file")
|
||||
if(HDlseek(fd, (off_t)(efl->slot[u].offset + skip), SEEK_SET) < 0)
|
||||
HGOTO_ERROR(H5E_EFL, H5E_SEEKERROR, FAIL, "unable to seek in external raw data file")
|
||||
#ifndef NDEBUG
|
||||
tempto_read = MIN(efl->slot[u].size-skip,(hsize_t)size);
|
||||
H5_CHECK_OVERFLOW(tempto_read,hsize_t,size_t);
|
||||
tempto_read = MIN(efl->slot[u].size-skip, (hsize_t)size);
|
||||
H5_CHECK_OVERFLOW(tempto_read, hsize_t, size_t);
|
||||
to_read = (size_t)tempto_read;
|
||||
#else /* NDEBUG */
|
||||
to_read = MIN((size_t)(efl->slot[u].size-skip), size);
|
||||
to_read = MIN((size_t)(efl->slot[u].size - skip), size);
|
||||
#endif /* NDEBUG */
|
||||
if((n = HDread(fd, buf, to_read)) < 0)
|
||||
HGOTO_ERROR(H5E_EFL, H5E_READERROR, FAIL, "read error in external raw data file")
|
||||
@ -312,18 +312,18 @@ H5D_efl_read(const H5O_efl_t *efl, haddr_t addr, size_t size, uint8_t *buf)
|
||||
buf += to_read;
|
||||
skip = 0;
|
||||
u++;
|
||||
}
|
||||
} /* end while */
|
||||
|
||||
done:
|
||||
if (fd>=0)
|
||||
HDclose (fd);
|
||||
if(fd >= 0)
|
||||
HDclose(fd);
|
||||
|
||||
FUNC_LEAVE_NOAPI(ret_value)
|
||||
}
|
||||
} /* end H5D__efl_read() */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5D_efl_write
|
||||
* Function: H5D__efl_write
|
||||
*
|
||||
* Purpose: Writes data to an external file list. It is an error to
|
||||
* write past the logical end of file, but writing past the end
|
||||
@ -341,7 +341,7 @@ done:
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
static herr_t
|
||||
H5D_efl_write(const H5O_efl_t *efl, haddr_t addr, size_t size, const uint8_t *buf)
|
||||
H5D__efl_write(const H5O_efl_t *efl, haddr_t addr, size_t size, const uint8_t *buf)
|
||||
{
|
||||
int fd = -1;
|
||||
size_t to_write;
|
||||
@ -353,7 +353,7 @@ H5D_efl_write(const H5O_efl_t *efl, haddr_t addr, size_t size, const uint8_t *bu
|
||||
size_t u; /* Local index variable */
|
||||
herr_t ret_value = SUCCEED; /* Return value */
|
||||
|
||||
FUNC_ENTER_NOAPI_NOINIT
|
||||
FUNC_ENTER_STATIC
|
||||
|
||||
/* Check args */
|
||||
HDassert(efl && efl->nused > 0);
|
||||
@ -377,7 +377,7 @@ H5D_efl_write(const H5O_efl_t *efl, haddr_t addr, size_t size, const uint8_t *bu
|
||||
HGOTO_ERROR(H5E_EFL, H5E_OVERFLOW, FAIL, "write past logical end of file")
|
||||
if(H5F_OVERFLOW_HSIZET2OFFT(efl->slot[u].offset + skip))
|
||||
HGOTO_ERROR(H5E_EFL, H5E_OVERFLOW, FAIL, "external file address overflowed")
|
||||
if((fd = HDopen(efl->slot[u].name, O_CREAT|O_RDWR, 0666)) < 0) {
|
||||
if((fd = HDopen(efl->slot[u].name, O_CREAT | O_RDWR, 0666)) < 0) {
|
||||
if(HDaccess(efl->slot[u].name, F_OK) < 0)
|
||||
HGOTO_ERROR(H5E_EFL, H5E_CANTOPENFILE, FAIL, "external raw data file does not exist")
|
||||
else
|
||||
@ -392,7 +392,7 @@ H5D_efl_write(const H5O_efl_t *efl, haddr_t addr, size_t size, const uint8_t *bu
|
||||
#else /* NDEBUG */
|
||||
to_write = MIN((size_t)(efl->slot[u].size - skip), size);
|
||||
#endif /* NDEBUG */
|
||||
if((size_t)HDwrite(fd, buf, to_write)!=to_write)
|
||||
if((size_t)HDwrite(fd, buf, to_write) != to_write)
|
||||
HGOTO_ERROR(H5E_EFL, H5E_READERROR, FAIL, "write error in external raw data file")
|
||||
HDclose (fd);
|
||||
fd = -1;
|
||||
@ -407,13 +407,13 @@ done:
|
||||
HDclose(fd);
|
||||
|
||||
FUNC_LEAVE_NOAPI(ret_value)
|
||||
} /* end H5D_efl_write() */
|
||||
} /* end H5D__efl_write() */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5D_efl_readvv_cb
|
||||
* Function: H5D__efl_readvv_cb
|
||||
*
|
||||
* Purpose: Callback operator for H5D_efl_readvv().
|
||||
* Purpose: Callback operator for H5D__efl_readvv().
|
||||
*
|
||||
* Return: Non-negative on success/Negative on failure
|
||||
*
|
||||
@ -423,24 +423,24 @@ done:
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
static herr_t
|
||||
H5D_efl_readvv_cb(hsize_t dst_off, hsize_t src_off, size_t len, void *_udata)
|
||||
H5D__efl_readvv_cb(hsize_t dst_off, hsize_t src_off, size_t len, void *_udata)
|
||||
{
|
||||
H5D_efl_readvv_ud_t *udata = (H5D_efl_readvv_ud_t *)_udata; /* User data for H5V_opvv() operator */
|
||||
herr_t ret_value = SUCCEED; /* Return value */
|
||||
|
||||
FUNC_ENTER_NOAPI_NOINIT
|
||||
FUNC_ENTER_STATIC
|
||||
|
||||
/* Read data */
|
||||
if(H5D_efl_read(udata->efl, dst_off, len, (udata->rbuf + src_off)) < 0)
|
||||
if(H5D__efl_read(udata->efl, dst_off, len, (udata->rbuf + src_off)) < 0)
|
||||
HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "EFL read failed")
|
||||
|
||||
done:
|
||||
FUNC_LEAVE_NOAPI(ret_value)
|
||||
} /* end H5D_efl_readvv_cb() */
|
||||
} /* end H5D__efl_readvv_cb() */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5D_efl_readvv
|
||||
* Function: H5D__efl_readvv
|
||||
*
|
||||
* Purpose: Reads data from an external file list. It is an error to
|
||||
* read past the logical end of file, but reading past the end
|
||||
@ -455,14 +455,14 @@ done:
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
static ssize_t
|
||||
H5D_efl_readvv(const H5D_io_info_t *io_info,
|
||||
H5D__efl_readvv(const H5D_io_info_t *io_info,
|
||||
size_t dset_max_nseq, size_t *dset_curr_seq, size_t dset_len_arr[], hsize_t dset_off_arr[],
|
||||
size_t mem_max_nseq, size_t *mem_curr_seq, size_t mem_len_arr[], hsize_t mem_off_arr[])
|
||||
{
|
||||
H5D_efl_readvv_ud_t udata; /* User data for H5V_opvv() operator */
|
||||
ssize_t ret_value; /* Return value (Total size of sequence in bytes) */
|
||||
|
||||
FUNC_ENTER_NOAPI_NOINIT
|
||||
FUNC_ENTER_STATIC
|
||||
|
||||
/* Check args */
|
||||
HDassert(io_info);
|
||||
@ -482,18 +482,18 @@ H5D_efl_readvv(const H5D_io_info_t *io_info,
|
||||
/* Call generic sequence operation routine */
|
||||
if((ret_value = H5V_opvv(dset_max_nseq, dset_curr_seq, dset_len_arr, dset_off_arr,
|
||||
mem_max_nseq, mem_curr_seq, mem_len_arr, mem_off_arr,
|
||||
H5D_efl_readvv_cb, &udata)) < 0)
|
||||
H5D__efl_readvv_cb, &udata)) < 0)
|
||||
HGOTO_ERROR(H5E_DATASET, H5E_CANTOPERATE, FAIL, "can't perform vectorized EFL read")
|
||||
|
||||
done:
|
||||
FUNC_LEAVE_NOAPI(ret_value)
|
||||
} /* end H5D_efl_readvv() */
|
||||
} /* end H5D__efl_readvv() */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5D_efl_writevv_cb
|
||||
* Function: H5D__efl_writevv_cb
|
||||
*
|
||||
* Purpose: Callback operator for H5D_efl_writevv().
|
||||
* Purpose: Callback operator for H5D__efl_writevv().
|
||||
*
|
||||
* Return: Non-negative on success/Negative on failure
|
||||
*
|
||||
@ -503,24 +503,24 @@ done:
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
static herr_t
|
||||
H5D_efl_writevv_cb(hsize_t dst_off, hsize_t src_off, size_t len, void *_udata)
|
||||
H5D__efl_writevv_cb(hsize_t dst_off, hsize_t src_off, size_t len, void *_udata)
|
||||
{
|
||||
H5D_efl_writevv_ud_t *udata = (H5D_efl_writevv_ud_t *)_udata; /* User data for H5V_opvv() operator */
|
||||
herr_t ret_value = SUCCEED; /* Return value */
|
||||
|
||||
FUNC_ENTER_NOAPI_NOINIT
|
||||
FUNC_ENTER_STATIC
|
||||
|
||||
/* Write data */
|
||||
if(H5D_efl_write(udata->efl, dst_off, len, (udata->wbuf + src_off)) < 0)
|
||||
if(H5D__efl_write(udata->efl, dst_off, len, (udata->wbuf + src_off)) < 0)
|
||||
HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "EFL write failed")
|
||||
|
||||
done:
|
||||
FUNC_LEAVE_NOAPI(ret_value)
|
||||
} /* end H5D_efl_writevv_cb() */
|
||||
} /* end H5D__efl_writevv_cb() */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5D_efl_writevv
|
||||
* Function: H5D__efl_writevv
|
||||
*
|
||||
* Purpose: Writes data to an external file list. It is an error to
|
||||
* write past the logical end of file, but writing past the end
|
||||
@ -535,14 +535,14 @@ done:
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
static ssize_t
|
||||
H5D_efl_writevv(const H5D_io_info_t *io_info,
|
||||
H5D__efl_writevv(const H5D_io_info_t *io_info,
|
||||
size_t dset_max_nseq, size_t *dset_curr_seq, size_t dset_len_arr[], hsize_t dset_off_arr[],
|
||||
size_t mem_max_nseq, size_t *mem_curr_seq, size_t mem_len_arr[], hsize_t mem_off_arr[])
|
||||
{
|
||||
H5D_efl_writevv_ud_t udata; /* User data for H5V_opvv() operator */
|
||||
ssize_t ret_value; /* Return value (Total size of sequence in bytes) */
|
||||
|
||||
FUNC_ENTER_NOAPI_NOINIT
|
||||
FUNC_ENTER_STATIC
|
||||
|
||||
/* Check args */
|
||||
HDassert(io_info);
|
||||
@ -562,15 +562,15 @@ H5D_efl_writevv(const H5D_io_info_t *io_info,
|
||||
/* Call generic sequence operation routine */
|
||||
if((ret_value = H5V_opvv(dset_max_nseq, dset_curr_seq, dset_len_arr, dset_off_arr,
|
||||
mem_max_nseq, mem_curr_seq, mem_len_arr, mem_off_arr,
|
||||
H5D_efl_writevv_cb, &udata)) < 0)
|
||||
H5D__efl_writevv_cb, &udata)) < 0)
|
||||
HGOTO_ERROR(H5E_DATASET, H5E_CANTOPERATE, FAIL, "can't perform vectorized EFL write")
|
||||
done:
|
||||
FUNC_LEAVE_NOAPI(ret_value)
|
||||
} /* end H5D_efl_writevv() */
|
||||
} /* end H5D__efl_writevv() */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5D_efl_bh_size
|
||||
* Function: H5D__efl_bh_info
|
||||
*
|
||||
* Purpose: Retrieve the amount of heap storage used for External File
|
||||
* List message
|
||||
@ -583,11 +583,11 @@ done:
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
herr_t
|
||||
H5D_efl_bh_info(H5F_t *f, hid_t dxpl_id, H5O_efl_t *efl, hsize_t *heap_size)
|
||||
H5D__efl_bh_info(H5F_t *f, hid_t dxpl_id, H5O_efl_t *efl, hsize_t *heap_size)
|
||||
{
|
||||
herr_t ret_value = SUCCEED; /* Return value */
|
||||
|
||||
FUNC_ENTER_NOAPI(FAIL)
|
||||
FUNC_ENTER_PACKAGE
|
||||
|
||||
/* Check args */
|
||||
HDassert(f);
|
||||
@ -601,4 +601,4 @@ H5D_efl_bh_info(H5F_t *f, hid_t dxpl_id, H5O_efl_t *efl, hsize_t *heap_size)
|
||||
|
||||
done:
|
||||
FUNC_LEAVE_NOAPI(ret_value)
|
||||
} /* end H5D_chunk_bh_info() */
|
||||
} /* end H5D__efl_bh_info() */
|
||||
|
@ -61,6 +61,8 @@
|
||||
/* Local Prototypes */
|
||||
/********************/
|
||||
|
||||
static herr_t H5D__fill_release(H5D_fill_buf_info_t *fb_info);
|
||||
|
||||
|
||||
/*********************/
|
||||
/* Package Variables */
|
||||
@ -131,7 +133,7 @@ H5Dfill(const void *fill, hid_t fill_type_id, void *buf, hid_t buf_type_id, hid_
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, 0, "not a datatype")
|
||||
|
||||
/* Fill the selection in the memory buffer */
|
||||
if(H5D_fill(fill, fill_type, buf, buf_type, space, H5AC_dxpl_id) < 0)
|
||||
if(H5D__fill(fill, fill_type, buf, buf_type, space, H5AC_dxpl_id) < 0)
|
||||
HGOTO_ERROR(H5E_DATASET, H5E_CANTENCODE, FAIL, "filling selection failed")
|
||||
|
||||
done:
|
||||
@ -141,11 +143,11 @@ done:
|
||||
|
||||
/*--------------------------------------------------------------------------
|
||||
NAME
|
||||
H5D_fill
|
||||
H5D__fill
|
||||
PURPOSE
|
||||
Fill a selection in memory with a value (internal version)
|
||||
USAGE
|
||||
herr_t H5D_fill(fill, fill_type, buf, buf_type, space)
|
||||
herr_t H5D__fill(fill, fill_type, buf, buf_type, space)
|
||||
const void *fill; IN: Pointer to fill value to use
|
||||
H5T_t *fill_type; IN: Datatype of the fill value
|
||||
void *buf; IN/OUT: Memory buffer to fill selection within
|
||||
@ -168,7 +170,7 @@ done:
|
||||
on each element so that each of them has a copy of the VL data.
|
||||
--------------------------------------------------------------------------*/
|
||||
herr_t
|
||||
H5D_fill(const void *fill, const H5T_t *fill_type, void *buf,
|
||||
H5D__fill(const void *fill, const H5T_t *fill_type, void *buf,
|
||||
const H5T_t *buf_type, const H5S_t *space, hid_t dxpl_id)
|
||||
{
|
||||
H5WB_t *elem_wb = NULL; /* Wrapped buffer for element data */
|
||||
@ -181,7 +183,7 @@ H5D_fill(const void *fill, const H5T_t *fill_type, void *buf,
|
||||
size_t dst_type_size; /* Size of destination type*/
|
||||
herr_t ret_value = SUCCEED; /* Return value */
|
||||
|
||||
FUNC_ENTER_NOAPI_NOINIT
|
||||
FUNC_ENTER_PACKAGE
|
||||
|
||||
/* Check args */
|
||||
HDassert(fill_type);
|
||||
@ -267,7 +269,7 @@ H5D_fill(const void *fill, const H5T_t *fill_type, void *buf,
|
||||
HGOTO_ERROR(H5E_DATASET, H5E_CANTCONVERT, FAIL, "data type conversion failed")
|
||||
|
||||
/* Fill the DXPL cache values for later use */
|
||||
if(H5D_get_dxpl_cache(dxpl_id, &dxpl_cache) < 0)
|
||||
if(H5D__get_dxpl_cache(dxpl_id, &dxpl_cache) < 0)
|
||||
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't fill dxpl cache")
|
||||
|
||||
/* Create a selection iterator for scattering the elements to memory buffer */
|
||||
@ -275,7 +277,7 @@ H5D_fill(const void *fill, const H5T_t *fill_type, void *buf,
|
||||
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to initialize memory selection information")
|
||||
|
||||
/* Scatter the data into memory */
|
||||
if(H5D_scatter_mem(tmp_buf, space, &mem_iter, (size_t)nelmts, dxpl_cache, buf/*out*/) < 0) {
|
||||
if(H5D__scatter_mem(tmp_buf, space, &mem_iter, (size_t)nelmts, dxpl_cache, buf/*out*/) < 0) {
|
||||
H5S_SELECT_ITER_RELEASE(&mem_iter);
|
||||
HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "scatter failed")
|
||||
} /* end if */
|
||||
@ -346,11 +348,11 @@ done:
|
||||
bkg_buf = H5FL_BLK_FREE(type_conv, bkg_buf);
|
||||
|
||||
FUNC_LEAVE_NOAPI(ret_value)
|
||||
} /* H5D_fill() */
|
||||
} /* H5D__fill() */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5D_fill_init
|
||||
* Function: H5D__fill_init
|
||||
*
|
||||
* Purpose: Initialize buffer filling operation
|
||||
*
|
||||
@ -362,7 +364,7 @@ done:
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
herr_t
|
||||
H5D_fill_init(H5D_fill_buf_info_t *fb_info, void *caller_fill_buf,
|
||||
H5D__fill_init(H5D_fill_buf_info_t *fb_info, void *caller_fill_buf,
|
||||
H5MM_allocate_t alloc_func, void *alloc_info,
|
||||
H5MM_free_t free_func, void *free_info,
|
||||
const H5O_fill_t *fill, const H5T_t *dset_type, hid_t dset_type_id,
|
||||
@ -370,7 +372,7 @@ H5D_fill_init(H5D_fill_buf_info_t *fb_info, void *caller_fill_buf,
|
||||
{
|
||||
herr_t ret_value = SUCCEED; /* Return value */
|
||||
|
||||
FUNC_ENTER_NOAPI(FAIL)
|
||||
FUNC_ENTER_PACKAGE
|
||||
|
||||
/* Check args */
|
||||
HDassert(fb_info);
|
||||
@ -541,15 +543,15 @@ H5D_fill_init(H5D_fill_buf_info_t *fb_info, void *caller_fill_buf,
|
||||
done:
|
||||
/* Cleanup on error */
|
||||
if(ret_value < 0)
|
||||
if(H5D_fill_term(fb_info) < 0)
|
||||
if(H5D__fill_term(fb_info) < 0)
|
||||
HDONE_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "Can't release fill buffer info")
|
||||
|
||||
FUNC_LEAVE_NOAPI(ret_value)
|
||||
} /* end H5D_fill_init() */
|
||||
} /* end H5D__fill_init() */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5D_fill_refill_vl
|
||||
* Function: H5D__fill_refill_vl
|
||||
*
|
||||
* Purpose: Refill fill value buffer that contains VL-datatype fill values
|
||||
*
|
||||
@ -561,12 +563,12 @@ done:
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
herr_t
|
||||
H5D_fill_refill_vl(H5D_fill_buf_info_t *fb_info, size_t nelmts, hid_t dxpl_id)
|
||||
H5D__fill_refill_vl(H5D_fill_buf_info_t *fb_info, size_t nelmts, hid_t dxpl_id)
|
||||
{
|
||||
herr_t ret_value = SUCCEED; /* Return value */
|
||||
void * buf = NULL; /* Temporary fill buffer */
|
||||
|
||||
FUNC_ENTER_NOAPI(FAIL)
|
||||
FUNC_ENTER_PACKAGE
|
||||
|
||||
/* Check args */
|
||||
HDassert(fb_info);
|
||||
@ -626,11 +628,11 @@ done:
|
||||
} /* end if */
|
||||
|
||||
FUNC_LEAVE_NOAPI(ret_value)
|
||||
} /* end H5D_fill_refill_vl() */
|
||||
} /* end H5D__fill_refill_vl() */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5D_fill_release
|
||||
* Function: H5D__fill_release
|
||||
*
|
||||
* Purpose: Release fill value buffer
|
||||
*
|
||||
@ -641,10 +643,10 @@ done:
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
herr_t
|
||||
H5D_fill_release(H5D_fill_buf_info_t *fb_info)
|
||||
static herr_t
|
||||
H5D__fill_release(H5D_fill_buf_info_t *fb_info)
|
||||
{
|
||||
FUNC_ENTER_NOAPI_NOERR
|
||||
FUNC_ENTER_PACKAGE
|
||||
|
||||
/* Check args */
|
||||
HDassert(fb_info);
|
||||
@ -664,11 +666,11 @@ H5D_fill_release(H5D_fill_buf_info_t *fb_info)
|
||||
} /* end if */
|
||||
|
||||
FUNC_LEAVE_NOAPI(SUCCEED)
|
||||
} /* end H5D_fill_release() */
|
||||
} /* end H5D__fill_release() */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5D_fill_term
|
||||
* Function: H5D__fill_term
|
||||
*
|
||||
* Purpose: Release fill value buffer info
|
||||
*
|
||||
@ -680,15 +682,15 @@ H5D_fill_release(H5D_fill_buf_info_t *fb_info)
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
herr_t
|
||||
H5D_fill_term(H5D_fill_buf_info_t *fb_info)
|
||||
H5D__fill_term(H5D_fill_buf_info_t *fb_info)
|
||||
{
|
||||
FUNC_ENTER_NOAPI_NOERR
|
||||
FUNC_ENTER_PACKAGE
|
||||
|
||||
/* Check args */
|
||||
HDassert(fb_info);
|
||||
|
||||
/* Free the buffer for fill values */
|
||||
H5D_fill_release(fb_info);
|
||||
H5D__fill_release(fb_info);
|
||||
|
||||
/* Free other resources for vlen fill values */
|
||||
if(fb_info->has_vlen_fill_type) {
|
||||
@ -701,5 +703,5 @@ H5D_fill_term(H5D_fill_buf_info_t *fb_info)
|
||||
} /* end if */
|
||||
|
||||
FUNC_LEAVE_NOAPI(SUCCEED)
|
||||
} /* end H5D_fill_term() */
|
||||
} /* end H5D__fill_term() */
|
||||
|
||||
|
311
src/H5Dint.c
311
src/H5Dint.c
File diff suppressed because it is too large
Load Diff
116
src/H5Dio.c
116
src/H5Dio.c
@ -50,27 +50,27 @@
|
||||
/********************/
|
||||
|
||||
/* Internal I/O routines */
|
||||
static herr_t H5D_read(H5D_t *dataset, hid_t mem_type_id,
|
||||
static herr_t H5D__read(H5D_t *dataset, hid_t mem_type_id,
|
||||
const H5S_t *mem_space, const H5S_t *file_space, hid_t dset_xfer_plist,
|
||||
void *buf/*out*/);
|
||||
static herr_t H5D_write(H5D_t *dataset, hid_t mem_type_id,
|
||||
static herr_t H5D__write(H5D_t *dataset, hid_t mem_type_id,
|
||||
const H5S_t *mem_space, const H5S_t *file_space, hid_t dset_xfer_plist,
|
||||
const void *buf);
|
||||
|
||||
/* Setup/teardown routines */
|
||||
static herr_t H5D_ioinfo_init(H5D_t *dset, const H5D_dxpl_cache_t *dxpl_cache,
|
||||
static herr_t H5D__ioinfo_init(H5D_t *dset, const H5D_dxpl_cache_t *dxpl_cache,
|
||||
hid_t dxpl_id, const H5D_type_info_t *type_info, H5D_storage_t *store,
|
||||
H5D_io_info_t *io_info);
|
||||
static herr_t H5D_typeinfo_init(const H5D_t *dset, const H5D_dxpl_cache_t *dxpl_cache,
|
||||
static herr_t H5D__typeinfo_init(const H5D_t *dset, const H5D_dxpl_cache_t *dxpl_cache,
|
||||
hid_t dxpl_id, hid_t mem_type_id, hbool_t do_write,
|
||||
H5D_type_info_t *type_info);
|
||||
#ifdef H5_HAVE_PARALLEL
|
||||
static herr_t H5D_ioinfo_adjust(H5D_io_info_t *io_info, const H5D_t *dset,
|
||||
static herr_t H5D__ioinfo_adjust(H5D_io_info_t *io_info, const H5D_t *dset,
|
||||
hid_t dxpl_id, const H5S_t *file_space, const H5S_t *mem_space,
|
||||
const H5D_type_info_t *type_info, const H5D_chunk_map_t *fm);
|
||||
static herr_t H5D_ioinfo_term(H5D_io_info_t *io_info);
|
||||
static herr_t H5D__ioinfo_term(H5D_io_info_t *io_info);
|
||||
#endif /* H5_HAVE_PARALLEL */
|
||||
static herr_t H5D_typeinfo_term(const H5D_type_info_t *type_info);
|
||||
static herr_t H5D__typeinfo_term(const H5D_type_info_t *type_info);
|
||||
|
||||
|
||||
/*********************/
|
||||
@ -170,7 +170,7 @@ H5Dread(hid_t dset_id, hid_t mem_type_id, hid_t mem_space_id,
|
||||
buf = &fake_char;
|
||||
|
||||
/* read raw data */
|
||||
if(H5D_read(dset, mem_type_id, mem_space, file_space, plist_id, buf/*out*/) < 0)
|
||||
if(H5D__read(dset, mem_type_id, mem_space, file_space, plist_id, buf/*out*/) < 0)
|
||||
HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "can't read data")
|
||||
|
||||
done:
|
||||
@ -262,7 +262,7 @@ H5Dwrite(hid_t dset_id, hid_t mem_type_id, hid_t mem_space_id,
|
||||
buf = &fake_char;
|
||||
|
||||
/* write raw data */
|
||||
if(H5D_write(dset, mem_type_id, mem_space, file_space, dxpl_id, buf) < 0)
|
||||
if(H5D__write(dset, mem_type_id, mem_space, file_space, dxpl_id, buf) < 0)
|
||||
HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "can't write data")
|
||||
|
||||
done:
|
||||
@ -271,7 +271,7 @@ done:
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5D_read
|
||||
* Function: H5D__read
|
||||
*
|
||||
* Purpose: Reads (part of) a DATASET into application memory BUF. See
|
||||
* H5Dread() for complete details.
|
||||
@ -284,7 +284,7 @@ done:
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
static herr_t
|
||||
H5D_read(H5D_t *dataset, hid_t mem_type_id, const H5S_t *mem_space,
|
||||
H5D__read(H5D_t *dataset, hid_t mem_type_id, const H5S_t *mem_space,
|
||||
const H5S_t *file_space, hid_t dxpl_id, void *buf/*out*/)
|
||||
{
|
||||
H5D_chunk_map_t fm; /* Chunk file<->memory mapping */
|
||||
@ -315,7 +315,7 @@ H5D_read(H5D_t *dataset, hid_t mem_type_id, const H5S_t *mem_space,
|
||||
H5D_dxpl_cache_t *dxpl_cache = &_dxpl_cache; /* Data transfer property cache */
|
||||
herr_t ret_value = SUCCEED; /* Return value */
|
||||
|
||||
FUNC_ENTER_NOAPI_NOINIT_TAG(dxpl_id, dataset->oloc.addr, FAIL)
|
||||
FUNC_ENTER_STATIC_TAG(dxpl_id, dataset->oloc.addr, FAIL)
|
||||
|
||||
/* check args */
|
||||
HDassert(dataset && dataset->oloc.file);
|
||||
@ -329,11 +329,11 @@ H5D_read(H5D_t *dataset, hid_t mem_type_id, const H5S_t *mem_space,
|
||||
H5_ASSIGN_OVERFLOW(nelmts,snelmts,hssize_t,hsize_t);
|
||||
|
||||
/* Fill the DXPL cache values for later use */
|
||||
if(H5D_get_dxpl_cache(dxpl_id, &dxpl_cache) < 0)
|
||||
if(H5D__get_dxpl_cache(dxpl_id, &dxpl_cache) < 0)
|
||||
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't fill dxpl cache")
|
||||
|
||||
/* Set up datatype info for operation */
|
||||
if(H5D_typeinfo_init(dataset, dxpl_cache, dxpl_id, mem_type_id, FALSE, &type_info) < 0)
|
||||
if(H5D__typeinfo_init(dataset, dxpl_cache, dxpl_id, mem_type_id, FALSE, &type_info) < 0)
|
||||
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to set up type info")
|
||||
type_info_init = TRUE;
|
||||
|
||||
@ -412,7 +412,7 @@ H5D_read(H5D_t *dataset, hid_t mem_type_id, const H5S_t *mem_space,
|
||||
HGOTO_DONE(SUCCEED)
|
||||
|
||||
/* Go fill the user's selection with the dataset's fill value */
|
||||
if(H5D_fill(dataset->shared->dcpl_cache.fill.buf, dataset->shared->type, buf, type_info.mem_type, mem_space, dxpl_id) < 0)
|
||||
if(H5D__fill(dataset->shared->dcpl_cache.fill.buf, dataset->shared->type, buf, type_info.mem_type, mem_space, dxpl_id) < 0)
|
||||
HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "filling buf failed")
|
||||
else
|
||||
HGOTO_DONE(SUCCEED)
|
||||
@ -421,7 +421,7 @@ H5D_read(H5D_t *dataset, hid_t mem_type_id, const H5S_t *mem_space,
|
||||
/* Set up I/O operation */
|
||||
io_info.op_type = H5D_IO_OP_READ;
|
||||
io_info.u.rbuf = buf;
|
||||
if(H5D_ioinfo_init(dataset, dxpl_cache, dxpl_id, &type_info, &store, &io_info) < 0)
|
||||
if(H5D__ioinfo_init(dataset, dxpl_cache, dxpl_id, &type_info, &store, &io_info) < 0)
|
||||
HGOTO_ERROR(H5E_DATASET, H5E_UNSUPPORTED, FAIL, "unable to set up I/O operation")
|
||||
#ifdef H5_HAVE_PARALLEL
|
||||
io_info_init = TRUE;
|
||||
@ -441,7 +441,7 @@ H5D_read(H5D_t *dataset, hid_t mem_type_id, const H5S_t *mem_space,
|
||||
|
||||
#ifdef H5_HAVE_PARALLEL
|
||||
/* Adjust I/O info for any parallel I/O */
|
||||
if(H5D_ioinfo_adjust(&io_info, dataset, dxpl_id, file_space, mem_space, &type_info, &fm) < 0)
|
||||
if(H5D__ioinfo_adjust(&io_info, dataset, dxpl_id, file_space, mem_space, &type_info, &fm) < 0)
|
||||
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to adjust I/O info for parallel I/O")
|
||||
#endif /*H5_HAVE_PARALLEL*/
|
||||
|
||||
@ -456,11 +456,11 @@ done:
|
||||
#ifdef H5_HAVE_PARALLEL
|
||||
/* Shut down io_info struct */
|
||||
if(io_info_init)
|
||||
if(H5D_ioinfo_term(&io_info) < 0)
|
||||
if(H5D__ioinfo_term(&io_info) < 0)
|
||||
HDONE_ERROR(H5E_DATASET, H5E_CANTCLOSEOBJ, FAIL, "can't shut down io_info")
|
||||
#endif /*H5_HAVE_PARALLEL*/
|
||||
/* Shut down datatype info for operation */
|
||||
if(type_info_init && H5D_typeinfo_term(&type_info) < 0)
|
||||
if(type_info_init && H5D__typeinfo_term(&type_info) < 0)
|
||||
HDONE_ERROR(H5E_DATASET, H5E_CANTCLOSEOBJ, FAIL, "unable to shut down type info")
|
||||
|
||||
/* discard projected mem space if it was created */
|
||||
@ -469,11 +469,11 @@ done:
|
||||
HDONE_ERROR(H5E_DATASET, H5E_CANTCLOSEOBJ, FAIL, "unable to shut down projected memory dataspace")
|
||||
|
||||
FUNC_LEAVE_NOAPI_TAG(ret_value, FAIL)
|
||||
} /* end H5D_read() */
|
||||
} /* end H5D__read() */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5D_write
|
||||
* Function: H5D__write
|
||||
*
|
||||
* Purpose: Writes (part of) a DATASET to a file from application memory
|
||||
* BUF. See H5Dwrite() for complete details.
|
||||
@ -486,7 +486,7 @@ done:
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
static herr_t
|
||||
H5D_write(H5D_t *dataset, hid_t mem_type_id, const H5S_t *mem_space,
|
||||
H5D__write(H5D_t *dataset, hid_t mem_type_id, const H5S_t *mem_space,
|
||||
const H5S_t *file_space, hid_t dxpl_id, const void *buf)
|
||||
{
|
||||
H5D_chunk_map_t fm; /* Chunk file<->memory mapping */
|
||||
@ -517,7 +517,7 @@ H5D_write(H5D_t *dataset, hid_t mem_type_id, const H5S_t *mem_space,
|
||||
H5D_dxpl_cache_t *dxpl_cache = &_dxpl_cache; /* Data transfer property cache */
|
||||
herr_t ret_value = SUCCEED; /* Return value */
|
||||
|
||||
FUNC_ENTER_NOAPI_NOINIT_TAG(dxpl_id, dataset->oloc.addr, FAIL)
|
||||
FUNC_ENTER_STATIC_TAG(dxpl_id, dataset->oloc.addr, FAIL)
|
||||
|
||||
/* check args */
|
||||
HDassert(dataset && dataset->oloc.file);
|
||||
@ -535,11 +535,11 @@ H5D_write(H5D_t *dataset, hid_t mem_type_id, const H5S_t *mem_space,
|
||||
HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "no write intent on file")
|
||||
|
||||
/* Fill the DXPL cache values for later use */
|
||||
if(H5D_get_dxpl_cache(dxpl_id, &dxpl_cache) < 0)
|
||||
if(H5D__get_dxpl_cache(dxpl_id, &dxpl_cache) < 0)
|
||||
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't fill dxpl cache")
|
||||
|
||||
/* Set up datatype info for operation */
|
||||
if(H5D_typeinfo_init(dataset, dxpl_cache, dxpl_id, mem_type_id, TRUE, &type_info) < 0)
|
||||
if(H5D__typeinfo_init(dataset, dxpl_cache, dxpl_id, mem_type_id, TRUE, &type_info) < 0)
|
||||
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to set up type info")
|
||||
type_info_init = TRUE;
|
||||
|
||||
@ -644,14 +644,14 @@ H5D_write(H5D_t *dataset, hid_t mem_type_id, const H5S_t *mem_space,
|
||||
full_overwrite = (hbool_t)((hsize_t)file_nelmts == nelmts ? TRUE : FALSE);
|
||||
|
||||
/* Allocate storage */
|
||||
if(H5D_alloc_storage(dataset, dxpl_id, H5D_ALLOC_WRITE, full_overwrite, NULL) < 0)
|
||||
if(H5D__alloc_storage(dataset, dxpl_id, H5D_ALLOC_WRITE, full_overwrite, NULL) < 0)
|
||||
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to initialize storage")
|
||||
} /* end if */
|
||||
|
||||
/* Set up I/O operation */
|
||||
io_info.op_type = H5D_IO_OP_WRITE;
|
||||
io_info.u.wbuf = buf;
|
||||
if(H5D_ioinfo_init(dataset, dxpl_cache, dxpl_id, &type_info, &store, &io_info) < 0)
|
||||
if(H5D__ioinfo_init(dataset, dxpl_cache, dxpl_id, &type_info, &store, &io_info) < 0)
|
||||
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to set up I/O operation")
|
||||
#ifdef H5_HAVE_PARALLEL
|
||||
io_info_init = TRUE;
|
||||
@ -665,7 +665,7 @@ H5D_write(H5D_t *dataset, hid_t mem_type_id, const H5S_t *mem_space,
|
||||
|
||||
#ifdef H5_HAVE_PARALLEL
|
||||
/* Adjust I/O info for any parallel I/O */
|
||||
if(H5D_ioinfo_adjust(&io_info, dataset, dxpl_id, file_space, mem_space, &type_info, &fm) < 0)
|
||||
if(H5D__ioinfo_adjust(&io_info, dataset, dxpl_id, file_space, mem_space, &type_info, &fm) < 0)
|
||||
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to adjust I/O info for parallel I/O")
|
||||
#endif /*H5_HAVE_PARALLEL*/
|
||||
|
||||
@ -697,11 +697,11 @@ done:
|
||||
HDONE_ERROR(H5E_DATASET, H5E_CANTCLOSEOBJ, FAIL, "unable to shut down I/O op info")
|
||||
#ifdef H5_HAVE_PARALLEL
|
||||
/* Shut down io_info struct */
|
||||
if(io_info_init && H5D_ioinfo_term(&io_info) < 0)
|
||||
if(io_info_init && H5D__ioinfo_term(&io_info) < 0)
|
||||
HDONE_ERROR(H5E_DATASET, H5E_CANTCLOSEOBJ, FAIL, "can't shut down io_info")
|
||||
#endif /*H5_HAVE_PARALLEL*/
|
||||
/* Shut down datatype info for operation */
|
||||
if(type_info_init && H5D_typeinfo_term(&type_info) < 0)
|
||||
if(type_info_init && H5D__typeinfo_term(&type_info) < 0)
|
||||
HDONE_ERROR(H5E_DATASET, H5E_CANTCLOSEOBJ, FAIL, "unable to shut down type info")
|
||||
|
||||
/* discard projected mem space if it was created */
|
||||
@ -710,11 +710,11 @@ done:
|
||||
HDONE_ERROR(H5E_DATASET, H5E_CANTCLOSEOBJ, FAIL, "unable to shut down projected memory dataspace")
|
||||
|
||||
FUNC_LEAVE_NOAPI_TAG(ret_value, FAIL)
|
||||
} /* end H5D_write() */
|
||||
} /* end H5D__write() */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5D_ioinfo_init
|
||||
* Function: H5D__ioinfo_init
|
||||
*
|
||||
* Purpose: Routine for determining correct I/O operations for
|
||||
* each I/O action.
|
||||
@ -727,10 +727,10 @@ done:
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
static herr_t
|
||||
H5D_ioinfo_init(H5D_t *dset, const H5D_dxpl_cache_t *dxpl_cache, hid_t dxpl_id,
|
||||
H5D__ioinfo_init(H5D_t *dset, const H5D_dxpl_cache_t *dxpl_cache, hid_t dxpl_id,
|
||||
const H5D_type_info_t *type_info, H5D_storage_t *store, H5D_io_info_t *io_info)
|
||||
{
|
||||
FUNC_ENTER_NOAPI_NOINIT_NOERR
|
||||
FUNC_ENTER_STATIC_NOERR
|
||||
|
||||
/* check args */
|
||||
HDassert(dset);
|
||||
@ -758,15 +758,15 @@ H5D_ioinfo_init(H5D_t *dset, const H5D_dxpl_cache_t *dxpl_cache, hid_t dxpl_id,
|
||||
* If there is no data transform or type conversion then read directly into
|
||||
* the application's buffer. This saves at least one mem-to-mem copy.
|
||||
*/
|
||||
io_info->io_ops.single_read = H5D_select_read;
|
||||
io_info->io_ops.single_write = H5D_select_write;
|
||||
io_info->io_ops.single_read = H5D__select_read;
|
||||
io_info->io_ops.single_write = H5D__select_write;
|
||||
} /* end if */
|
||||
else {
|
||||
/*
|
||||
* This is the general case (type conversion, usually).
|
||||
*/
|
||||
io_info->io_ops.single_read = H5D_scatgath_read;
|
||||
io_info->io_ops.single_write = H5D_scatgath_write;
|
||||
io_info->io_ops.single_read = H5D__scatgath_read;
|
||||
io_info->io_ops.single_write = H5D__scatgath_write;
|
||||
} /* end else */
|
||||
|
||||
#ifdef H5_HAVE_PARALLEL
|
||||
@ -775,11 +775,11 @@ H5D_ioinfo_init(H5D_t *dset, const H5D_dxpl_cache_t *dxpl_cache, hid_t dxpl_id,
|
||||
#endif /* H5_HAVE_PARALLEL */
|
||||
|
||||
FUNC_LEAVE_NOAPI(SUCCEED)
|
||||
} /* end H5D_ioinfo_init() */
|
||||
} /* end H5D__ioinfo_init() */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5D_typeinfo_init
|
||||
* Function: H5D__typeinfo_init
|
||||
*
|
||||
* Purpose: Routine for determining correct datatype information for
|
||||
* each I/O action.
|
||||
@ -792,7 +792,7 @@ H5D_ioinfo_init(H5D_t *dset, const H5D_dxpl_cache_t *dxpl_cache, hid_t dxpl_id,
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
static herr_t
|
||||
H5D_typeinfo_init(const H5D_t *dset, const H5D_dxpl_cache_t *dxpl_cache,
|
||||
H5D__typeinfo_init(const H5D_t *dset, const H5D_dxpl_cache_t *dxpl_cache,
|
||||
hid_t dxpl_id, hid_t mem_type_id, hbool_t do_write,
|
||||
H5D_type_info_t *type_info)
|
||||
{
|
||||
@ -800,7 +800,7 @@ H5D_typeinfo_init(const H5D_t *dset, const H5D_dxpl_cache_t *dxpl_cache,
|
||||
const H5T_t *dst_type; /* Destination datatype */
|
||||
herr_t ret_value = SUCCEED; /* Return value */
|
||||
|
||||
FUNC_ENTER_NOAPI_NOINIT
|
||||
FUNC_ENTER_STATIC
|
||||
|
||||
/* check args */
|
||||
HDassert(type_info);
|
||||
@ -931,12 +931,12 @@ H5D_typeinfo_init(const H5D_t *dset, const H5D_dxpl_cache_t *dxpl_cache,
|
||||
|
||||
done:
|
||||
FUNC_LEAVE_NOAPI(ret_value)
|
||||
} /* end H5D_typeinfo_init() */
|
||||
} /* end H5D__typeinfo_init() */
|
||||
|
||||
#ifdef H5_HAVE_PARALLEL
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5D_ioinfo_adjust
|
||||
* Function: H5D__ioinfo_adjust
|
||||
*
|
||||
* Purpose: Adjust operation's I/O info for any parallel I/O
|
||||
*
|
||||
@ -948,7 +948,7 @@ done:
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
static herr_t
|
||||
H5D_ioinfo_adjust(H5D_io_info_t *io_info, const H5D_t *dset, hid_t dxpl_id,
|
||||
H5D__ioinfo_adjust(H5D_io_info_t *io_info, const H5D_t *dset, hid_t dxpl_id,
|
||||
const H5S_t *file_space, const H5S_t *mem_space,
|
||||
const H5D_type_info_t *type_info, const H5D_chunk_map_t *fm)
|
||||
{
|
||||
@ -957,7 +957,7 @@ H5D_ioinfo_adjust(H5D_io_info_t *io_info, const H5D_t *dset, hid_t dxpl_id,
|
||||
H5D_mpio_actual_io_mode_t actual_io_mode; /* performed io mode */
|
||||
herr_t ret_value = SUCCEED; /* Return value */
|
||||
|
||||
FUNC_ENTER_NOAPI_NOINIT
|
||||
FUNC_ENTER_STATIC
|
||||
|
||||
/* check args */
|
||||
HDassert(dset);
|
||||
@ -997,7 +997,7 @@ H5D_ioinfo_adjust(H5D_io_info_t *io_info, const H5D_t *dset, hid_t dxpl_id,
|
||||
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTGET, FAIL, "can't retrieve MPI communicator")
|
||||
|
||||
/* Check if we can set direct MPI-IO read/write functions */
|
||||
if((opt = H5D_mpio_opt_possible(io_info, file_space, mem_space, type_info, fm)) < 0)
|
||||
if((opt = H5D__mpio_opt_possible(io_info, file_space, mem_space, type_info, fm)) < 0)
|
||||
HGOTO_ERROR(H5E_DATASPACE, H5E_BADRANGE, FAIL, "invalid check for direct IO dataspace ")
|
||||
|
||||
/* Check if we can use the optimized parallel I/O routines */
|
||||
@ -1005,8 +1005,8 @@ H5D_ioinfo_adjust(H5D_io_info_t *io_info, const H5D_t *dset, hid_t dxpl_id,
|
||||
/* Override the I/O op pointers to the MPI-specific routines */
|
||||
io_info->io_ops.multi_read = dset->shared->layout.ops->par_read;
|
||||
io_info->io_ops.multi_write = dset->shared->layout.ops->par_write;
|
||||
io_info->io_ops.single_read = H5D_mpio_select_read;
|
||||
io_info->io_ops.single_write = H5D_mpio_select_write;
|
||||
io_info->io_ops.single_read = H5D__mpio_select_read;
|
||||
io_info->io_ops.single_write = H5D__mpio_select_write;
|
||||
} /* end if */
|
||||
else {
|
||||
/* If we won't be doing collective I/O, but the user asked for
|
||||
@ -1024,11 +1024,11 @@ H5D_ioinfo_adjust(H5D_io_info_t *io_info, const H5D_t *dset, hid_t dxpl_id,
|
||||
|
||||
done:
|
||||
FUNC_LEAVE_NOAPI(ret_value)
|
||||
} /* end H5D_ioinfo_adjust() */
|
||||
} /* end H5D__ioinfo_adjust() */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5D_ioinfo_term
|
||||
* Function: H5D__ioinfo_term
|
||||
*
|
||||
* Purpose: Common logic for terminating an I/O info object
|
||||
* (Only used for restoring MPI transfer mode currently)
|
||||
@ -1041,11 +1041,11 @@ done:
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
static herr_t
|
||||
H5D_ioinfo_term(H5D_io_info_t *io_info)
|
||||
H5D__ioinfo_term(H5D_io_info_t *io_info)
|
||||
{
|
||||
herr_t ret_value = SUCCEED; /*return value */
|
||||
|
||||
FUNC_ENTER_NOAPI_NOINIT
|
||||
FUNC_ENTER_STATIC
|
||||
|
||||
/* Check if we used the MPI VFD for the I/O */
|
||||
if(io_info->using_mpi_vfd) {
|
||||
@ -1078,13 +1078,13 @@ H5D_ioinfo_term(H5D_io_info_t *io_info)
|
||||
|
||||
done:
|
||||
FUNC_LEAVE_NOAPI(ret_value)
|
||||
} /* end H5D_ioinfo_term() */
|
||||
} /* end H5D__ioinfo_term() */
|
||||
|
||||
#endif /* H5_HAVE_PARALLEL */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5D_typeinfo_term
|
||||
* Function: H5D__typeinfo_term
|
||||
*
|
||||
* Purpose: Common logic for terminating a type info object
|
||||
*
|
||||
@ -1096,9 +1096,9 @@ done:
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
static herr_t
|
||||
H5D_typeinfo_term(const H5D_type_info_t *type_info)
|
||||
H5D__typeinfo_term(const H5D_type_info_t *type_info)
|
||||
{
|
||||
FUNC_ENTER_NOAPI_NOINIT_NOERR
|
||||
FUNC_ENTER_STATIC_NOERR
|
||||
|
||||
/* Check for releasing datatype conversion & background buffers */
|
||||
if(type_info->tconv_buf_allocated) {
|
||||
@ -1111,5 +1111,5 @@ H5D_typeinfo_term(const H5D_type_info_t *type_info)
|
||||
} /* end if */
|
||||
|
||||
FUNC_LEAVE_NOAPI(SUCCEED)
|
||||
} /* end H5D_typeinfo_term() */
|
||||
} /* end H5D__typeinfo_term() */
|
||||
|
||||
|
@ -61,7 +61,7 @@
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5D_layout_set_io_ops
|
||||
* Function: H5D__layout_set_io_ops
|
||||
*
|
||||
* Purpose: Set the I/O operation function pointers for a dataset,
|
||||
* according to the dataset's layout
|
||||
@ -74,11 +74,11 @@
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
herr_t
|
||||
H5D_layout_set_io_ops(const H5D_t *dataset)
|
||||
H5D__layout_set_io_ops(const H5D_t *dataset)
|
||||
{
|
||||
herr_t ret_value = SUCCEED; /* Return value */
|
||||
|
||||
FUNC_ENTER_NOAPI(FAIL)
|
||||
FUNC_ENTER_PACKAGE
|
||||
|
||||
/* check args */
|
||||
HDassert(dataset);
|
||||
@ -112,11 +112,11 @@ H5D_layout_set_io_ops(const H5D_t *dataset)
|
||||
|
||||
done:
|
||||
FUNC_LEAVE_NOAPI(ret_value)
|
||||
} /* end H5D_layout_set_io_ops() */
|
||||
} /* end H5D__layout_set_io_ops() */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5D_layout_meta_size
|
||||
* Function: H5D__layout_meta_size
|
||||
*
|
||||
* Purpose: Returns the size of the raw message in bytes except raw data
|
||||
* part for compact dataset. This function doesn't take into
|
||||
@ -131,11 +131,11 @@ done:
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
size_t
|
||||
H5D_layout_meta_size(const H5F_t *f, const H5O_layout_t *layout, hbool_t include_compact_data)
|
||||
H5D__layout_meta_size(const H5F_t *f, const H5O_layout_t *layout, hbool_t include_compact_data)
|
||||
{
|
||||
size_t ret_value;
|
||||
|
||||
FUNC_ENTER_NOAPI_NOINIT
|
||||
FUNC_ENTER_PACKAGE
|
||||
|
||||
/* check args */
|
||||
HDassert(f);
|
||||
@ -177,11 +177,11 @@ H5D_layout_meta_size(const H5F_t *f, const H5O_layout_t *layout, hbool_t include
|
||||
|
||||
done:
|
||||
FUNC_LEAVE_NOAPI(ret_value)
|
||||
} /* end H5D_layout_meta_size() */
|
||||
} /* end H5D__layout_meta_size() */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5D_layout_oh_create
|
||||
* Function: H5D__layout_oh_create
|
||||
*
|
||||
* Purpose: Create layout/pline/efl information for dataset
|
||||
*
|
||||
@ -194,7 +194,7 @@ done:
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
herr_t
|
||||
H5D_layout_oh_create(H5F_t *file, hid_t dxpl_id, H5O_t *oh, H5D_t *dset,
|
||||
H5D__layout_oh_create(H5F_t *file, hid_t dxpl_id, H5O_t *oh, H5D_t *dset,
|
||||
hid_t dapl_id)
|
||||
{
|
||||
H5O_layout_t *layout; /* Dataset's layout information */
|
||||
@ -202,7 +202,7 @@ H5D_layout_oh_create(H5F_t *file, hid_t dxpl_id, H5O_t *oh, H5D_t *dset,
|
||||
hbool_t layout_init = FALSE; /* Flag to indicate that chunk information was initialized */
|
||||
herr_t ret_value = SUCCEED; /* Return value */
|
||||
|
||||
FUNC_ENTER_NOAPI_NOINIT_TAG(dxpl_id, dset->oloc.addr, FAIL)
|
||||
FUNC_ENTER_PACKAGE_TAG(dxpl_id, dset->oloc.addr, FAIL)
|
||||
|
||||
/* Sanity checking */
|
||||
HDassert(file);
|
||||
@ -234,7 +234,7 @@ H5D_layout_oh_create(H5F_t *file, hid_t dxpl_id, H5O_t *oh, H5D_t *dset,
|
||||
* allocation until later.
|
||||
*/
|
||||
if(fill_prop->alloc_time == H5D_ALLOC_TIME_EARLY)
|
||||
if(H5D_alloc_storage(dset, dxpl_id, H5D_ALLOC_CREATE, FALSE, NULL) < 0)
|
||||
if(H5D__alloc_storage(dset, dxpl_id, H5D_ALLOC_CREATE, FALSE, NULL) < 0)
|
||||
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to initialize storage")
|
||||
|
||||
/* Update external storage message, if it's used */
|
||||
@ -289,7 +289,7 @@ H5D_layout_oh_create(H5F_t *file, hid_t dxpl_id, H5O_t *oh, H5D_t *dset,
|
||||
|
||||
/* Create layout message */
|
||||
/* (Don't make layout message constant unless allocation time is early, since space may not be allocated) */
|
||||
/* (Note: this is relying on H5D_alloc_storage not calling H5O_msg_write during dataset creation) */
|
||||
/* (Note: this is relying on H5D__alloc_storage not calling H5O_msg_write during dataset creation) */
|
||||
if(H5O_msg_append_oh(file, dxpl_id, oh, H5O_LAYOUT_ID, ((fill_prop->alloc_time == H5D_ALLOC_TIME_EARLY && H5D_COMPACT != layout->type) ? H5O_MSG_FLAG_CONSTANT : 0), 0, layout) < 0)
|
||||
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to update layout")
|
||||
|
||||
@ -297,17 +297,17 @@ done:
|
||||
/* Error cleanup */
|
||||
if(ret_value < 0) {
|
||||
if(dset->shared->layout.type == H5D_CHUNKED && layout_init) {
|
||||
if(H5D_chunk_dest(file, dxpl_id, dset) < 0)
|
||||
if(H5D__chunk_dest(file, dxpl_id, dset) < 0)
|
||||
HDONE_ERROR(H5E_DATASET, H5E_CANTRELEASE, FAIL, "unable to destroy chunk cache")
|
||||
} /* end if */
|
||||
} /* end if */
|
||||
|
||||
FUNC_LEAVE_NOAPI_TAG(ret_value, FAIL)
|
||||
} /* end H5D_layout_oh_create() */
|
||||
} /* end H5D__layout_oh_create() */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5D_layout_oh_read
|
||||
* Function: H5D__layout_oh_read
|
||||
*
|
||||
* Purpose: Read layout/pline/efl information for dataset
|
||||
*
|
||||
@ -320,12 +320,12 @@ done:
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
herr_t
|
||||
H5D_layout_oh_read(H5D_t *dataset, hid_t dxpl_id, hid_t dapl_id, H5P_genplist_t *plist)
|
||||
H5D__layout_oh_read(H5D_t *dataset, hid_t dxpl_id, hid_t dapl_id, H5P_genplist_t *plist)
|
||||
{
|
||||
htri_t msg_exists; /* Whether a particular type of message exists */
|
||||
herr_t ret_value = SUCCEED; /* Return value */
|
||||
|
||||
FUNC_ENTER_NOAPI_NOINIT
|
||||
FUNC_ENTER_PACKAGE
|
||||
|
||||
/* Sanity checking */
|
||||
HDassert(dataset);
|
||||
@ -432,7 +432,7 @@ H5D_layout_oh_read(H5D_t *dataset, hid_t dxpl_id, hid_t dapl_id, H5P_genplist_t
|
||||
|
||||
case H5D_CHUNKED:
|
||||
/* Initialize the chunk cache for the dataset */
|
||||
if(H5D_chunk_init(dataset->oloc.file, dxpl_id, dataset, dapl_id) < 0)
|
||||
if(H5D__chunk_init(dataset->oloc.file, dxpl_id, dataset, dapl_id) < 0)
|
||||
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't initialize chunk cache")
|
||||
break;
|
||||
|
||||
@ -447,11 +447,11 @@ H5D_layout_oh_read(H5D_t *dataset, hid_t dxpl_id, hid_t dapl_id, H5P_genplist_t
|
||||
|
||||
done:
|
||||
FUNC_LEAVE_NOAPI(ret_value)
|
||||
} /* end H5D_layout_oh_read() */
|
||||
} /* end H5D__layout_oh_read() */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5D_layout_oh_write
|
||||
* Function: H5D__layout_oh_write
|
||||
*
|
||||
* Purpose: Write layout/pline/efl information for dataset
|
||||
*
|
||||
@ -464,11 +464,11 @@ done:
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
herr_t
|
||||
H5D_layout_oh_write(H5D_t *dataset, hid_t dxpl_id, H5O_t *oh, unsigned update_flags)
|
||||
H5D__layout_oh_write(H5D_t *dataset, hid_t dxpl_id, H5O_t *oh, unsigned update_flags)
|
||||
{
|
||||
herr_t ret_value = SUCCEED; /* Return value */
|
||||
|
||||
FUNC_ENTER_NOAPI_NOINIT
|
||||
FUNC_ENTER_PACKAGE
|
||||
|
||||
/* Sanity checking */
|
||||
HDassert(dataset);
|
||||
@ -480,5 +480,5 @@ H5D_layout_oh_write(H5D_t *dataset, hid_t dxpl_id, H5O_t *oh, unsigned update_fl
|
||||
|
||||
done:
|
||||
FUNC_LEAVE_NOAPI(ret_value)
|
||||
} /* end H5D_layout_oh_write() */
|
||||
} /* end H5D__layout_oh_write() */
|
||||
|
||||
|
290
src/H5Dmpio.c
290
src/H5Dmpio.c
@ -100,33 +100,32 @@ typedef struct H5D_chunk_addr_info_t {
|
||||
/********************/
|
||||
/* Local Prototypes */
|
||||
/********************/
|
||||
static herr_t H5D_chunk_collective_io(H5D_io_info_t *io_info,
|
||||
static herr_t H5D__chunk_collective_io(H5D_io_info_t *io_info,
|
||||
const H5D_type_info_t *type_info, H5D_chunk_map_t *fm);
|
||||
static herr_t H5D_multi_chunk_collective_io(H5D_io_info_t *io_info,
|
||||
static herr_t H5D__multi_chunk_collective_io(H5D_io_info_t *io_info,
|
||||
const H5D_type_info_t *type_info, H5D_chunk_map_t *fm,
|
||||
H5P_genplist_t *dx_plist);
|
||||
static herr_t H5D_multi_chunk_collective_io_no_opt(H5D_io_info_t *io_info,
|
||||
static herr_t H5D__multi_chunk_collective_io_no_opt(H5D_io_info_t *io_info,
|
||||
const H5D_type_info_t *type_info, H5D_chunk_map_t *fm, H5P_genplist_t *dx_plist);
|
||||
static herr_t H5D_link_chunk_collective_io(H5D_io_info_t *io_info,
|
||||
static herr_t H5D__link_chunk_collective_io(H5D_io_info_t *io_info,
|
||||
const H5D_type_info_t *type_info, H5D_chunk_map_t *fm, int sum_chunk);
|
||||
static herr_t H5D_inter_collective_io(H5D_io_info_t *io_info,
|
||||
static herr_t H5D__inter_collective_io(H5D_io_info_t *io_info,
|
||||
const H5D_type_info_t *type_info, const H5S_t *file_space,
|
||||
const H5S_t *mem_space);
|
||||
static herr_t H5D_final_collective_io(H5D_io_info_t *io_info,
|
||||
static herr_t H5D__final_collective_io(H5D_io_info_t *io_info,
|
||||
const H5D_type_info_t *type_info, hsize_t nelmts, MPI_Datatype *mpi_file_type,
|
||||
MPI_Datatype *mpi_buf_type);
|
||||
static herr_t H5D_sort_chunk(H5D_io_info_t *io_info, const H5D_chunk_map_t *fm,
|
||||
static herr_t H5D__sort_chunk(H5D_io_info_t *io_info, const H5D_chunk_map_t *fm,
|
||||
H5D_chunk_addr_info_t chunk_addr_info_array[], int many_chunk_opt);
|
||||
static herr_t H5D_obtain_mpio_mode(H5D_io_info_t *io_info, H5D_chunk_map_t *fm,
|
||||
static herr_t H5D__obtain_mpio_mode(H5D_io_info_t *io_info, H5D_chunk_map_t *fm,
|
||||
H5P_genplist_t *dx_plist, uint8_t assign_io_mode[], haddr_t chunk_addr[]);
|
||||
static herr_t H5D_ioinfo_xfer_mode(H5D_io_info_t *io_info, H5P_genplist_t *dx_plist,
|
||||
static herr_t H5D__ioinfo_xfer_mode(H5D_io_info_t *io_info, H5P_genplist_t *dx_plist,
|
||||
H5FD_mpio_xfer_t xfer_mode);
|
||||
static herr_t H5D_ioinfo_coll_opt_mode(H5D_io_info_t *io_info, H5P_genplist_t *dx_plist,
|
||||
static herr_t H5D__ioinfo_coll_opt_mode(H5D_io_info_t *io_info, H5P_genplist_t *dx_plist,
|
||||
H5FD_mpio_collective_opt_t coll_opt_mode);
|
||||
static herr_t H5D_mpio_get_min_chunk(const H5D_io_info_t *io_info,
|
||||
static herr_t H5D__mpio_get_min_chunk(const H5D_io_info_t *io_info,
|
||||
const H5D_chunk_map_t *fm, int *min_chunkf);
|
||||
static int H5D_cmp_chunk_addr(const void *addr1, const void *addr2);
|
||||
static herr_t H5D_mpio_get_sum_chunk(const H5D_io_info_t *io_info,
|
||||
static herr_t H5D__mpio_get_sum_chunk(const H5D_io_info_t *io_info,
|
||||
const H5D_chunk_map_t *fm, int *sum_chunkf);
|
||||
|
||||
|
||||
@ -141,7 +140,7 @@ static herr_t H5D_mpio_get_sum_chunk(const H5D_io_info_t *io_info,
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5D_mpio_opt_possible
|
||||
* Function: H5D__mpio_opt_possible
|
||||
*
|
||||
* Purpose: Checks if an direct I/O transfer is possible between memory and
|
||||
* the file.
|
||||
@ -155,7 +154,7 @@ static herr_t H5D_mpio_get_sum_chunk(const H5D_io_info_t *io_info,
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
htri_t
|
||||
H5D_mpio_opt_possible(const H5D_io_info_t *io_info, const H5S_t *file_space,
|
||||
H5D__mpio_opt_possible(const H5D_io_info_t *io_info, const H5S_t *file_space,
|
||||
const H5S_t *mem_space, const H5D_type_info_t *type_info,
|
||||
const H5D_chunk_map_t *fm)
|
||||
{
|
||||
@ -164,7 +163,7 @@ H5D_mpio_opt_possible(const H5D_io_info_t *io_info, const H5S_t *file_space,
|
||||
int mpi_code; /* MPI error code */
|
||||
htri_t ret_value = TRUE;
|
||||
|
||||
FUNC_ENTER_NOAPI(FAIL)
|
||||
FUNC_ENTER_PACKAGE
|
||||
|
||||
/* Check args */
|
||||
HDassert(io_info);
|
||||
@ -243,11 +242,11 @@ broadcast:
|
||||
|
||||
done:
|
||||
FUNC_LEAVE_NOAPI(ret_value)
|
||||
} /* H5D_mpio_opt_possible() */
|
||||
} /* H5D__mpio_opt_possible() */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5D_mpio_select_read
|
||||
* Function: H5D__mpio_select_read
|
||||
*
|
||||
* Purpose: MPI-IO function to read directly from app buffer to file.
|
||||
*
|
||||
@ -258,13 +257,13 @@ done:
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
herr_t
|
||||
H5D_mpio_select_read(const H5D_io_info_t *io_info, const H5D_type_info_t UNUSED *type_info,
|
||||
H5D__mpio_select_read(const H5D_io_info_t *io_info, const H5D_type_info_t UNUSED *type_info,
|
||||
hsize_t mpi_buf_count, const H5S_t UNUSED *file_space, const H5S_t UNUSED *mem_space)
|
||||
{
|
||||
const H5D_contig_storage_t *store_contig = &(io_info->store->contig); /* Contiguous storage info for this I/O operation */
|
||||
herr_t ret_value = SUCCEED;
|
||||
|
||||
FUNC_ENTER_NOAPI(FAIL)
|
||||
FUNC_ENTER_PACKAGE
|
||||
|
||||
H5_CHECK_OVERFLOW(mpi_buf_count, hsize_t, size_t);
|
||||
if(H5F_block_read(io_info->dset->oloc.file, H5FD_MEM_DRAW, store_contig->dset_addr, (size_t)mpi_buf_count, io_info->dxpl_id, io_info->u.rbuf) < 0)
|
||||
@ -272,11 +271,11 @@ H5D_mpio_select_read(const H5D_io_info_t *io_info, const H5D_type_info_t UNUSED
|
||||
|
||||
done:
|
||||
FUNC_LEAVE_NOAPI(ret_value)
|
||||
} /* end H5D_mpio_select_read() */
|
||||
} /* end H5D__mpio_select_read() */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5D_mpio_select_write
|
||||
* Function: H5D__mpio_select_write
|
||||
*
|
||||
* Purpose: MPI-IO function to write directly from app buffer to file.
|
||||
*
|
||||
@ -287,13 +286,13 @@ done:
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
herr_t
|
||||
H5D_mpio_select_write(const H5D_io_info_t *io_info, const H5D_type_info_t UNUSED *type_info,
|
||||
H5D__mpio_select_write(const H5D_io_info_t *io_info, const H5D_type_info_t UNUSED *type_info,
|
||||
hsize_t mpi_buf_count, const H5S_t UNUSED *file_space, const H5S_t UNUSED *mem_space)
|
||||
{
|
||||
const H5D_contig_storage_t *store_contig = &(io_info->store->contig); /* Contiguous storage info for this I/O operation */
|
||||
herr_t ret_value = SUCCEED;
|
||||
|
||||
FUNC_ENTER_NOAPI(FAIL)
|
||||
FUNC_ENTER_PACKAGE
|
||||
|
||||
/*OKAY: CAST DISCARDS CONST QUALIFIER*/
|
||||
H5_CHECK_OVERFLOW(mpi_buf_count, hsize_t, size_t);
|
||||
@ -302,11 +301,11 @@ H5D_mpio_select_write(const H5D_io_info_t *io_info, const H5D_type_info_t UNUSED
|
||||
|
||||
done:
|
||||
FUNC_LEAVE_NOAPI(ret_value)
|
||||
} /* end H5D_mpio_select_write() */
|
||||
} /* end H5D__mpio_select_write() */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5D_ioinfo_xfer_mode
|
||||
* Function: H5D__ioinfo_xfer_mode
|
||||
*
|
||||
* Purpose: Switch to between collective & independent MPI I/O
|
||||
*
|
||||
@ -318,12 +317,12 @@ done:
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
static herr_t
|
||||
H5D_ioinfo_xfer_mode(H5D_io_info_t *io_info, H5P_genplist_t *dx_plist,
|
||||
H5D__ioinfo_xfer_mode(H5D_io_info_t *io_info, H5P_genplist_t *dx_plist,
|
||||
H5FD_mpio_xfer_t xfer_mode)
|
||||
{
|
||||
herr_t ret_value = SUCCEED; /* return value */
|
||||
|
||||
FUNC_ENTER_NOAPI_NOINIT
|
||||
FUNC_ENTER_STATIC
|
||||
|
||||
/* Change the xfer_mode */
|
||||
io_info->dxpl_cache->xfer_mode = xfer_mode;
|
||||
@ -340,17 +339,17 @@ H5D_ioinfo_xfer_mode(H5D_io_info_t *io_info, H5P_genplist_t *dx_plist,
|
||||
HDassert(xfer_mode == H5FD_MPIO_COLLECTIVE);
|
||||
|
||||
/* Set the pointers to the MPI-specific routines */
|
||||
io_info->io_ops.single_read = H5D_mpio_select_read;
|
||||
io_info->io_ops.single_write = H5D_mpio_select_write;
|
||||
io_info->io_ops.single_read = H5D__mpio_select_read;
|
||||
io_info->io_ops.single_write = H5D__mpio_select_write;
|
||||
} /* end else */
|
||||
|
||||
done:
|
||||
FUNC_LEAVE_NOAPI(ret_value)
|
||||
} /* end H5D_ioinfo_xfer_mode() */
|
||||
} /* end H5D__ioinfo_xfer_mode() */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5D_ioinfo_coll_opt_mode
|
||||
* Function: H5D__ioinfo_coll_opt_mode
|
||||
*
|
||||
* Purpose: Switch between using collective & independent MPI I/O w/file
|
||||
* set view
|
||||
@ -363,12 +362,12 @@ done:
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
static herr_t
|
||||
H5D_ioinfo_coll_opt_mode(H5D_io_info_t *io_info, H5P_genplist_t *dx_plist,
|
||||
H5D__ioinfo_coll_opt_mode(H5D_io_info_t *io_info, H5P_genplist_t *dx_plist,
|
||||
H5FD_mpio_collective_opt_t coll_opt_mode)
|
||||
{
|
||||
herr_t ret_value = SUCCEED; /* return value */
|
||||
|
||||
FUNC_ENTER_NOAPI_NOINIT
|
||||
FUNC_ENTER_STATIC
|
||||
|
||||
/* Change the optimal xfer_mode */
|
||||
io_info->dxpl_cache->coll_opt_mode = coll_opt_mode;
|
||||
@ -377,11 +376,11 @@ H5D_ioinfo_coll_opt_mode(H5D_io_info_t *io_info, H5P_genplist_t *dx_plist,
|
||||
|
||||
done:
|
||||
FUNC_LEAVE_NOAPI(ret_value)
|
||||
} /* end H5D_ioinfo_coll_opt_mode() */
|
||||
} /* end H5D__ioinfo_coll_opt_mode() */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5D_mpio_get_min_chunk
|
||||
* Function: H5D__mpio_get_min_chunk
|
||||
*
|
||||
* Purpose: Routine for obtaining minimum number of chunks to cover
|
||||
* hyperslab selection selected by all processors.
|
||||
@ -394,14 +393,14 @@ done:
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
static herr_t
|
||||
H5D_mpio_get_min_chunk(const H5D_io_info_t *io_info, const H5D_chunk_map_t *fm,
|
||||
H5D__mpio_get_min_chunk(const H5D_io_info_t *io_info, const H5D_chunk_map_t *fm,
|
||||
int *min_chunkf)
|
||||
{
|
||||
int num_chunkf; /* Number of chunks to iterate over */
|
||||
int mpi_code; /* MPI return code */
|
||||
herr_t ret_value = SUCCEED;
|
||||
|
||||
FUNC_ENTER_NOAPI_NOINIT
|
||||
FUNC_ENTER_STATIC
|
||||
|
||||
/* Get the number of chunks to perform I/O on */
|
||||
num_chunkf = H5SL_count(fm->sel_chunks);
|
||||
@ -412,11 +411,11 @@ H5D_mpio_get_min_chunk(const H5D_io_info_t *io_info, const H5D_chunk_map_t *fm,
|
||||
|
||||
done:
|
||||
FUNC_LEAVE_NOAPI(ret_value)
|
||||
} /* end H5D_mpio_get_min_chunk() */
|
||||
} /* end H5D__mpio_get_min_chunk() */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5D_mpio_get_sum_chunk
|
||||
* Function: H5D__mpio_get_sum_chunk
|
||||
*
|
||||
* Purpose: Routine for obtaining total number of chunks to cover
|
||||
* hyperslab selection selected by all processors.
|
||||
@ -429,7 +428,7 @@ done:
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
static herr_t
|
||||
H5D_mpio_get_sum_chunk(const H5D_io_info_t *io_info, const H5D_chunk_map_t *fm,
|
||||
H5D__mpio_get_sum_chunk(const H5D_io_info_t *io_info, const H5D_chunk_map_t *fm,
|
||||
int *sum_chunkf)
|
||||
{
|
||||
int num_chunkf; /* Number of chunks to iterate over */
|
||||
@ -437,7 +436,7 @@ H5D_mpio_get_sum_chunk(const H5D_io_info_t *io_info, const H5D_chunk_map_t *fm,
|
||||
int mpi_code; /* MPI return code */
|
||||
herr_t ret_value = SUCCEED;
|
||||
|
||||
FUNC_ENTER_NOAPI_NOINIT
|
||||
FUNC_ENTER_STATIC
|
||||
|
||||
/* Get the number of chunks to perform I/O on */
|
||||
num_chunkf = 0;
|
||||
@ -450,11 +449,11 @@ H5D_mpio_get_sum_chunk(const H5D_io_info_t *io_info, const H5D_chunk_map_t *fm,
|
||||
|
||||
done:
|
||||
FUNC_LEAVE_NOAPI(ret_value)
|
||||
} /* end H5D_mpio_get_sum_chunk() */
|
||||
} /* end H5D__mpio_get_sum_chunk() */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5D_contig_collective_read
|
||||
* Function: H5D__contig_collective_read
|
||||
*
|
||||
* Purpose: Reads directly from contiguous data in file into application
|
||||
* memory using collective I/O.
|
||||
@ -467,7 +466,7 @@ done:
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
herr_t
|
||||
H5D_contig_collective_read(H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
|
||||
H5D__contig_collective_read(H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
|
||||
hsize_t UNUSED nelmts, const H5S_t *file_space, const H5S_t *mem_space,
|
||||
H5D_chunk_map_t UNUSED *fm)
|
||||
{
|
||||
@ -475,14 +474,14 @@ H5D_contig_collective_read(H5D_io_info_t *io_info, const H5D_type_info_t *type_i
|
||||
H5P_genplist_t *dx_plist; /* Pointer to DXPL */
|
||||
herr_t ret_value = SUCCEED; /* Return value */
|
||||
|
||||
FUNC_ENTER_NOAPI(FAIL)
|
||||
FUNC_ENTER_PACKAGE
|
||||
|
||||
/* Sanity check */
|
||||
HDassert(IS_H5FD_MPIO(io_info->dset->oloc.file));
|
||||
HDassert(TRUE == H5P_isa_class(io_info->dxpl_id, H5P_DATASET_XFER));
|
||||
|
||||
/* Call generic internal collective I/O routine */
|
||||
if(H5D_inter_collective_io(io_info, type_info, file_space, mem_space) < 0)
|
||||
if(H5D__inter_collective_io(io_info, type_info, file_space, mem_space) < 0)
|
||||
HGOTO_ERROR(H5E_IO, H5E_READERROR, FAIL, "couldn't finish shared collective MPI-IO")
|
||||
|
||||
/* Obtain the data transfer properties */
|
||||
@ -497,11 +496,11 @@ H5D_contig_collective_read(H5D_io_info_t *io_info, const H5D_type_info_t *type_i
|
||||
|
||||
done:
|
||||
FUNC_LEAVE_NOAPI(ret_value)
|
||||
} /* end H5D_contig_collective_read() */
|
||||
} /* end H5D__contig_collective_read() */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5D_contig_collective_write
|
||||
* Function: H5D__contig_collective_write
|
||||
*
|
||||
* Purpose: Write directly to contiguous data in file from application
|
||||
* memory using collective I/O.
|
||||
@ -514,7 +513,7 @@ done:
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
herr_t
|
||||
H5D_contig_collective_write(H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
|
||||
H5D__contig_collective_write(H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
|
||||
hsize_t UNUSED nelmts, const H5S_t *file_space, const H5S_t *mem_space,
|
||||
H5D_chunk_map_t UNUSED *fm)
|
||||
{
|
||||
@ -522,14 +521,14 @@ H5D_contig_collective_write(H5D_io_info_t *io_info, const H5D_type_info_t *type_
|
||||
H5P_genplist_t *dx_plist; /* Pointer to DXPL */
|
||||
herr_t ret_value = SUCCEED; /* Return value */
|
||||
|
||||
FUNC_ENTER_NOAPI(FAIL)
|
||||
FUNC_ENTER_PACKAGE
|
||||
|
||||
/* Sanity check */
|
||||
HDassert(IS_H5FD_MPIO(io_info->dset->oloc.file));
|
||||
HDassert(TRUE == H5P_isa_class(io_info->dxpl_id, H5P_DATASET_XFER));
|
||||
|
||||
/* Call generic internal collective I/O routine */
|
||||
if(H5D_inter_collective_io(io_info, type_info, file_space, mem_space) < 0)
|
||||
if(H5D__inter_collective_io(io_info, type_info, file_space, mem_space) < 0)
|
||||
HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "couldn't finish shared collective MPI-IO")
|
||||
|
||||
/* Obtain the data transfer properties */
|
||||
@ -544,11 +543,11 @@ H5D_contig_collective_write(H5D_io_info_t *io_info, const H5D_type_info_t *type_
|
||||
|
||||
done:
|
||||
FUNC_LEAVE_NOAPI(ret_value)
|
||||
} /* end H5D_contig_collective_write() */
|
||||
} /* end H5D__contig_collective_write() */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5D_chunk_collective_io
|
||||
* Function: H5D__chunk_collective_io
|
||||
*
|
||||
* Purpose: Routine for
|
||||
* 1) choose an IO option:
|
||||
@ -578,7 +577,7 @@ done:
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
static herr_t
|
||||
H5D_chunk_collective_io(H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
|
||||
H5D__chunk_collective_io(H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
|
||||
H5D_chunk_map_t *fm)
|
||||
{
|
||||
H5P_genplist_t *dx_plist; /* Pointer to DXPL */
|
||||
@ -592,7 +591,7 @@ H5D_chunk_collective_io(H5D_io_info_t *io_info, const H5D_type_info_t *type_info
|
||||
#endif
|
||||
herr_t ret_value = SUCCEED;
|
||||
|
||||
FUNC_ENTER_NOAPI_NOINIT
|
||||
FUNC_ENTER_STATIC
|
||||
|
||||
/* Sanity checks */
|
||||
HDassert(io_info);
|
||||
@ -614,7 +613,7 @@ H5D_chunk_collective_io(H5D_io_info_t *io_info, const H5D_type_info_t *type_info
|
||||
unsigned one_link_chunk_io_threshold; /* Threshhold to use single collective I/O for all chunks */
|
||||
int mpi_size; /* Number of processes in MPI job */
|
||||
|
||||
if(H5D_mpio_get_sum_chunk(io_info, fm, &sum_chunk) < 0)
|
||||
if(H5D__mpio_get_sum_chunk(io_info, fm, &sum_chunk) < 0)
|
||||
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSWAP, FAIL, "unable to obtain the total chunk number of all processes");
|
||||
if((mpi_size = H5F_mpi_get_size(io_info->dset->oloc.file)) < 0)
|
||||
HGOTO_ERROR(H5E_IO, H5E_MPI, FAIL, "unable to obtain mpi size")
|
||||
@ -682,7 +681,7 @@ H5D_chunk_collective_io(H5D_io_info_t *io_info, const H5D_type_info_t *type_info
|
||||
if(H5P_set(dx_plist, H5D_MPIO_ACTUAL_CHUNK_OPT_MODE_NAME, &actual_chunk_opt_mode) < 0)
|
||||
HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "couldn't set actual chunk opt mode property")
|
||||
|
||||
if(H5D_link_chunk_collective_io(io_info, type_info, fm, sum_chunk) < 0)
|
||||
if(H5D__link_chunk_collective_io(io_info, type_info, fm, sum_chunk) < 0)
|
||||
HGOTO_ERROR(H5E_IO, H5E_CANTGET, FAIL, "couldn't finish linked chunk MPI-IO")
|
||||
|
||||
/* Set the actual io mode property. */
|
||||
@ -696,7 +695,7 @@ H5D_chunk_collective_io(H5D_io_info_t *io_info, const H5D_type_info_t *type_info
|
||||
if(H5P_set(dx_plist, H5D_MPIO_ACTUAL_CHUNK_OPT_MODE_NAME, &actual_chunk_opt_mode) < 0)
|
||||
HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "couldn't set actual chunk opt mode property")
|
||||
|
||||
if(H5D_multi_chunk_collective_io_no_opt(io_info, type_info, fm, dx_plist) < 0)
|
||||
if(H5D__multi_chunk_collective_io_no_opt(io_info, type_info, fm, dx_plist) < 0)
|
||||
HGOTO_ERROR(H5E_IO, H5E_CANTGET, FAIL, "couldn't finish multiple chunk MPI-IO")
|
||||
} /* end if */
|
||||
else { /*multiple chunk IOs with opt */
|
||||
@ -704,17 +703,17 @@ H5D_chunk_collective_io(H5D_io_info_t *io_info, const H5D_type_info_t *type_info
|
||||
if(H5P_set(dx_plist, H5D_MPIO_ACTUAL_CHUNK_OPT_MODE_NAME, &actual_chunk_opt_mode) < 0)
|
||||
HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "couldn't set actual chunk opt mode property")
|
||||
|
||||
if(H5D_multi_chunk_collective_io(io_info, type_info, fm, dx_plist) < 0)
|
||||
if(H5D__multi_chunk_collective_io(io_info, type_info, fm, dx_plist) < 0)
|
||||
HGOTO_ERROR(H5E_IO, H5E_CANTGET, FAIL, "couldn't finish optimized multiple chunk MPI-IO")
|
||||
} /* end else */
|
||||
|
||||
done:
|
||||
FUNC_LEAVE_NOAPI(ret_value)
|
||||
} /* end H5D_chunk_collective_io */
|
||||
} /* end H5D__chunk_collective_io */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5D_chunk_collective_read
|
||||
* Function: H5D__chunk_collective_read
|
||||
*
|
||||
* Purpose: Reads directly from chunks in file into application memory
|
||||
* using collective I/O.
|
||||
@ -727,25 +726,25 @@ done:
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
herr_t
|
||||
H5D_chunk_collective_read(H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
|
||||
H5D__chunk_collective_read(H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
|
||||
hsize_t UNUSED nelmts, const H5S_t UNUSED *file_space, const H5S_t UNUSED *mem_space,
|
||||
H5D_chunk_map_t *fm)
|
||||
{
|
||||
herr_t ret_value = SUCCEED; /* Return value */
|
||||
|
||||
FUNC_ENTER_NOAPI(FAIL)
|
||||
FUNC_ENTER_PACKAGE
|
||||
|
||||
/* Call generic selection operation */
|
||||
if(H5D_chunk_collective_io(io_info, type_info, fm) < 0)
|
||||
if(H5D__chunk_collective_io(io_info, type_info, fm) < 0)
|
||||
HGOTO_ERROR(H5E_DATASPACE, H5E_READERROR, FAIL, "read error")
|
||||
|
||||
done:
|
||||
FUNC_LEAVE_NOAPI(ret_value)
|
||||
} /* end H5D_chunk_collective_read() */
|
||||
} /* end H5D__chunk_collective_read() */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5D_chunk_collective_write
|
||||
* Function: H5D__chunk_collective_write
|
||||
*
|
||||
* Purpose: Write directly to chunks in file from application memory
|
||||
* using collective I/O.
|
||||
@ -758,25 +757,25 @@ done:
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
herr_t
|
||||
H5D_chunk_collective_write(H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
|
||||
H5D__chunk_collective_write(H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
|
||||
hsize_t UNUSED nelmts, const H5S_t UNUSED *file_space, const H5S_t UNUSED *mem_space,
|
||||
H5D_chunk_map_t *fm)
|
||||
{
|
||||
herr_t ret_value = SUCCEED; /* Return value */
|
||||
|
||||
FUNC_ENTER_NOAPI(FAIL)
|
||||
FUNC_ENTER_PACKAGE
|
||||
|
||||
/* Call generic selection operation */
|
||||
if(H5D_chunk_collective_io(io_info, type_info, fm) < 0)
|
||||
if(H5D__chunk_collective_io(io_info, type_info, fm) < 0)
|
||||
HGOTO_ERROR(H5E_DATASPACE, H5E_WRITEERROR, FAIL, "write error")
|
||||
|
||||
done:
|
||||
FUNC_LEAVE_NOAPI(ret_value)
|
||||
} /* end H5D_chunk_collective_write() */
|
||||
} /* end H5D__chunk_collective_write() */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5D_link_chunk_collective_io
|
||||
* Function: H5D__link_chunk_collective_io
|
||||
*
|
||||
* Purpose: Routine for one collective IO with one MPI derived datatype to link with all chunks
|
||||
*
|
||||
@ -793,7 +792,7 @@ done:
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
static herr_t
|
||||
H5D_link_chunk_collective_io(H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
|
||||
H5D__link_chunk_collective_io(H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
|
||||
H5D_chunk_map_t *fm, int sum_chunk)
|
||||
{
|
||||
H5D_chunk_addr_info_t *chunk_addr_info_array = NULL;
|
||||
@ -815,11 +814,11 @@ H5D_link_chunk_collective_io(H5D_io_info_t *io_info, const H5D_type_info_t *type
|
||||
int mpi_code; /* MPI return code */
|
||||
herr_t ret_value = SUCCEED;
|
||||
|
||||
FUNC_ENTER_NOAPI_NOINIT
|
||||
FUNC_ENTER_STATIC
|
||||
|
||||
/* Get the sum # of chunks, if not already available */
|
||||
if(sum_chunk < 0) {
|
||||
if(H5D_mpio_get_sum_chunk(io_info, fm, &sum_chunk) < 0)
|
||||
if(H5D__mpio_get_sum_chunk(io_info, fm, &sum_chunk) < 0)
|
||||
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSWAP, FAIL, "unable to obtain the total chunk number of all processes");
|
||||
} /* end if */
|
||||
|
||||
@ -842,7 +841,7 @@ H5D_link_chunk_collective_io(H5D_io_info_t *io_info, const H5D_type_info_t *type
|
||||
HDmemset(coords, 0, sizeof(coords));
|
||||
|
||||
/* Look up address of chunk */
|
||||
if(H5D_chunk_lookup(io_info->dset, io_info->dxpl_id, coords,
|
||||
if(H5D__chunk_lookup(io_info->dset, io_info->dxpl_id, coords,
|
||||
io_info->store->chunk.index, &udata) < 0)
|
||||
HGOTO_ERROR(H5E_STORAGE, H5E_CANTGET, FAIL, "couldn't get chunk info from skipped list")
|
||||
ctg_store.contig.dset_addr = udata.addr;
|
||||
@ -875,7 +874,7 @@ if(H5DEBUG(D))
|
||||
#endif
|
||||
|
||||
/* Perform I/O */
|
||||
if(H5D_inter_collective_io(io_info, type_info, fspace, mspace) < 0)
|
||||
if(H5D__inter_collective_io(io_info, type_info, fspace, mspace) < 0)
|
||||
HGOTO_ERROR(H5E_STORAGE, H5E_CANTGET, FAIL, "couldn't finish shared collective MPI-IO")
|
||||
} /* end if */
|
||||
else {
|
||||
@ -919,7 +918,7 @@ if(H5DEBUG(D))
|
||||
HDfprintf(H5DEBUG(D),"before sorting the chunk address \n");
|
||||
#endif
|
||||
/* Sort the chunk address */
|
||||
if(H5D_sort_chunk(io_info, fm, chunk_addr_info_array, sum_chunk) < 0)
|
||||
if(H5D__sort_chunk(io_info, fm, chunk_addr_info_array, sum_chunk) < 0)
|
||||
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSWAP, FAIL, "unable to sort chunk address")
|
||||
ctg_store.contig.dset_addr = chunk_addr_info_array[0].chunk_addr;
|
||||
|
||||
@ -982,7 +981,7 @@ if(H5DEBUG(D))
|
||||
HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "couldn't allocate total chunk address arraybuffer")
|
||||
|
||||
/* Retrieve chunk address map */
|
||||
if(H5D_chunk_addrmap(io_info, total_chunk_addr_array) < 0)
|
||||
if(H5D__chunk_addrmap(io_info, total_chunk_addr_array) < 0)
|
||||
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get chunk address")
|
||||
|
||||
/* Get chunk with lowest address */
|
||||
@ -1008,7 +1007,7 @@ if(H5DEBUG(D))
|
||||
io_info->store = &ctg_store;
|
||||
|
||||
/* Perform final collective I/O operation */
|
||||
if(H5D_final_collective_io(io_info, type_info, mpi_buf_count, &chunk_final_ftype, &chunk_final_mtype) < 0)
|
||||
if(H5D__final_collective_io(io_info, type_info, mpi_buf_count, &chunk_final_ftype, &chunk_final_mtype) < 0)
|
||||
HGOTO_ERROR(H5E_IO, H5E_CANTGET, FAIL, "couldn't finish MPI-IO")
|
||||
} /* end else */
|
||||
|
||||
@ -1046,11 +1045,11 @@ if(H5DEBUG(D))
|
||||
HMPI_DONE_ERROR(FAIL, "MPI_Type_free failed", mpi_code)
|
||||
|
||||
FUNC_LEAVE_NOAPI(ret_value)
|
||||
} /* end H5D_link_chunk_collective_io */
|
||||
} /* end H5D__link_chunk_collective_io */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5D_multi_chunk_collective_io
|
||||
* Function: H5D__multi_chunk_collective_io
|
||||
*
|
||||
* Purpose: To do IO per chunk according to IO mode(collective/independent/none)
|
||||
*
|
||||
@ -1067,7 +1066,7 @@ if(H5DEBUG(D))
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
static herr_t
|
||||
H5D_multi_chunk_collective_io(H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
|
||||
H5D__multi_chunk_collective_io(H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
|
||||
H5D_chunk_map_t *fm, H5P_genplist_t *dx_plist)
|
||||
{
|
||||
H5D_io_info_t ctg_io_info; /* Contiguous I/O info object */
|
||||
@ -1088,7 +1087,7 @@ H5D_multi_chunk_collective_io(H5D_io_info_t *io_info, const H5D_type_info_t *typ
|
||||
H5D_mpio_actual_io_mode_t actual_io_mode = H5D_MPIO_NO_COLLECTIVE; /* Local variable for tracking the I/O mode used. */
|
||||
herr_t ret_value = SUCCEED;
|
||||
|
||||
FUNC_ENTER_NOAPI_NOINIT
|
||||
FUNC_ENTER_STATIC
|
||||
|
||||
#ifdef H5Dmpio_DEBUG
|
||||
mpi_rank = H5F_mpi_get_rank(io_info->dset->oloc.file);
|
||||
@ -1107,7 +1106,7 @@ if(H5DEBUG(D))
|
||||
#endif
|
||||
|
||||
/* Obtain IO option for each chunk */
|
||||
if(H5D_obtain_mpio_mode(io_info, fm, dx_plist, chunk_io_option, chunk_addr) < 0)
|
||||
if(H5D__obtain_mpio_mode(io_info, fm, dx_plist, chunk_io_option, chunk_addr) < 0)
|
||||
HGOTO_ERROR(H5E_DATASET, H5E_CANTRECV, FAIL, "unable to obtain MPIO mode")
|
||||
|
||||
/* Set up contiguous I/O info object */
|
||||
@ -1181,12 +1180,12 @@ if(H5DEBUG(D))
|
||||
|
||||
/* Switch back to collective I/O */
|
||||
if(last_xfer_mode != H5FD_MPIO_COLLECTIVE) {
|
||||
if(H5D_ioinfo_xfer_mode(io_info, dx_plist, H5FD_MPIO_COLLECTIVE) < 0)
|
||||
if(H5D__ioinfo_xfer_mode(io_info, dx_plist, H5FD_MPIO_COLLECTIVE) < 0)
|
||||
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't switch to collective I/O")
|
||||
last_xfer_mode = H5FD_MPIO_COLLECTIVE;
|
||||
} /* end if */
|
||||
if(last_coll_opt_mode != H5FD_MPIO_COLLECTIVE_IO) {
|
||||
if(H5D_ioinfo_coll_opt_mode(io_info, dx_plist, H5FD_MPIO_COLLECTIVE_IO) < 0)
|
||||
if(H5D__ioinfo_coll_opt_mode(io_info, dx_plist, H5FD_MPIO_COLLECTIVE_IO) < 0)
|
||||
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't switch to collective I/O")
|
||||
last_coll_opt_mode = H5FD_MPIO_COLLECTIVE_IO;
|
||||
} /* end if */
|
||||
@ -1195,7 +1194,7 @@ if(H5DEBUG(D))
|
||||
ctg_store.contig.dset_addr = chunk_addr[u];
|
||||
|
||||
/* Perform the I/O */
|
||||
if(H5D_inter_collective_io(&ctg_io_info, type_info, fspace, mspace) < 0)
|
||||
if(H5D__inter_collective_io(&ctg_io_info, type_info, fspace, mspace) < 0)
|
||||
HGOTO_ERROR(H5E_IO, H5E_CANTGET, FAIL, "couldn't finish shared collective MPI-IO")
|
||||
} /* end if */
|
||||
else { /* possible independent IO for this chunk */
|
||||
@ -1220,7 +1219,7 @@ if(H5DEBUG(D))
|
||||
|
||||
/* Using independent I/O with file setview.*/
|
||||
if(last_coll_opt_mode != H5FD_MPIO_INDIVIDUAL_IO) {
|
||||
if(H5D_ioinfo_coll_opt_mode(io_info, dx_plist, H5FD_MPIO_INDIVIDUAL_IO) < 0)
|
||||
if(H5D__ioinfo_coll_opt_mode(io_info, dx_plist, H5FD_MPIO_INDIVIDUAL_IO) < 0)
|
||||
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't switch to individual I/O")
|
||||
last_coll_opt_mode = H5FD_MPIO_INDIVIDUAL_IO;
|
||||
} /* end if */
|
||||
@ -1229,7 +1228,7 @@ if(H5DEBUG(D))
|
||||
ctg_store.contig.dset_addr = chunk_addr[u];
|
||||
|
||||
/* Perform the I/O */
|
||||
if(H5D_inter_collective_io(&ctg_io_info, type_info, fspace, mspace) < 0)
|
||||
if(H5D__inter_collective_io(&ctg_io_info, type_info, fspace, mspace) < 0)
|
||||
HGOTO_ERROR(H5E_IO, H5E_CANTGET, FAIL, "couldn't finish shared collective MPI-IO")
|
||||
#ifdef H5D_DEBUG
|
||||
if(H5DEBUG(D))
|
||||
@ -1249,11 +1248,11 @@ done:
|
||||
H5MM_xfree(chunk_addr);
|
||||
|
||||
FUNC_LEAVE_NOAPI(ret_value)
|
||||
} /* end H5D_multi_chunk_collective_io */
|
||||
} /* end H5D__multi_chunk_collective_io */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5D_multi_chunk_collective_io_no_opt
|
||||
* Function: H5D__multi_chunk_collective_io_no_opt
|
||||
*
|
||||
* Purpose: To do collective IO without any optimization per chunk base
|
||||
* The internal independent IO inside HDF5 cannot handle
|
||||
@ -1280,7 +1279,7 @@ done:
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
static herr_t
|
||||
H5D_multi_chunk_collective_io_no_opt(H5D_io_info_t *io_info,
|
||||
H5D__multi_chunk_collective_io_no_opt(H5D_io_info_t *io_info,
|
||||
const H5D_type_info_t *type_info, H5D_chunk_map_t *fm, H5P_genplist_t *dx_plist)
|
||||
{
|
||||
H5SL_node_t *chunk_node; /* Current node in chunk skip list */
|
||||
@ -1295,7 +1294,7 @@ H5D_multi_chunk_collective_io_no_opt(H5D_io_info_t *io_info,
|
||||
H5D_mpio_actual_io_mode_t actual_io_mode = H5D_MPIO_NO_COLLECTIVE; /*Local variable for tracking the I/O modes used. */
|
||||
herr_t ret_value = SUCCEED;
|
||||
|
||||
FUNC_ENTER_NOAPI_NOINIT
|
||||
FUNC_ENTER_STATIC
|
||||
|
||||
#ifdef H5D_DEBUG
|
||||
if(H5DEBUG(D)) {
|
||||
@ -1326,7 +1325,7 @@ if(H5DEBUG(D)) {
|
||||
io_info->store = &store;
|
||||
|
||||
/* Get the min. # of chunks */
|
||||
if(H5D_mpio_get_min_chunk(io_info, fm, &min_chunk) < 0)
|
||||
if(H5D__mpio_get_min_chunk(io_info, fm, &min_chunk) < 0)
|
||||
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get minimum number of chunk")
|
||||
HDassert(min_chunk >= 0);
|
||||
|
||||
@ -1360,7 +1359,7 @@ if(H5DEBUG(D)) {
|
||||
make_ind = TRUE;
|
||||
|
||||
/* Retrieve the chunk's address */
|
||||
if(H5D_chunk_lookup(io_info->dset, io_info->dxpl_id, chunk_info->coords,
|
||||
if(H5D__chunk_lookup(io_info->dset, io_info->dxpl_id, chunk_info->coords,
|
||||
chunk_info->index, &udata) < 0)
|
||||
HGOTO_ERROR(H5E_STORAGE, H5E_CANTGET, FAIL, "couldn't get chunk info from skipped list")
|
||||
|
||||
@ -1372,14 +1371,14 @@ if(H5DEBUG(D)) {
|
||||
htri_t cacheable; /* Whether the chunk is cacheable */
|
||||
|
||||
/* Switch to independent I/O */
|
||||
if(H5D_ioinfo_xfer_mode(io_info, dx_plist, H5FD_MPIO_INDEPENDENT) < 0)
|
||||
if(H5D__ioinfo_xfer_mode(io_info, dx_plist, H5FD_MPIO_INDEPENDENT) < 0)
|
||||
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't switch to independent I/O")
|
||||
|
||||
/* Update the local variable tracking the dxpl's actual io mode */
|
||||
actual_io_mode = actual_io_mode | H5D_MPIO_CHUNK_INDEPENDENT;
|
||||
|
||||
/* Load the chunk into cache and lock it. */
|
||||
if((cacheable = H5D_chunk_cacheable(io_info, udata.addr,
|
||||
if((cacheable = H5D__chunk_cacheable(io_info, udata.addr,
|
||||
io_info->op_type == H5D_IO_OP_WRITE)) < 0)
|
||||
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't tell if chunk is cacheable")
|
||||
if(cacheable) {
|
||||
@ -1394,7 +1393,7 @@ if(H5DEBUG(D)) {
|
||||
entire_chunk = FALSE;
|
||||
|
||||
/* Lock the chunk into the cache */
|
||||
if(NULL == (chunk = H5D_chunk_lock(io_info, &udata, entire_chunk)))
|
||||
if(NULL == (chunk = H5D__chunk_lock(io_info, &udata, entire_chunk)))
|
||||
HGOTO_ERROR(H5E_IO, H5E_READERROR, FAIL, "unable to read raw data chunk")
|
||||
|
||||
/* Set up the storage buffer information for this chunk */
|
||||
@ -1427,7 +1426,7 @@ if(H5DEBUG(D)) {
|
||||
|
||||
/* Release the cache lock on the chunk. */
|
||||
if(chunk)
|
||||
if(H5D_chunk_unlock(io_info, &udata, (io_info->op_type == H5D_IO_OP_WRITE), chunk, accessed_bytes) < 0)
|
||||
if(H5D__chunk_unlock(io_info, &udata, (io_info->op_type == H5D_IO_OP_WRITE), chunk, accessed_bytes) < 0)
|
||||
HGOTO_ERROR(H5E_IO, H5E_READERROR, FAIL, "unable to unlock raw data chunk")
|
||||
} /* end if */
|
||||
else { /*collective I/O */
|
||||
@ -1437,12 +1436,12 @@ if(H5DEBUG(D)) {
|
||||
/* Update the local variable tracking the dxpl's actual io Mode. */
|
||||
actual_io_mode = actual_io_mode | H5D_MPIO_CHUNK_COLLECTIVE;
|
||||
|
||||
if(H5D_inter_collective_io(&ctg_io_info, type_info, chunk_info->fspace, chunk_info->mspace) < 0)
|
||||
if(H5D__inter_collective_io(&ctg_io_info, type_info, chunk_info->fspace, chunk_info->mspace) < 0)
|
||||
HGOTO_ERROR(H5E_IO, H5E_CANTGET, FAIL,"couldn't finish shared collective MPI-IO")
|
||||
} /* end else */
|
||||
|
||||
if(make_coll)
|
||||
if(H5D_ioinfo_xfer_mode(io_info, dx_plist, H5FD_MPIO_COLLECTIVE) < 0)
|
||||
if(H5D__ioinfo_xfer_mode(io_info, dx_plist, H5FD_MPIO_COLLECTIVE) < 0)
|
||||
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't switch to independent I/O")
|
||||
|
||||
/* Get the next chunk node in the skip list */
|
||||
@ -1455,11 +1454,11 @@ if(H5DEBUG(D)) {
|
||||
|
||||
done:
|
||||
FUNC_LEAVE_NOAPI(ret_value)
|
||||
} /* end H5D_multi_chunk_collective_io_no_opt */
|
||||
} /* end H5D__multi_chunk_collective_io_no_opt */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5D_inter_collective_io
|
||||
* Function: H5D__inter_collective_io
|
||||
*
|
||||
* Purpose: Routine for the shared part of collective IO between multiple chunk
|
||||
* collective IO and contiguous collective IO
|
||||
@ -1472,7 +1471,7 @@ done:
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
static herr_t
|
||||
H5D_inter_collective_io(H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
|
||||
H5D__inter_collective_io(H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
|
||||
const H5S_t *file_space, const H5S_t *mem_space)
|
||||
{
|
||||
int mpi_buf_count; /* # of MPI types */
|
||||
@ -1482,7 +1481,7 @@ H5D_inter_collective_io(H5D_io_info_t *io_info, const H5D_type_info_t *type_info
|
||||
int mpi_code; /* MPI return code */
|
||||
herr_t ret_value = SUCCEED; /* return value */
|
||||
|
||||
FUNC_ENTER_NOAPI_NOINIT
|
||||
FUNC_ENTER_STATIC
|
||||
|
||||
if((file_space != NULL) && (mem_space != NULL)) {
|
||||
int mpi_file_count; /* Number of file "objects" to transfer */
|
||||
@ -1508,7 +1507,7 @@ if(H5DEBUG(D))
|
||||
#endif
|
||||
|
||||
/* Perform final collective I/O operation */
|
||||
if(H5D_final_collective_io(io_info, type_info, (hsize_t)mpi_buf_count, &mpi_file_type, &mpi_buf_type) < 0)
|
||||
if(H5D__final_collective_io(io_info, type_info, (hsize_t)mpi_buf_count, &mpi_file_type, &mpi_buf_type) < 0)
|
||||
HGOTO_ERROR(H5E_IO, H5E_CANTGET, FAIL, "couldn't finish collective MPI-IO")
|
||||
|
||||
done:
|
||||
@ -1524,11 +1523,11 @@ if(H5DEBUG(D))
|
||||
#endif
|
||||
|
||||
FUNC_LEAVE_NOAPI(ret_value)
|
||||
} /* end H5D_inter_collective_io() */
|
||||
} /* end H5D__inter_collective_io() */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5D_final_collective_io
|
||||
* Function: H5D__final_collective_io
|
||||
*
|
||||
* Purpose: Routine for the common part of collective IO with different storages.
|
||||
*
|
||||
@ -1540,13 +1539,13 @@ if(H5DEBUG(D))
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
static herr_t
|
||||
H5D_final_collective_io(H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
|
||||
H5D__final_collective_io(H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
|
||||
hsize_t mpi_buf_count, MPI_Datatype *mpi_file_type, MPI_Datatype *mpi_buf_type)
|
||||
{
|
||||
hbool_t plist_is_setup = FALSE; /* Whether the dxpl has been customized */
|
||||
herr_t ret_value = SUCCEED;
|
||||
|
||||
FUNC_ENTER_NOAPI_NOINIT
|
||||
FUNC_ENTER_STATIC
|
||||
|
||||
/* Pass buf type, file type to the file driver. */
|
||||
if(H5FD_mpi_setup_collective(io_info->dxpl_id, *mpi_buf_type, *mpi_file_type) < 0)
|
||||
@ -1573,11 +1572,39 @@ if(H5DEBUG(D))
|
||||
HDfprintf(H5DEBUG(D),"ret_value before leaving final_collective_io=%d\n",ret_value);
|
||||
#endif
|
||||
FUNC_LEAVE_NOAPI(ret_value)
|
||||
} /* end H5D_final_collective_io */
|
||||
} /* end H5D__final_collective_io */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5D_sort_chunk
|
||||
* Function: H5D__cmp_chunk_addr
|
||||
*
|
||||
* Purpose: Routine to compare chunk addresses
|
||||
*
|
||||
* Description: Callback for qsort() to compare chunk addresses
|
||||
*
|
||||
* Return: -1, 0, 1
|
||||
*
|
||||
* Programmer: Muqun Yang
|
||||
* Monday, Feb. 13th, 2006
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
static int
|
||||
H5D__cmp_chunk_addr(const void *chunk_addr_info1, const void *chunk_addr_info2)
|
||||
{
|
||||
haddr_t addr1, addr2;
|
||||
|
||||
FUNC_ENTER_STATIC_NOERR
|
||||
|
||||
addr1 = ((const H5D_chunk_addr_info_t *)chunk_addr_info1)->chunk_addr;
|
||||
addr2 = ((const H5D_chunk_addr_info_t *)chunk_addr_info2)->chunk_addr;
|
||||
|
||||
FUNC_LEAVE_NOAPI(H5F_addr_cmp(addr1, addr2))
|
||||
} /* end H5D__cmp_chunk_addr() */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5D__sort_chunk
|
||||
*
|
||||
* Purpose: Routine to sort chunks in increasing order of chunk address
|
||||
* Each chunk address is also obtained.
|
||||
@ -1602,7 +1629,7 @@ if(H5DEBUG(D))
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
static herr_t
|
||||
H5D_sort_chunk(H5D_io_info_t *io_info, const H5D_chunk_map_t *fm,
|
||||
H5D__sort_chunk(H5D_io_info_t *io_info, const H5D_chunk_map_t *fm,
|
||||
H5D_chunk_addr_info_t chunk_addr_info_array[], int sum_chunk)
|
||||
{
|
||||
H5SL_node_t *chunk_node; /* Current node in chunk skip list */
|
||||
@ -1617,7 +1644,7 @@ H5D_sort_chunk(H5D_io_info_t *io_info, const H5D_chunk_map_t *fm,
|
||||
int i; /* Local index variable */
|
||||
herr_t ret_value = SUCCEED; /* Return value */
|
||||
|
||||
FUNC_ENTER_NOAPI_NOINIT
|
||||
FUNC_ENTER_STATIC
|
||||
|
||||
/* Retrieve # of MPI processes */
|
||||
if((mpi_size = H5F_mpi_get_size(io_info->dset->oloc.file)) < 0)
|
||||
@ -1658,7 +1685,7 @@ if(H5DEBUG(D))
|
||||
HGOTO_ERROR(H5E_IO, H5E_MPI, FAIL, "unable to obtain mpi rank")
|
||||
|
||||
if(mpi_rank == 0) {
|
||||
if(H5D_chunk_addrmap(io_info, total_chunk_addr_array) < 0)
|
||||
if(H5D__chunk_addrmap(io_info, total_chunk_addr_array) < 0)
|
||||
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get chunk address")
|
||||
} /* end if */
|
||||
|
||||
@ -1681,7 +1708,7 @@ if(H5DEBUG(D))
|
||||
H5D_chunk_ud_t udata; /* User data for querying chunk info */
|
||||
|
||||
/* Get address of chunk */
|
||||
if(H5D_chunk_lookup(io_info->dset, io_info->dxpl_id,
|
||||
if(H5D__chunk_lookup(io_info->dset, io_info->dxpl_id,
|
||||
chunk_info->coords, chunk_info->index, &udata) < 0)
|
||||
HGOTO_ERROR(H5E_STORAGE, H5E_CANTGET, FAIL, "couldn't get chunk info from skipped list")
|
||||
chunk_addr = udata.addr;
|
||||
@ -1709,7 +1736,7 @@ if(H5DEBUG(D))
|
||||
if(do_sort) {
|
||||
size_t num_chunks = H5SL_count(fm->sel_chunks);
|
||||
|
||||
HDqsort(chunk_addr_info_array, num_chunks, sizeof(chunk_addr_info_array[0]), H5D_cmp_chunk_addr);
|
||||
HDqsort(chunk_addr_info_array, num_chunks, sizeof(chunk_addr_info_array[0]), H5D__cmp_chunk_addr);
|
||||
} /* end if */
|
||||
|
||||
done:
|
||||
@ -1717,11 +1744,11 @@ done:
|
||||
H5MM_xfree(total_chunk_addr_array);
|
||||
|
||||
FUNC_LEAVE_NOAPI(ret_value)
|
||||
} /* end H5D_sort_chunk() */
|
||||
} /* end H5D__sort_chunk() */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5D_obtain_mpio_mode
|
||||
* Function: H5D__obtain_mpio_mode
|
||||
*
|
||||
* Purpose: Routine to obtain each io mode(collective,independent or none) for each chunk;
|
||||
* Each chunk address is also obtained.
|
||||
@ -1757,7 +1784,7 @@ done:
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
static herr_t
|
||||
H5D_obtain_mpio_mode(H5D_io_info_t* io_info, H5D_chunk_map_t *fm,
|
||||
H5D__obtain_mpio_mode(H5D_io_info_t* io_info, H5D_chunk_map_t *fm,
|
||||
H5P_genplist_t *dx_plist, uint8_t assign_io_mode[], haddr_t chunk_addr[])
|
||||
{
|
||||
int total_chunks;
|
||||
@ -1780,7 +1807,7 @@ H5D_obtain_mpio_mode(H5D_io_info_t* io_info, H5D_chunk_map_t *fm,
|
||||
#endif
|
||||
herr_t ret_value = SUCCEED;
|
||||
|
||||
FUNC_ENTER_NOAPI_NOINIT
|
||||
FUNC_ENTER_STATIC
|
||||
|
||||
/* Assign the rank 0 to the root */
|
||||
root = 0;
|
||||
@ -1797,7 +1824,7 @@ H5D_obtain_mpio_mode(H5D_io_info_t* io_info, H5D_chunk_map_t *fm,
|
||||
percent_nproc_per_chunk = H5P_peek_unsigned(dx_plist, H5D_XFER_MPIO_CHUNK_OPT_RATIO_NAME);
|
||||
chunk_opt_mode = (H5FD_mpio_chunk_opt_t)H5P_peek_unsigned(dx_plist, H5D_XFER_MPIO_CHUNK_OPT_HARD_NAME);
|
||||
if((chunk_opt_mode == H5FD_MPIO_CHUNK_MULTI_IO) || (percent_nproc_per_chunk == 0)) {
|
||||
if(H5D_chunk_addrmap(io_info, chunk_addr) < 0)
|
||||
if(H5D__chunk_addrmap(io_info, chunk_addr) < 0)
|
||||
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get chunk address");
|
||||
for(ic = 0; ic < total_chunks; ic++)
|
||||
assign_io_mode[ic] = H5D_CHUNK_IO_MODE_COL;
|
||||
@ -1837,7 +1864,7 @@ H5D_obtain_mpio_mode(H5D_io_info_t* io_info, H5D_chunk_map_t *fm,
|
||||
nproc_per_chunk = (int*)H5MM_calloc(total_chunks * sizeof(int));
|
||||
|
||||
/* calculating the chunk address */
|
||||
if(H5D_chunk_addrmap(io_info, chunk_addr) < 0) {
|
||||
if(H5D__chunk_addrmap(io_info, chunk_addr) < 0) {
|
||||
HDfree(nproc_per_chunk);
|
||||
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get chunk address")
|
||||
} /* end if */
|
||||
@ -1916,19 +1943,6 @@ done:
|
||||
} /* end if */
|
||||
|
||||
FUNC_LEAVE_NOAPI(ret_value)
|
||||
} /* end H5D_obtain_mpio_mode() */
|
||||
|
||||
static int
|
||||
H5D_cmp_chunk_addr(const void *chunk_addr_info1, const void *chunk_addr_info2)
|
||||
{
|
||||
haddr_t addr1, addr2;
|
||||
|
||||
FUNC_ENTER_NOAPI_NOINIT_NOERR
|
||||
|
||||
addr1 = ((const H5D_chunk_addr_info_t *)chunk_addr_info1)->chunk_addr;
|
||||
addr2 = ((const H5D_chunk_addr_info_t *)chunk_addr_info2)->chunk_addr;
|
||||
|
||||
FUNC_LEAVE_NOAPI(H5F_addr_cmp(addr1, addr2))
|
||||
}
|
||||
} /* end H5D__obtain_mpio_mode() */
|
||||
#endif /* H5_HAVE_PARALLEL */
|
||||
|
||||
|
116
src/H5Doh.c
116
src/H5Doh.c
@ -45,18 +45,17 @@
|
||||
/********************/
|
||||
/* Local Prototypes */
|
||||
/********************/
|
||||
static void *H5O_dset_get_copy_file_udata(void);
|
||||
static void H5O_dset_free_copy_file_udata(void *);
|
||||
static htri_t H5O_dset_isa(H5O_t *loc);
|
||||
static hid_t H5O_dset_open(const H5G_loc_t *obj_loc, hid_t lapl_id,
|
||||
static void *H5O__dset_get_copy_file_udata(void);
|
||||
static void H5O__dset_free_copy_file_udata(void *);
|
||||
static htri_t H5O__dset_isa(H5O_t *loc);
|
||||
static hid_t H5O__dset_open(const H5G_loc_t *obj_loc, hid_t lapl_id,
|
||||
hid_t dxpl_id, hbool_t app_ref);
|
||||
static void *H5O_dset_create(H5F_t *f, void *_crt_info, H5G_loc_t *obj_loc,
|
||||
static void *H5O__dset_create(H5F_t *f, void *_crt_info, H5G_loc_t *obj_loc,
|
||||
hid_t dxpl_id);
|
||||
static H5O_loc_t *H5O_dset_get_oloc(hid_t obj_id);
|
||||
static herr_t H5O_dset_bh_info(H5F_t *f, hid_t dxpl_id, H5O_t *oh,
|
||||
static H5O_loc_t *H5O__dset_get_oloc(hid_t obj_id);
|
||||
static herr_t H5O__dset_bh_info(H5F_t *f, hid_t dxpl_id, H5O_t *oh,
|
||||
H5_ih_info_t *bh_info);
|
||||
|
||||
static herr_t H5O_dset_flush(H5G_loc_t *obj_loc, hid_t dxpl_id);
|
||||
static herr_t H5O__dset_flush(H5G_loc_t *obj_loc, hid_t dxpl_id);
|
||||
|
||||
|
||||
/*********************/
|
||||
@ -77,14 +76,14 @@ static herr_t H5O_dset_flush(H5G_loc_t *obj_loc, hid_t dxpl_id);
|
||||
const H5O_obj_class_t H5O_OBJ_DATASET[1] = {{
|
||||
H5O_TYPE_DATASET, /* object type */
|
||||
"dataset", /* object name, for debugging */
|
||||
H5O_dset_get_copy_file_udata, /* get 'copy file' user data */
|
||||
H5O_dset_free_copy_file_udata, /* free 'copy file' user data */
|
||||
H5O_dset_isa, /* "isa" message */
|
||||
H5O_dset_open, /* open an object of this class */
|
||||
H5O_dset_create, /* create an object of this class */
|
||||
H5O_dset_get_oloc, /* get an object header location for an object */
|
||||
H5O_dset_bh_info, /* get the index & heap info for an object */
|
||||
H5O_dset_flush /* flush an opened object of this class */
|
||||
H5O__dset_get_copy_file_udata, /* get 'copy file' user data */
|
||||
H5O__dset_free_copy_file_udata, /* free 'copy file' user data */
|
||||
H5O__dset_isa, /* "isa" message */
|
||||
H5O__dset_open, /* open an object of this class */
|
||||
H5O__dset_create, /* create an object of this class */
|
||||
H5O__dset_get_oloc, /* get an object header location for an object */
|
||||
H5O__dset_bh_info, /* get the index & heap info for an object */
|
||||
H5O__dset_flush /* flush an opened object of this class */
|
||||
}};
|
||||
|
||||
/* Declare a free list to manage the H5D_copy_file_ud_t struct */
|
||||
@ -92,7 +91,7 @@ H5FL_DEFINE(H5D_copy_file_ud_t);
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5O_dset_get_copy_file_udata
|
||||
* Function: H5O__dset_get_copy_file_udata
|
||||
*
|
||||
* Purpose: Allocates the user data needed for copying a dataset's
|
||||
* object header from file to file.
|
||||
@ -107,11 +106,11 @@ H5FL_DEFINE(H5D_copy_file_ud_t);
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
static void *
|
||||
H5O_dset_get_copy_file_udata(void)
|
||||
H5O__dset_get_copy_file_udata(void)
|
||||
{
|
||||
void *ret_value; /* Return value */
|
||||
|
||||
FUNC_ENTER_NOAPI_NOINIT
|
||||
FUNC_ENTER_STATIC
|
||||
|
||||
/* Allocate space for the 'copy file' user data for copying datasets */
|
||||
if(NULL == (ret_value = H5FL_CALLOC(H5D_copy_file_ud_t)))
|
||||
@ -119,11 +118,11 @@ H5O_dset_get_copy_file_udata(void)
|
||||
|
||||
done:
|
||||
FUNC_LEAVE_NOAPI(ret_value)
|
||||
} /* end H5O_dset_get_copy_file_udata() */
|
||||
} /* end H5O__dset_get_copy_file_udata() */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5O_dset_free_copy_file_udata
|
||||
* Function: H5O__dset_free_copy_file_udata
|
||||
*
|
||||
* Purpose: Release the user data needed for copying a dataset's
|
||||
* object header from file to file.
|
||||
@ -133,18 +132,14 @@ done:
|
||||
* Programmer: Quincey Koziol
|
||||
* Monday, November 21, 2005
|
||||
*
|
||||
* Modifications: Peter Cao
|
||||
* Tuesday, December 27, 2005
|
||||
* Free filter pipeline for copying a dataset
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
static void
|
||||
H5O_dset_free_copy_file_udata(void *_udata)
|
||||
H5O__dset_free_copy_file_udata(void *_udata)
|
||||
{
|
||||
H5D_copy_file_ud_t *udata = (H5D_copy_file_ud_t *)_udata;
|
||||
|
||||
FUNC_ENTER_NOAPI_NOINIT_NOERR
|
||||
FUNC_ENTER_STATIC_NOERR
|
||||
|
||||
/* Sanity check */
|
||||
HDassert(udata);
|
||||
@ -165,11 +160,11 @@ H5O_dset_free_copy_file_udata(void *_udata)
|
||||
udata = H5FL_FREE(H5D_copy_file_ud_t, udata);
|
||||
|
||||
FUNC_LEAVE_NOAPI_VOID
|
||||
} /* end H5O_dset_free_copy_file_udata() */
|
||||
} /* end H5O__dset_free_copy_file_udata() */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5O_dset_isa
|
||||
* Function: H5O__dset_isa
|
||||
*
|
||||
* Purpose: Determines if an object has the requisite messages for being
|
||||
* a dataset.
|
||||
@ -186,12 +181,12 @@ H5O_dset_free_copy_file_udata(void *_udata)
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
static htri_t
|
||||
H5O_dset_isa(H5O_t *oh)
|
||||
H5O__dset_isa(H5O_t *oh)
|
||||
{
|
||||
htri_t exists; /* Flag if header message of interest exists */
|
||||
htri_t ret_value = TRUE; /* Return value */
|
||||
|
||||
FUNC_ENTER_NOAPI_NOINIT
|
||||
FUNC_ENTER_STATIC
|
||||
|
||||
HDassert(oh);
|
||||
|
||||
@ -209,11 +204,11 @@ H5O_dset_isa(H5O_t *oh)
|
||||
|
||||
done:
|
||||
FUNC_LEAVE_NOAPI(ret_value)
|
||||
} /* end H5O_dset_isa() */
|
||||
} /* end H5O__dset_isa() */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5O_dset_open
|
||||
* Function: H5O__dset_open
|
||||
*
|
||||
* Purpose: Open a dataset at a particular location
|
||||
*
|
||||
@ -226,14 +221,14 @@ done:
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
static hid_t
|
||||
H5O_dset_open(const H5G_loc_t *obj_loc, hid_t lapl_id, hid_t dxpl_id, hbool_t app_ref)
|
||||
H5O__dset_open(const H5G_loc_t *obj_loc, hid_t lapl_id, hid_t dxpl_id, hbool_t app_ref)
|
||||
{
|
||||
H5D_t *dset = NULL; /* Dataset opened */
|
||||
htri_t isdapl; /* lapl_id is a dapl */
|
||||
hid_t dapl_id; /* dapl to use to open this dataset */
|
||||
hid_t ret_value; /* Return value */
|
||||
|
||||
FUNC_ENTER_NOAPI_NOINIT
|
||||
FUNC_ENTER_STATIC
|
||||
|
||||
HDassert(obj_loc);
|
||||
|
||||
@ -263,11 +258,11 @@ done:
|
||||
HDONE_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "unable to release dataset")
|
||||
|
||||
FUNC_LEAVE_NOAPI(ret_value)
|
||||
} /* end H5O_dset_open() */
|
||||
} /* end H5O__dset_open() */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5O_dset_create
|
||||
* Function: H5O__dset_create
|
||||
*
|
||||
* Purpose: Create a dataset in a file
|
||||
*
|
||||
@ -280,13 +275,13 @@ done:
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
static void *
|
||||
H5O_dset_create(H5F_t *f, void *_crt_info, H5G_loc_t *obj_loc, hid_t dxpl_id)
|
||||
H5O__dset_create(H5F_t *f, void *_crt_info, H5G_loc_t *obj_loc, hid_t dxpl_id)
|
||||
{
|
||||
H5D_obj_create_t *crt_info = (H5D_obj_create_t *)_crt_info; /* Dataset creation parameters */
|
||||
H5D_t *dset = NULL; /* New dataset created */
|
||||
void *ret_value; /* Return value */
|
||||
|
||||
FUNC_ENTER_NOAPI_NOINIT
|
||||
FUNC_ENTER_STATIC
|
||||
|
||||
/* Sanity checks */
|
||||
HDassert(f);
|
||||
@ -294,7 +289,7 @@ H5O_dset_create(H5F_t *f, void *_crt_info, H5G_loc_t *obj_loc, hid_t dxpl_id)
|
||||
HDassert(obj_loc);
|
||||
|
||||
/* Create the the dataset */
|
||||
if(NULL == (dset = H5D_create(f, crt_info->type_id, crt_info->space, crt_info->dcpl_id, crt_info->dapl_id, dxpl_id)))
|
||||
if(NULL == (dset = H5D__create(f, crt_info->type_id, crt_info->space, crt_info->dcpl_id, crt_info->dapl_id, dxpl_id)))
|
||||
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, NULL, "unable to create dataset")
|
||||
|
||||
/* Set up the new dataset's location */
|
||||
@ -312,11 +307,11 @@ done:
|
||||
HDONE_ERROR(H5E_DATASET, H5E_CLOSEERROR, NULL, "unable to release dataset")
|
||||
|
||||
FUNC_LEAVE_NOAPI(ret_value)
|
||||
} /* end H5O_dset_create() */
|
||||
} /* end H5O__dset_create() */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5O_dset_get_oloc
|
||||
* Function: H5O__dset_get_oloc
|
||||
*
|
||||
* Purpose: Retrieve the object header location for an open object
|
||||
*
|
||||
@ -329,12 +324,12 @@ done:
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
static H5O_loc_t *
|
||||
H5O_dset_get_oloc(hid_t obj_id)
|
||||
H5O__dset_get_oloc(hid_t obj_id)
|
||||
{
|
||||
H5D_t *dset; /* Dataset opened */
|
||||
H5O_loc_t *ret_value; /* Return value */
|
||||
|
||||
FUNC_ENTER_NOAPI_NOINIT
|
||||
FUNC_ENTER_STATIC
|
||||
|
||||
/* Get the dataset */
|
||||
if(NULL == (dset = (H5D_t *)H5I_object(obj_id)))
|
||||
@ -346,11 +341,11 @@ H5O_dset_get_oloc(hid_t obj_id)
|
||||
|
||||
done:
|
||||
FUNC_LEAVE_NOAPI(ret_value)
|
||||
} /* end H5O_dset_get_oloc() */
|
||||
} /* end H5O__dset_get_oloc() */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5O_dset_bh_info
|
||||
* Function: H5O__dset_bh_info
|
||||
*
|
||||
* Purpose: Returns the amount of btree storage that is used for chunked
|
||||
* dataset.
|
||||
@ -364,7 +359,7 @@ done:
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
static herr_t
|
||||
H5O_dset_bh_info(H5F_t *f, hid_t dxpl_id, H5O_t *oh, H5_ih_info_t *bh_info)
|
||||
H5O__dset_bh_info(H5F_t *f, hid_t dxpl_id, H5O_t *oh, H5_ih_info_t *bh_info)
|
||||
{
|
||||
H5O_layout_t layout; /* Data storage layout message */
|
||||
H5O_pline_t pline; /* I/O pipeline message */
|
||||
@ -375,7 +370,7 @@ H5O_dset_bh_info(H5F_t *f, hid_t dxpl_id, H5O_t *oh, H5_ih_info_t *bh_info)
|
||||
htri_t exists; /* Flag if header message of interest exists */
|
||||
herr_t ret_value = SUCCEED; /* Return value */
|
||||
|
||||
FUNC_ENTER_NOAPI_NOINIT
|
||||
FUNC_ENTER_STATIC
|
||||
|
||||
/* Sanity check */
|
||||
HDassert(f);
|
||||
@ -388,7 +383,7 @@ H5O_dset_bh_info(H5F_t *f, hid_t dxpl_id, H5O_t *oh, H5_ih_info_t *bh_info)
|
||||
layout_read = TRUE;
|
||||
|
||||
/* Check for chunked dataset storage */
|
||||
if(layout.type == H5D_CHUNKED && H5D_chunk_is_space_alloc(&layout.storage)) {
|
||||
if(layout.type == H5D_CHUNKED && H5D__chunk_is_space_alloc(&layout.storage)) {
|
||||
/* Check for I/O pipeline message */
|
||||
if((exists = H5O_msg_exists_oh(oh, H5O_PLINE_ID)) < 0)
|
||||
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to read object header")
|
||||
@ -400,7 +395,7 @@ H5O_dset_bh_info(H5F_t *f, hid_t dxpl_id, H5O_t *oh, H5_ih_info_t *bh_info)
|
||||
else
|
||||
HDmemset(&pline, 0, sizeof(pline));
|
||||
|
||||
if(H5D_chunk_bh_info(f, dxpl_id, &layout, &pline, &(bh_info->index_size)) < 0)
|
||||
if(H5D__chunk_bh_info(f, dxpl_id, &layout, &pline, &(bh_info->index_size)) < 0)
|
||||
HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't determine chunked dataset btree info")
|
||||
} /* end if */
|
||||
|
||||
@ -408,7 +403,7 @@ H5O_dset_bh_info(H5F_t *f, hid_t dxpl_id, H5O_t *oh, H5_ih_info_t *bh_info)
|
||||
if((exists = H5O_msg_exists_oh(oh, H5O_EFL_ID)) < 0)
|
||||
HGOTO_ERROR(H5E_OHDR, H5E_NOTFOUND, FAIL, "unable to check for EFL message")
|
||||
|
||||
if(exists && H5D_efl_is_space_alloc(&layout.storage)) {
|
||||
if(exists && H5D__efl_is_space_alloc(&layout.storage)) {
|
||||
/* Start with clean EFL info */
|
||||
HDmemset(&efl, 0, sizeof(efl));
|
||||
|
||||
@ -418,7 +413,7 @@ H5O_dset_bh_info(H5F_t *f, hid_t dxpl_id, H5O_t *oh, H5_ih_info_t *bh_info)
|
||||
efl_read = TRUE;
|
||||
|
||||
/* Get size of local heap for EFL message's file list */
|
||||
if(H5D_efl_bh_info(f, dxpl_id, &efl, &(bh_info->heap_size)) < 0)
|
||||
if(H5D__efl_bh_info(f, dxpl_id, &efl, &(bh_info->heap_size)) < 0)
|
||||
HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't determine EFL heap info")
|
||||
} /* end if */
|
||||
|
||||
@ -432,11 +427,11 @@ done:
|
||||
HDONE_ERROR(H5E_DATASET, H5E_CANTRESET, FAIL, "unable to reset external file list message")
|
||||
|
||||
FUNC_LEAVE_NOAPI(ret_value)
|
||||
} /* end H5O_dset_bh_info() */
|
||||
} /* end H5O__dset_bh_info() */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5O_dset_flush
|
||||
* Function: H5O__dset_flush
|
||||
*
|
||||
* Purpose: To flush any dataset information cached in memory
|
||||
*
|
||||
@ -449,13 +444,13 @@ done:
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
static herr_t
|
||||
H5O_dset_flush(H5G_loc_t *obj_loc, hid_t dxpl_id)
|
||||
H5O__dset_flush(H5G_loc_t *obj_loc, hid_t dxpl_id)
|
||||
{
|
||||
H5D_t *dset; /* Dataset opened */
|
||||
H5O_type_t obj_type; /* Type of object at location */
|
||||
herr_t ret_value = SUCCEED; /* Return value */
|
||||
|
||||
FUNC_ENTER_NOAPI_NOINIT
|
||||
FUNC_ENTER_STATIC
|
||||
|
||||
HDassert(obj_loc);
|
||||
HDassert(obj_loc->oloc);
|
||||
@ -471,11 +466,12 @@ H5O_dset_flush(H5G_loc_t *obj_loc, hid_t dxpl_id)
|
||||
if(NULL == (dset = H5D_open(obj_loc, H5P_DATASET_ACCESS_DEFAULT, dxpl_id)))
|
||||
HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, FAIL, "unable to open dataset")
|
||||
|
||||
if(H5D_flush_real(dset, dxpl_id) < 0)
|
||||
if(H5D__flush_real(dset, dxpl_id) < 0)
|
||||
HDONE_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "unable to flush cached dataset info")
|
||||
|
||||
done:
|
||||
if(dset && H5D_close(dset) < 0)
|
||||
HDONE_ERROR(H5E_DATASET, H5E_CLOSEERROR, NULL, "unable to release dataset")
|
||||
HDONE_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "unable to release dataset")
|
||||
FUNC_LEAVE_NOAPI(ret_value)
|
||||
} /* end H5O_dset_flush() */
|
||||
} /* end H5O__dset_flush() */
|
||||
|
||||
|
140
src/H5Dpkg.h
140
src/H5Dpkg.h
@ -527,135 +527,137 @@ H5_DLLVAR const H5D_chunk_ops_t H5D_COPS_BTREE[1];
|
||||
/* Package Private Prototypes */
|
||||
/******************************/
|
||||
|
||||
H5_DLL H5D_t *H5D_create(H5F_t *file, hid_t type_id, const H5S_t *space,
|
||||
H5_DLL H5D_t *H5D__create(H5F_t *file, hid_t type_id, const H5S_t *space,
|
||||
hid_t dcpl_id, hid_t dapl_id, hid_t dxpl_id);
|
||||
H5_DLL H5D_t *H5D__create_named(const H5G_loc_t *loc, const char *name,
|
||||
hid_t type_id, const H5S_t *space, hid_t lcpl_id, hid_t dcpl_id,
|
||||
hid_t dapl_id, hid_t dxpl_id);
|
||||
H5_DLL herr_t H5D_get_space_status(H5D_t *dset, H5D_space_status_t *allocation,
|
||||
H5_DLL herr_t H5D__get_space_status(H5D_t *dset, H5D_space_status_t *allocation,
|
||||
hid_t dxpl_id);
|
||||
H5_DLL herr_t H5D_alloc_storage(H5D_t *dset, hid_t dxpl_id, H5D_time_alloc_t time_alloc,
|
||||
H5_DLL herr_t H5D__alloc_storage(H5D_t *dset, hid_t dxpl_id, H5D_time_alloc_t time_alloc,
|
||||
hbool_t full_overwrite, hsize_t old_dim[]);
|
||||
H5_DLL hsize_t H5D_get_storage_size(H5D_t *dset, hid_t dxpl_id);
|
||||
H5_DLL haddr_t H5D_get_offset(const H5D_t *dset);
|
||||
H5_DLL herr_t H5D_iterate(void *buf, hid_t type_id, const H5S_t *space,
|
||||
H5_DLL herr_t H5D__get_storage_size(H5D_t *dset, hid_t dxpl_id, hsize_t *storage_size);
|
||||
H5_DLL haddr_t H5D__get_offset(const H5D_t *dset);
|
||||
H5_DLL herr_t H5D__iterate(void *buf, hid_t type_id, const H5S_t *space,
|
||||
H5D_operator_t op, void *operator_data);
|
||||
H5_DLL void * H5D_vlen_get_buf_size_alloc(size_t size, void *info);
|
||||
H5_DLL herr_t H5D_vlen_get_buf_size(void *elem, hid_t type_id, unsigned ndim,
|
||||
H5_DLL void *H5D__vlen_get_buf_size_alloc(size_t size, void *info);
|
||||
H5_DLL herr_t H5D__vlen_get_buf_size(void *elem, hid_t type_id, unsigned ndim,
|
||||
const hsize_t *point, void *op_data);
|
||||
H5_DLL herr_t H5D_check_filters(H5D_t *dataset);
|
||||
H5_DLL herr_t H5D_set_extent(H5D_t *dataset, const hsize_t *size, hid_t dxpl_id);
|
||||
H5_DLL herr_t H5D_get_dxpl_cache(hid_t dxpl_id, H5D_dxpl_cache_t **cache);
|
||||
H5_DLL herr_t H5D_flush_sieve_buf(H5D_t *dataset, hid_t dxpl_id);
|
||||
H5_DLL herr_t H5D_mark(H5D_t *dataset, hid_t dxpl_id, unsigned flags);
|
||||
H5_DLL herr_t H5D_flush_real(H5D_t *dataset, hid_t dxpl_id);
|
||||
H5_DLL herr_t H5D__check_filters(H5D_t *dataset);
|
||||
H5_DLL herr_t H5D__set_extent(H5D_t *dataset, const hsize_t *size, hid_t dxpl_id);
|
||||
H5_DLL herr_t H5D__get_dxpl_cache(hid_t dxpl_id, H5D_dxpl_cache_t **cache);
|
||||
H5_DLL herr_t H5D__flush_sieve_buf(H5D_t *dataset, hid_t dxpl_id);
|
||||
H5_DLL herr_t H5D__mark(H5D_t *dataset, hid_t dxpl_id, unsigned flags);
|
||||
H5_DLL herr_t H5D__flush_real(H5D_t *dataset, hid_t dxpl_id);
|
||||
|
||||
/* Functions that perform direct serial I/O operations */
|
||||
H5_DLL herr_t H5D_select_read(const H5D_io_info_t *io_info,
|
||||
H5_DLL herr_t H5D__select_read(const H5D_io_info_t *io_info,
|
||||
const H5D_type_info_t *type_info,
|
||||
hsize_t nelmts, const H5S_t *file_space, const H5S_t *mem_space);
|
||||
H5_DLL herr_t H5D_select_write(const H5D_io_info_t *io_info,
|
||||
H5_DLL herr_t H5D__select_write(const H5D_io_info_t *io_info,
|
||||
const H5D_type_info_t *type_info,
|
||||
hsize_t nelmts, const H5S_t *file_space, const H5S_t *mem_space);
|
||||
|
||||
/* Functions that perform scatter-gather serial I/O operations */
|
||||
H5_DLL herr_t H5D_scatter_mem(const void *_tscat_buf,
|
||||
H5_DLL herr_t H5D__scatter_mem(const void *_tscat_buf,
|
||||
const H5S_t *space, H5S_sel_iter_t *iter, size_t nelmts,
|
||||
const H5D_dxpl_cache_t *dxpl_cache, void *_buf);
|
||||
H5_DLL herr_t H5D_scatgath_read(const H5D_io_info_t *io_info,
|
||||
H5_DLL herr_t H5D__scatgath_read(const H5D_io_info_t *io_info,
|
||||
const H5D_type_info_t *type_info,
|
||||
hsize_t nelmts, const H5S_t *file_space, const H5S_t *mem_space);
|
||||
H5_DLL herr_t H5D_scatgath_write(const H5D_io_info_t *io_info,
|
||||
H5_DLL herr_t H5D__scatgath_write(const H5D_io_info_t *io_info,
|
||||
const H5D_type_info_t *type_info,
|
||||
hsize_t nelmts, const H5S_t *file_space, const H5S_t *mem_space);
|
||||
|
||||
/* Functions that operate on dataset's layout information */
|
||||
H5_DLL herr_t H5D_layout_set_io_ops(const H5D_t *dataset);
|
||||
H5_DLL size_t H5D_layout_meta_size(const H5F_t *f, const H5O_layout_t *layout,
|
||||
H5_DLL herr_t H5D__layout_set_io_ops(const H5D_t *dataset);
|
||||
H5_DLL size_t H5D__layout_meta_size(const H5F_t *f, const H5O_layout_t *layout,
|
||||
hbool_t include_compact_data);
|
||||
H5_DLL herr_t H5D_layout_oh_create(H5F_t *file, hid_t dxpl_id, H5O_t *oh,
|
||||
H5_DLL herr_t H5D__layout_oh_create(H5F_t *file, hid_t dxpl_id, H5O_t *oh,
|
||||
H5D_t *dset, hid_t dapl_id);
|
||||
H5_DLL herr_t H5D_layout_oh_read(H5D_t *dset, hid_t dxpl_id, hid_t dapl_id,
|
||||
H5_DLL herr_t H5D__layout_oh_read(H5D_t *dset, hid_t dxpl_id, hid_t dapl_id,
|
||||
H5P_genplist_t *plist);
|
||||
H5_DLL herr_t H5D_layout_oh_write(H5D_t *dataset, hid_t dxpl_id, H5O_t *oh,
|
||||
H5_DLL herr_t H5D__layout_oh_write(H5D_t *dataset, hid_t dxpl_id, H5O_t *oh,
|
||||
unsigned update_flags);
|
||||
|
||||
/* Functions that operate on contiguous storage */
|
||||
H5_DLL herr_t H5D_contig_alloc(H5F_t *f, hid_t dxpl_id,
|
||||
H5_DLL herr_t H5D__contig_alloc(H5F_t *f, hid_t dxpl_id,
|
||||
H5O_storage_contig_t *storage);
|
||||
H5_DLL hbool_t H5D_contig_is_space_alloc(const H5O_storage_t *storage);
|
||||
H5_DLL herr_t H5D_contig_fill(H5D_t *dset, hid_t dxpl_id);
|
||||
H5_DLL haddr_t H5D_contig_get_addr(const H5D_t *dset);
|
||||
H5_DLL herr_t H5D_contig_read(H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
|
||||
H5_DLL hbool_t H5D__contig_is_space_alloc(const H5O_storage_t *storage);
|
||||
H5_DLL herr_t H5D__contig_fill(H5D_t *dset, hid_t dxpl_id);
|
||||
H5_DLL herr_t H5D__contig_read(H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
|
||||
hsize_t nelmts, const H5S_t *file_space, const H5S_t *mem_space,
|
||||
H5D_chunk_map_t *fm);
|
||||
H5_DLL herr_t H5D_contig_write(H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
|
||||
H5_DLL herr_t H5D__contig_write(H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
|
||||
hsize_t nelmts, const H5S_t *file_space, const H5S_t *mem_space,
|
||||
H5D_chunk_map_t *fm);
|
||||
H5_DLL herr_t H5D_contig_copy(H5F_t *f_src, const H5O_storage_contig_t *storage_src,
|
||||
H5_DLL herr_t H5D__contig_copy(H5F_t *f_src, const H5O_storage_contig_t *storage_src,
|
||||
H5F_t *f_dst, H5O_storage_contig_t *storage_dst, H5T_t *src_dtype,
|
||||
H5O_copy_t *cpy_info, hid_t dxpl_id);
|
||||
H5_DLL herr_t H5D__contig_delete(H5F_t *f, hid_t dxpl_id,
|
||||
const H5O_storage_t *store);
|
||||
|
||||
|
||||
/* Functions that operate on chunked dataset storage */
|
||||
H5_DLL htri_t H5D_chunk_cacheable(const H5D_io_info_t *io_info, haddr_t caddr,
|
||||
H5_DLL htri_t H5D__chunk_cacheable(const H5D_io_info_t *io_info, haddr_t caddr,
|
||||
hbool_t write_op);
|
||||
H5_DLL herr_t H5D_chunk_cinfo_cache_reset(H5D_chunk_cached_t *last);
|
||||
H5_DLL herr_t H5D_chunk_create(H5D_t *dset /*in,out*/, hid_t dxpl_id);
|
||||
H5_DLL herr_t H5D_chunk_set_info(const H5D_t *dset);
|
||||
H5_DLL herr_t H5D_chunk_init(H5F_t *f, hid_t dxpl_id, const H5D_t *dset,
|
||||
H5_DLL herr_t H5D__chunk_create(H5D_t *dset /*in,out*/, hid_t dxpl_id);
|
||||
H5_DLL herr_t H5D__chunk_set_info(const H5D_t *dset);
|
||||
H5_DLL herr_t H5D__chunk_init(H5F_t *f, hid_t dxpl_id, const H5D_t *dset,
|
||||
hid_t dapl_id);
|
||||
H5_DLL hbool_t H5D_chunk_is_space_alloc(const H5O_storage_t *storage);
|
||||
H5_DLL herr_t H5D_chunk_lookup(const H5D_t *dset, hid_t dxpl_id,
|
||||
H5_DLL hbool_t H5D__chunk_is_space_alloc(const H5O_storage_t *storage);
|
||||
H5_DLL herr_t H5D__chunk_lookup(const H5D_t *dset, hid_t dxpl_id,
|
||||
const hsize_t *chunk_offset, hsize_t chunk_idx, H5D_chunk_ud_t *udata);
|
||||
H5_DLL void *H5D_chunk_lock(const H5D_io_info_t *io_info,
|
||||
H5_DLL void *H5D__chunk_lock(const H5D_io_info_t *io_info,
|
||||
H5D_chunk_ud_t *udata, hbool_t relax);
|
||||
H5_DLL herr_t H5D_chunk_unlock(const H5D_io_info_t *io_info,
|
||||
H5_DLL herr_t H5D__chunk_unlock(const H5D_io_info_t *io_info,
|
||||
const H5D_chunk_ud_t *udata, hbool_t dirty, void *chunk,
|
||||
uint32_t naccessed);
|
||||
H5_DLL herr_t H5D_chunk_allocated(H5D_t *dset, hid_t dxpl_id, hsize_t *nbytes);
|
||||
H5_DLL herr_t H5D_chunk_allocate(H5D_t *dset, hid_t dxpl_id,
|
||||
H5_DLL herr_t H5D__chunk_allocated(H5D_t *dset, hid_t dxpl_id, hsize_t *nbytes);
|
||||
H5_DLL herr_t H5D__chunk_allocate(H5D_t *dset, hid_t dxpl_id,
|
||||
hbool_t full_overwrite, hsize_t old_dim[]);
|
||||
H5_DLL herr_t H5D_chunk_prune_by_extent(H5D_t *dset, hid_t dxpl_id,
|
||||
H5_DLL herr_t H5D__chunk_prune_by_extent(H5D_t *dset, hid_t dxpl_id,
|
||||
const hsize_t *old_dim);
|
||||
#ifdef H5_HAVE_PARALLEL
|
||||
H5_DLL herr_t H5D_chunk_addrmap(const H5D_io_info_t *io_info, haddr_t chunk_addr[]);
|
||||
H5_DLL herr_t H5D__chunk_addrmap(const H5D_io_info_t *io_info, haddr_t chunk_addr[]);
|
||||
#endif /* H5_HAVE_PARALLEL */
|
||||
H5_DLL herr_t H5D_chunk_update_cache(H5D_t *dset, hid_t dxpl_id);
|
||||
H5_DLL herr_t H5D_chunk_copy(H5F_t *f_src, H5O_storage_chunk_t *storage_src,
|
||||
H5_DLL herr_t H5D__chunk_update_cache(H5D_t *dset, hid_t dxpl_id);
|
||||
H5_DLL herr_t H5D__chunk_copy(H5F_t *f_src, H5O_storage_chunk_t *storage_src,
|
||||
H5O_layout_chunk_t *layout_src, H5F_t *f_dst, H5O_storage_chunk_t *storage_dst,
|
||||
const H5S_extent_t *ds_extent_src, const H5T_t *dt_src,
|
||||
const H5O_pline_t *pline_src, H5O_copy_t *cpy_info, hid_t dxpl_id);
|
||||
H5_DLL herr_t H5D_chunk_bh_info(H5F_t *f, hid_t dxpl_id, H5O_layout_t *layout,
|
||||
H5_DLL herr_t H5D__chunk_bh_info(H5F_t *f, hid_t dxpl_id, H5O_layout_t *layout,
|
||||
const H5O_pline_t *pline, hsize_t *btree_size);
|
||||
H5_DLL herr_t H5D_chunk_dump_index(H5D_t *dset, hid_t dxpl_id, FILE *stream);
|
||||
H5_DLL herr_t H5D_chunk_dest(H5F_t *f, hid_t dxpl_id, H5D_t *dset);
|
||||
H5_DLL herr_t H5D__chunk_dump_index(H5D_t *dset, hid_t dxpl_id, FILE *stream);
|
||||
H5_DLL herr_t H5D__chunk_dest(H5F_t *f, hid_t dxpl_id, H5D_t *dset);
|
||||
H5_DLL herr_t H5D__chunk_delete(H5F_t *f, hid_t dxpl_id, H5O_t *oh,
|
||||
H5O_storage_t *store);
|
||||
#ifdef H5D_CHUNK_DEBUG
|
||||
H5_DLL herr_t H5D_chunk_stats(const H5D_t *dset, hbool_t headers);
|
||||
H5_DLL herr_t H5D__chunk_stats(const H5D_t *dset, hbool_t headers);
|
||||
#endif /* H5D_CHUNK_DEBUG */
|
||||
|
||||
/* Functions that operate on compact dataset storage */
|
||||
H5_DLL herr_t H5D_compact_fill(H5D_t *dset, hid_t dxpl_id);
|
||||
H5_DLL herr_t H5D_compact_copy(H5F_t *f_src, H5O_storage_compact_t *storage_src,
|
||||
H5_DLL herr_t H5D__compact_fill(H5D_t *dset, hid_t dxpl_id);
|
||||
H5_DLL herr_t H5D__compact_copy(H5F_t *f_src, H5O_storage_compact_t *storage_src,
|
||||
H5F_t *f_dst, H5O_storage_compact_t *storage_dst, H5T_t *src_dtype,
|
||||
H5O_copy_t *cpy_info, hid_t dxpl_id);
|
||||
|
||||
/* Functions that operate on EFL (External File List)*/
|
||||
H5_DLL hbool_t H5D_efl_is_space_alloc(const H5O_storage_t *storage);
|
||||
H5_DLL herr_t H5D_efl_bh_info(H5F_t *f, hid_t dxpl_id, H5O_efl_t *efl,
|
||||
H5_DLL hbool_t H5D__efl_is_space_alloc(const H5O_storage_t *storage);
|
||||
H5_DLL herr_t H5D__efl_bh_info(H5F_t *f, hid_t dxpl_id, H5O_efl_t *efl,
|
||||
hsize_t *heap_size);
|
||||
|
||||
/* Functions that perform fill value operations on datasets */
|
||||
H5_DLL herr_t H5D_fill(const void *fill, const H5T_t *fill_type, void *buf,
|
||||
H5_DLL herr_t H5D__fill(const void *fill, const H5T_t *fill_type, void *buf,
|
||||
const H5T_t *buf_type, const H5S_t *space, hid_t dxpl_id);
|
||||
H5_DLL herr_t H5D_fill_init(H5D_fill_buf_info_t *fb_info, void *caller_fill_buf,
|
||||
H5_DLL herr_t H5D__fill_init(H5D_fill_buf_info_t *fb_info, void *caller_fill_buf,
|
||||
H5MM_allocate_t alloc_func, void *alloc_info,
|
||||
H5MM_free_t free_func, void *free_info,
|
||||
const H5O_fill_t *fill, const H5T_t *dset_type, hid_t dset_type_id,
|
||||
size_t nelmts, size_t min_buf_size, hid_t dxpl_id);
|
||||
H5_DLL herr_t H5D_fill_refill_vl(H5D_fill_buf_info_t *fb_info, size_t nelmts,
|
||||
H5_DLL herr_t H5D__fill_refill_vl(H5D_fill_buf_info_t *fb_info, size_t nelmts,
|
||||
hid_t dxpl_id);
|
||||
H5_DLL herr_t H5D_fill_release(H5D_fill_buf_info_t *fb_info);
|
||||
H5_DLL herr_t H5D_fill_term(H5D_fill_buf_info_t *fb_info);
|
||||
H5_DLL herr_t H5D__fill_term(H5D_fill_buf_info_t *fb_info);
|
||||
|
||||
#ifdef H5_HAVE_PARALLEL
|
||||
|
||||
@ -665,34 +667,34 @@ H5_DLL herr_t H5D_fill_term(H5D_fill_buf_info_t *fb_info);
|
||||
#endif /*H5Dmpio_DEBUG*/
|
||||
#endif/*H5S_DEBUG*/
|
||||
/* MPI-IO function to read, it will select either regular or irregular read */
|
||||
H5_DLL herr_t H5D_mpio_select_read(const H5D_io_info_t *io_info,
|
||||
H5_DLL herr_t H5D__mpio_select_read(const H5D_io_info_t *io_info,
|
||||
const H5D_type_info_t *type_info,
|
||||
hsize_t nelmts, const H5S_t *file_space, const H5S_t *mem_space);
|
||||
|
||||
/* MPI-IO function to write, it will select either regular or irregular read */
|
||||
H5_DLL herr_t H5D_mpio_select_write(const H5D_io_info_t *io_info,
|
||||
H5_DLL herr_t H5D__mpio_select_write(const H5D_io_info_t *io_info,
|
||||
const H5D_type_info_t *type_info,
|
||||
hsize_t nelmts, const H5S_t *file_space, const H5S_t *mem_space);
|
||||
|
||||
/* MPI-IO functions to handle contiguous collective IO */
|
||||
H5_DLL herr_t H5D_contig_collective_read(H5D_io_info_t *io_info,
|
||||
H5_DLL herr_t H5D__contig_collective_read(H5D_io_info_t *io_info,
|
||||
const H5D_type_info_t *type_info, hsize_t nelmts, const H5S_t *file_space,
|
||||
const H5S_t *mem_space, H5D_chunk_map_t *fm);
|
||||
H5_DLL herr_t H5D_contig_collective_write(H5D_io_info_t *io_info,
|
||||
H5_DLL herr_t H5D__contig_collective_write(H5D_io_info_t *io_info,
|
||||
const H5D_type_info_t *type_info, hsize_t nelmts, const H5S_t *file_space,
|
||||
const H5S_t *mem_space, H5D_chunk_map_t *fm);
|
||||
|
||||
/* MPI-IO functions to handle chunked collective IO */
|
||||
H5_DLL herr_t H5D_chunk_collective_read(H5D_io_info_t *io_info,
|
||||
H5_DLL herr_t H5D__chunk_collective_read(H5D_io_info_t *io_info,
|
||||
const H5D_type_info_t *type_info, hsize_t nelmts, const H5S_t *file_space,
|
||||
const H5S_t *mem_space, H5D_chunk_map_t *fm);
|
||||
H5_DLL herr_t H5D_chunk_collective_write(H5D_io_info_t *io_info,
|
||||
H5_DLL herr_t H5D__chunk_collective_write(H5D_io_info_t *io_info,
|
||||
const H5D_type_info_t *type_info, hsize_t nelmts, const H5S_t *file_space,
|
||||
const H5S_t *mem_space, H5D_chunk_map_t *fm);
|
||||
|
||||
/* MPI-IO function to check if a direct I/O transfer is possible between
|
||||
* memory and the file */
|
||||
H5_DLL htri_t H5D_mpio_opt_possible(const H5D_io_info_t *io_info,
|
||||
H5_DLL htri_t H5D__mpio_opt_possible(const H5D_io_info_t *io_info,
|
||||
const H5S_t *file_space, const H5S_t *mem_space,
|
||||
const H5D_type_info_t *type_info, const H5D_chunk_map_t *fm);
|
||||
|
||||
@ -700,9 +702,9 @@ H5_DLL htri_t H5D_mpio_opt_possible(const H5D_io_info_t *io_info,
|
||||
|
||||
/* Testing functions */
|
||||
#ifdef H5D_TESTING
|
||||
H5_DLL herr_t H5D_layout_version_test(hid_t did, unsigned *version);
|
||||
H5_DLL herr_t H5D_layout_contig_size_test(hid_t did, hsize_t *size);
|
||||
H5_DLL herr_t H5D_current_cache_size_test(hid_t did, size_t *nbytes_used, int *nused);
|
||||
H5_DLL herr_t H5D__layout_version_test(hid_t did, unsigned *version);
|
||||
H5_DLL herr_t H5D__layout_contig_size_test(hid_t did, hsize_t *size);
|
||||
H5_DLL herr_t H5D__current_cache_size_test(hid_t did, size_t *nbytes_used, int *nused);
|
||||
#endif /* H5D_TESTING */
|
||||
|
||||
#endif /*_H5Dpkg_H*/
|
||||
|
@ -169,14 +169,8 @@ H5_DLL herr_t H5D_flush(const H5F_t *f, hid_t dxpl_id);
|
||||
H5_DLL herr_t H5D_vlen_reclaim(hid_t type_id, H5S_t *space, hid_t plist_id,
|
||||
void *buf);
|
||||
|
||||
/* Functions that operate on contiguous storage */
|
||||
H5_DLL herr_t H5D_contig_delete(H5F_t *f, hid_t dxpl_id,
|
||||
const H5O_storage_t *store);
|
||||
|
||||
/* Functions that operate on chunked storage */
|
||||
H5_DLL herr_t H5D_chunk_idx_reset(H5O_storage_chunk_t *storage, hbool_t reset_addr);
|
||||
H5_DLL herr_t H5D_chunk_delete(H5F_t *f, hid_t dxpl_id, H5O_t *oh,
|
||||
H5O_storage_t *store);
|
||||
|
||||
/* Functions that operate on indexed storage */
|
||||
H5_DLL herr_t H5D_btree_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE * stream,
|
||||
|
@ -42,19 +42,19 @@
|
||||
/********************/
|
||||
/* Local Prototypes */
|
||||
/********************/
|
||||
static size_t H5D_gather_file(const H5D_io_info_t *io_info,
|
||||
const H5S_t *file_space, H5S_sel_iter_t *file_iter, size_t nelmts,
|
||||
void *buf);
|
||||
static herr_t H5D_scatter_file(const H5D_io_info_t *io_info,
|
||||
static herr_t H5D__scatter_file(const H5D_io_info_t *io_info,
|
||||
const H5S_t *file_space, H5S_sel_iter_t *file_iter, size_t nelmts,
|
||||
const void *buf);
|
||||
static size_t H5D_gather_mem(const void *_buf,
|
||||
static size_t H5D__gather_file(const H5D_io_info_t *io_info,
|
||||
const H5S_t *file_space, H5S_sel_iter_t *file_iter, size_t nelmts,
|
||||
void *buf);
|
||||
static size_t H5D__gather_mem(const void *_buf,
|
||||
const H5S_t *space, H5S_sel_iter_t *iter, size_t nelmts,
|
||||
const H5D_dxpl_cache_t *dxpl_cache, void *_tgath_buf/*out*/);
|
||||
static herr_t H5D_compound_opt_read(size_t nelmts, const H5S_t *mem_space,
|
||||
static herr_t H5D__compound_opt_read(size_t nelmts, const H5S_t *mem_space,
|
||||
H5S_sel_iter_t *iter, const H5D_dxpl_cache_t *dxpl_cache,
|
||||
const H5D_type_info_t *type_info, void *user_buf/*out*/);
|
||||
static herr_t H5D_compound_opt_write(size_t nelmts, const H5D_type_info_t *type_info);
|
||||
static herr_t H5D__compound_opt_write(size_t nelmts, const H5D_type_info_t *type_info);
|
||||
|
||||
|
||||
/*********************/
|
||||
@ -75,7 +75,7 @@ H5FL_SEQ_EXTERN(hsize_t);
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5D_scatter_file
|
||||
* Function: H5D__scatter_file
|
||||
*
|
||||
* Purpose: Scatters dataset elements from the type conversion buffer BUF
|
||||
* to the file F where the data points are arranged according to
|
||||
@ -91,7 +91,7 @@ H5FL_SEQ_EXTERN(hsize_t);
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
static herr_t
|
||||
H5D_scatter_file(const H5D_io_info_t *_io_info,
|
||||
H5D__scatter_file(const H5D_io_info_t *_io_info,
|
||||
const H5S_t *space, H5S_sel_iter_t *iter, size_t nelmts,
|
||||
const void *_buf)
|
||||
{
|
||||
@ -108,7 +108,7 @@ H5D_scatter_file(const H5D_io_info_t *_io_info,
|
||||
size_t nelem; /* Number of elements used in sequences */
|
||||
herr_t ret_value = SUCCEED; /* Return value */
|
||||
|
||||
FUNC_ENTER_NOAPI_NOINIT
|
||||
FUNC_ENTER_STATIC
|
||||
|
||||
/* Check args */
|
||||
HDassert(_io_info);
|
||||
@ -165,11 +165,11 @@ done:
|
||||
off = H5FL_SEQ_FREE(hsize_t, off);
|
||||
|
||||
FUNC_LEAVE_NOAPI(ret_value)
|
||||
} /* H5D_scatter_file() */
|
||||
} /* H5D__scatter_file() */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5D_gather_file
|
||||
* Function: H5D__gather_file
|
||||
*
|
||||
* Purpose: Gathers data points from file F and accumulates them in the
|
||||
* type conversion buffer BUF. The LAYOUT argument describes
|
||||
@ -190,7 +190,7 @@ done:
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
static size_t
|
||||
H5D_gather_file(const H5D_io_info_t *_io_info,
|
||||
H5D__gather_file(const H5D_io_info_t *_io_info,
|
||||
const H5S_t *space, H5S_sel_iter_t *iter, size_t nelmts,
|
||||
void *_buf/*out*/)
|
||||
{
|
||||
@ -207,7 +207,7 @@ H5D_gather_file(const H5D_io_info_t *_io_info,
|
||||
size_t nelem; /* Number of elements used in sequences */
|
||||
size_t ret_value = nelmts; /* Return value */
|
||||
|
||||
FUNC_ENTER_NOAPI_NOINIT
|
||||
FUNC_ENTER_STATIC
|
||||
|
||||
/* Check args */
|
||||
HDassert(_io_info);
|
||||
@ -266,11 +266,11 @@ done:
|
||||
off = H5FL_SEQ_FREE(hsize_t, off);
|
||||
|
||||
FUNC_LEAVE_NOAPI(ret_value)
|
||||
} /* H5D_gather_file() */
|
||||
} /* H5D__gather_file() */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5D_scatter_mem
|
||||
* Function: H5D__scatter_mem
|
||||
*
|
||||
* Purpose: Scatters NELMTS data points from the scatter buffer
|
||||
* TSCAT_BUF to the application buffer BUF. Each element is
|
||||
@ -285,7 +285,7 @@ done:
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
herr_t
|
||||
H5D_scatter_mem (const void *_tscat_buf, const H5S_t *space,
|
||||
H5D__scatter_mem (const void *_tscat_buf, const H5S_t *space,
|
||||
H5S_sel_iter_t *iter, size_t nelmts, const H5D_dxpl_cache_t *dxpl_cache,
|
||||
void *_buf/*out*/)
|
||||
{
|
||||
@ -301,7 +301,7 @@ H5D_scatter_mem (const void *_tscat_buf, const H5S_t *space,
|
||||
size_t nelem; /* Number of elements used in sequences */
|
||||
herr_t ret_value = SUCCEED; /* Number of elements scattered */
|
||||
|
||||
FUNC_ENTER_NOAPI(FAIL)
|
||||
FUNC_ENTER_PACKAGE
|
||||
|
||||
/* Check args */
|
||||
HDassert(tscat_buf);
|
||||
@ -351,11 +351,11 @@ done:
|
||||
off = H5FL_SEQ_FREE(hsize_t, off);
|
||||
|
||||
FUNC_LEAVE_NOAPI(ret_value)
|
||||
} /* H5D_scatter_mem() */
|
||||
} /* H5D__scatter_mem() */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5D_gather_mem
|
||||
* Function: H5D__gather_mem
|
||||
*
|
||||
* Purpose: Gathers dataset elements from application memory BUF and
|
||||
* copies them into the gather buffer TGATH_BUF.
|
||||
@ -372,7 +372,7 @@ done:
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
static size_t
|
||||
H5D_gather_mem(const void *_buf, const H5S_t *space,
|
||||
H5D__gather_mem(const void *_buf, const H5S_t *space,
|
||||
H5S_sel_iter_t *iter, size_t nelmts, const H5D_dxpl_cache_t *dxpl_cache,
|
||||
void *_tgath_buf/*out*/)
|
||||
{
|
||||
@ -388,7 +388,7 @@ H5D_gather_mem(const void *_buf, const H5S_t *space,
|
||||
size_t nelem; /* Number of elements used in sequences */
|
||||
size_t ret_value = nelmts; /* Number of elements gathered */
|
||||
|
||||
FUNC_ENTER_NOAPI_NOINIT
|
||||
FUNC_ENTER_STATIC
|
||||
|
||||
/* Check args */
|
||||
HDassert(buf);
|
||||
@ -438,11 +438,11 @@ done:
|
||||
off = H5FL_SEQ_FREE(hsize_t, off);
|
||||
|
||||
FUNC_LEAVE_NOAPI(ret_value)
|
||||
} /* H5D_gather_mem() */
|
||||
} /* H5D__gather_mem() */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5D_scatgath_read
|
||||
* Function: H5D__scatgath_read
|
||||
*
|
||||
* Purpose: Perform scatter/gather ead from a contiguous [piece of a] dataset.
|
||||
*
|
||||
@ -454,7 +454,7 @@ done:
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
herr_t
|
||||
H5D_scatgath_read(const H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
|
||||
H5D__scatgath_read(const H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
|
||||
hsize_t nelmts, const H5S_t *file_space, const H5S_t *mem_space)
|
||||
{
|
||||
const H5D_dxpl_cache_t *dxpl_cache = io_info->dxpl_cache; /* Local pointer to dataset transfer info */
|
||||
@ -469,7 +469,7 @@ H5D_scatgath_read(const H5D_io_info_t *io_info, const H5D_type_info_t *type_info
|
||||
size_t smine_nelmts; /*elements per strip */
|
||||
herr_t ret_value = SUCCEED; /*return value */
|
||||
|
||||
FUNC_ENTER_NOAPI_NOINIT
|
||||
FUNC_ENTER_PACKAGE
|
||||
|
||||
/* Sanity check */
|
||||
HDassert(io_info);
|
||||
@ -510,7 +510,7 @@ H5D_scatgath_read(const H5D_io_info_t *io_info, const H5D_type_info_t *type_info
|
||||
/*
|
||||
* Gather data
|
||||
*/
|
||||
n = H5D_gather_file(io_info, file_space, &file_iter, smine_nelmts,
|
||||
n = H5D__gather_file(io_info, file_space, &file_iter, smine_nelmts,
|
||||
type_info->tconv_buf/*out*/);
|
||||
if(n != smine_nelmts)
|
||||
HGOTO_ERROR(H5E_IO, H5E_READERROR, FAIL, "file gather failed")
|
||||
@ -520,13 +520,13 @@ H5D_scatgath_read(const H5D_io_info_t *io_info, const H5D_type_info_t *type_info
|
||||
* bypass the rest of steps.
|
||||
*/
|
||||
if(type_info->cmpd_subset && H5T_SUBSET_FALSE != type_info->cmpd_subset->subset) {
|
||||
if(H5D_compound_opt_read(smine_nelmts, mem_space, &mem_iter, dxpl_cache,
|
||||
if(H5D__compound_opt_read(smine_nelmts, mem_space, &mem_iter, dxpl_cache,
|
||||
type_info, buf /*out*/) < 0)
|
||||
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "datatype conversion failed")
|
||||
} /* end if */
|
||||
else {
|
||||
if(H5T_BKG_YES == type_info->need_bkg) {
|
||||
n = H5D_gather_mem(buf, mem_space, &bkg_iter, smine_nelmts,
|
||||
n = H5D__gather_mem(buf, mem_space, &bkg_iter, smine_nelmts,
|
||||
dxpl_cache, type_info->bkg_buf/*out*/);
|
||||
if(n != smine_nelmts)
|
||||
HGOTO_ERROR(H5E_IO, H5E_READERROR, FAIL, "mem gather failed")
|
||||
@ -548,7 +548,7 @@ H5D_scatgath_read(const H5D_io_info_t *io_info, const H5D_type_info_t *type_info
|
||||
/*
|
||||
* Scatter the data into memory.
|
||||
*/
|
||||
if(H5D_scatter_mem(type_info->tconv_buf, mem_space, &mem_iter,
|
||||
if(H5D__scatter_mem(type_info->tconv_buf, mem_space, &mem_iter,
|
||||
smine_nelmts, dxpl_cache, buf/*out*/) < 0)
|
||||
HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "scatter failed")
|
||||
} /* end else */
|
||||
@ -570,11 +570,11 @@ done:
|
||||
} /* end if */
|
||||
|
||||
FUNC_LEAVE_NOAPI(ret_value)
|
||||
} /* end H5D_scatgath_read() */
|
||||
} /* end H5D__scatgath_read() */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5D_scatgath_write
|
||||
* Function: H5D__scatgath_write
|
||||
*
|
||||
* Purpose: Perform scatter/gather write to a contiguous [piece of a] dataset.
|
||||
*
|
||||
@ -586,7 +586,7 @@ done:
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
herr_t
|
||||
H5D_scatgath_write(const H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
|
||||
H5D__scatgath_write(const H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
|
||||
hsize_t nelmts, const H5S_t *file_space, const H5S_t *mem_space)
|
||||
{
|
||||
const H5D_dxpl_cache_t *dxpl_cache = io_info->dxpl_cache; /* Local pointer to dataset transfer info */
|
||||
@ -601,7 +601,7 @@ H5D_scatgath_write(const H5D_io_info_t *io_info, const H5D_type_info_t *type_inf
|
||||
size_t smine_nelmts; /*elements per strip */
|
||||
herr_t ret_value = SUCCEED; /*return value */
|
||||
|
||||
FUNC_ENTER_NOAPI_NOINIT
|
||||
FUNC_ENTER_PACKAGE
|
||||
|
||||
/* Sanity check */
|
||||
HDassert(io_info);
|
||||
@ -638,7 +638,7 @@ H5D_scatgath_write(const H5D_io_info_t *io_info, const H5D_type_info_t *type_inf
|
||||
* buffer. Also gather data from the file into the background buffer
|
||||
* if necessary.
|
||||
*/
|
||||
n = H5D_gather_mem(buf, mem_space, &mem_iter, smine_nelmts,
|
||||
n = H5D__gather_mem(buf, mem_space, &mem_iter, smine_nelmts,
|
||||
dxpl_cache, type_info->tconv_buf/*out*/);
|
||||
if(n != smine_nelmts)
|
||||
HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "mem gather failed")
|
||||
@ -650,13 +650,13 @@ H5D_scatgath_write(const H5D_io_info_t *io_info, const H5D_type_info_t *type_inf
|
||||
* function H5T_conv_struct_opt to protect the background data.
|
||||
*/
|
||||
if(type_info->cmpd_subset && H5T_SUBSET_DST == type_info->cmpd_subset->subset
|
||||
&& type_info->dst_type_size == type_info->cmpd_subset->copy_size) {
|
||||
if(H5D_compound_opt_write(smine_nelmts, type_info) < 0)
|
||||
&& type_info->dst_type_size == type_info->cmpd_subset->copy_size) {
|
||||
if(H5D__compound_opt_write(smine_nelmts, type_info) < 0)
|
||||
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "datatype conversion failed")
|
||||
} /* end if */
|
||||
else {
|
||||
if(H5T_BKG_YES == type_info->need_bkg) {
|
||||
n = H5D_gather_file(io_info, file_space, &bkg_iter, smine_nelmts,
|
||||
n = H5D__gather_file(io_info, file_space, &bkg_iter, smine_nelmts,
|
||||
type_info->bkg_buf/*out*/);
|
||||
if(n != smine_nelmts)
|
||||
HGOTO_ERROR(H5E_IO, H5E_READERROR, FAIL, "file gather failed")
|
||||
@ -680,7 +680,7 @@ H5D_scatgath_write(const H5D_io_info_t *io_info, const H5D_type_info_t *type_inf
|
||||
/*
|
||||
* Scatter the data out to the file.
|
||||
*/
|
||||
if(H5D_scatter_file(io_info, file_space, &file_iter, smine_nelmts,
|
||||
if(H5D__scatter_file(io_info, file_space, &file_iter, smine_nelmts,
|
||||
type_info->tconv_buf) < 0)
|
||||
HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "scatter failed")
|
||||
} /* end for */
|
||||
@ -701,11 +701,11 @@ done:
|
||||
} /* end if */
|
||||
|
||||
FUNC_LEAVE_NOAPI(ret_value)
|
||||
} /* end H5D_scatgath_write() */
|
||||
} /* end H5D__scatgath_write() */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5D_compound_opt_read
|
||||
* Function: H5D__compound_opt_read
|
||||
*
|
||||
* Purpose: A special optimization case when the source and
|
||||
* destination members are a subset of each other, and
|
||||
@ -737,7 +737,7 @@ done:
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
static herr_t
|
||||
H5D_compound_opt_read(size_t nelmts, const H5S_t *space,
|
||||
H5D__compound_opt_read(size_t nelmts, const H5S_t *space,
|
||||
H5S_sel_iter_t *iter, const H5D_dxpl_cache_t *dxpl_cache,
|
||||
const H5D_type_info_t *type_info, void *user_buf/*out*/)
|
||||
{
|
||||
@ -750,7 +750,7 @@ H5D_compound_opt_read(size_t nelmts, const H5S_t *space,
|
||||
size_t src_stride, dst_stride, copy_size;
|
||||
herr_t ret_value = SUCCEED; /*return value */
|
||||
|
||||
FUNC_ENTER_NOAPI_NOINIT
|
||||
FUNC_ENTER_STATIC
|
||||
|
||||
/* Check args */
|
||||
HDassert(nelmts > 0);
|
||||
@ -832,11 +832,11 @@ done:
|
||||
off = H5FL_SEQ_FREE(hsize_t, off);
|
||||
|
||||
FUNC_LEAVE_NOAPI(ret_value)
|
||||
} /* end H5D_compound_opt_read() */
|
||||
} /* end H5D__compound_opt_read() */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5D_compound_opt_write
|
||||
* Function: H5D__compound_opt_write
|
||||
*
|
||||
* Purpose: A special optimization case when the source and
|
||||
* destination members are a subset of each other, and
|
||||
@ -869,13 +869,13 @@ done:
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
static herr_t
|
||||
H5D_compound_opt_write(size_t nelmts, const H5D_type_info_t *type_info)
|
||||
H5D__compound_opt_write(size_t nelmts, const H5D_type_info_t *type_info)
|
||||
{
|
||||
uint8_t *xsbuf, *xdbuf; /* Source & destination pointers into dataset buffer */
|
||||
size_t src_stride, dst_stride; /* Strides through source & destination datatypes */
|
||||
size_t i; /* Local index variable */
|
||||
|
||||
FUNC_ENTER_NOAPI_NOINIT_NOERR
|
||||
FUNC_ENTER_STATIC_NOERR
|
||||
|
||||
/* Check args */
|
||||
HDassert(nelmts > 0);
|
||||
@ -897,5 +897,5 @@ H5D_compound_opt_write(size_t nelmts, const H5D_type_info_t *type_info)
|
||||
} /* end for */
|
||||
|
||||
FUNC_LEAVE_NOAPI(SUCCEED)
|
||||
} /* end H5D_compound_opt_write() */
|
||||
} /* end H5D__compound_opt_write() */
|
||||
|
||||
|
@ -49,6 +49,9 @@
|
||||
/* Local Prototypes */
|
||||
/********************/
|
||||
|
||||
static herr_t H5D__select_io(const H5D_io_info_t *io_info, size_t elmt_size,
|
||||
size_t nelmts, const H5S_t *file_space, const H5S_t *mem_space);
|
||||
|
||||
|
||||
/*********************/
|
||||
/* Package Variables */
|
||||
@ -68,7 +71,7 @@ H5FL_SEQ_DEFINE(hsize_t);
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5D_select_io
|
||||
* Function: H5D__select_io
|
||||
*
|
||||
* Purpose: Perform I/O directly from application memory and a file
|
||||
*
|
||||
@ -80,7 +83,7 @@ H5FL_SEQ_DEFINE(hsize_t);
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
static herr_t
|
||||
H5D_select_io(const H5D_io_info_t *io_info, size_t elmt_size,
|
||||
H5D__select_io(const H5D_io_info_t *io_info, size_t elmt_size,
|
||||
size_t nelmts, const H5S_t *file_space, const H5S_t *mem_space)
|
||||
{
|
||||
H5S_sel_iter_t mem_iter; /* Memory selection iteration info */
|
||||
@ -102,7 +105,7 @@ H5D_select_io(const H5D_io_info_t *io_info, size_t elmt_size,
|
||||
ssize_t tmp_file_len; /* Temporary number of bytes in file sequence */
|
||||
herr_t ret_value = SUCCEED; /* Return value */
|
||||
|
||||
FUNC_ENTER_NOAPI(FAIL)
|
||||
FUNC_ENTER_STATIC
|
||||
|
||||
/* Check args */
|
||||
HDassert(io_info);
|
||||
@ -245,11 +248,11 @@ done:
|
||||
mem_off = H5FL_SEQ_FREE(hsize_t, mem_off);
|
||||
|
||||
FUNC_LEAVE_NOAPI(ret_value)
|
||||
} /* end H5D_select_io() */
|
||||
} /* end H5D__select_io() */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5D_select_read
|
||||
* Function: H5D__select_read
|
||||
*
|
||||
* Purpose: Reads directly from file into application memory.
|
||||
*
|
||||
@ -261,26 +264,26 @@ done:
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
herr_t
|
||||
H5D_select_read(const H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
|
||||
H5D__select_read(const H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
|
||||
hsize_t nelmts, const H5S_t *file_space, const H5S_t *mem_space)
|
||||
{
|
||||
herr_t ret_value = SUCCEED; /* Return value */
|
||||
|
||||
FUNC_ENTER_NOAPI(FAIL)
|
||||
FUNC_ENTER_PACKAGE
|
||||
|
||||
/* Call generic selection operation */
|
||||
H5_CHECK_OVERFLOW(nelmts, hsize_t, size_t);
|
||||
if(H5D_select_io(io_info, type_info->src_type_size, (size_t)nelmts,
|
||||
if(H5D__select_io(io_info, type_info->src_type_size, (size_t)nelmts,
|
||||
file_space, mem_space) < 0)
|
||||
HGOTO_ERROR(H5E_DATASPACE, H5E_READERROR, FAIL, "read error")
|
||||
|
||||
done:
|
||||
FUNC_LEAVE_NOAPI(ret_value)
|
||||
} /* end H5D_select_read() */
|
||||
} /* end H5D__select_read() */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5D_select_write
|
||||
* Function: H5D__select_write
|
||||
*
|
||||
* Purpose: Writes directly from application memory into a file
|
||||
*
|
||||
@ -292,20 +295,20 @@ done:
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
herr_t
|
||||
H5D_select_write(const H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
|
||||
H5D__select_write(const H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
|
||||
hsize_t nelmts, const H5S_t *file_space, const H5S_t *mem_space)
|
||||
{
|
||||
herr_t ret_value = SUCCEED; /* Return value */
|
||||
|
||||
FUNC_ENTER_NOAPI(FAIL)
|
||||
FUNC_ENTER_PACKAGE
|
||||
|
||||
/* Call generic selection operation */
|
||||
H5_CHECK_OVERFLOW(nelmts, hsize_t, size_t);
|
||||
if(H5D_select_io(io_info, type_info->dst_type_size, (size_t)nelmts,
|
||||
if(H5D__select_io(io_info, type_info->dst_type_size, (size_t)nelmts,
|
||||
file_space, mem_space) < 0)
|
||||
HGOTO_ERROR(H5E_DATASPACE, H5E_WRITEERROR, FAIL, "write error")
|
||||
|
||||
done:
|
||||
FUNC_LEAVE_NOAPI(ret_value)
|
||||
} /* end H5D_select_write() */
|
||||
} /* end H5D__select_write() */
|
||||
|
||||
|
@ -64,11 +64,11 @@
|
||||
|
||||
/*--------------------------------------------------------------------------
|
||||
NAME
|
||||
H5D_layout_version_test
|
||||
H5D__layout_version_test
|
||||
PURPOSE
|
||||
Determine the storage layout version for a dataset's layout information
|
||||
USAGE
|
||||
herr_t H5D_layout_version_test(did, version)
|
||||
herr_t H5D__layout_version_test(did, version)
|
||||
hid_t did; IN: Dataset to query
|
||||
unsigned *version; OUT: Pointer to location to place version info
|
||||
RETURNS
|
||||
@ -82,12 +82,12 @@
|
||||
REVISION LOG
|
||||
--------------------------------------------------------------------------*/
|
||||
herr_t
|
||||
H5D_layout_version_test(hid_t did, unsigned *version)
|
||||
H5D__layout_version_test(hid_t did, unsigned *version)
|
||||
{
|
||||
H5D_t *dset; /* Pointer to dataset to query */
|
||||
herr_t ret_value = SUCCEED; /* return value */
|
||||
|
||||
FUNC_ENTER_NOAPI(FAIL)
|
||||
FUNC_ENTER_PACKAGE
|
||||
|
||||
/* Check args */
|
||||
if(NULL == (dset = (H5D_t *)H5I_object_verify(did, H5I_DATASET)))
|
||||
@ -98,16 +98,16 @@ H5D_layout_version_test(hid_t did, unsigned *version)
|
||||
|
||||
done:
|
||||
FUNC_LEAVE_NOAPI(ret_value)
|
||||
} /* H5D_layout_version_test() */
|
||||
} /* H5D__layout_version_test() */
|
||||
|
||||
|
||||
/*--------------------------------------------------------------------------
|
||||
NAME
|
||||
H5D_layout_contig_size_test
|
||||
H5D__layout_contig_size_test
|
||||
PURPOSE
|
||||
Determine the size of a contiguous layout for a dataset's layout information
|
||||
USAGE
|
||||
herr_t H5D_layout_contig_size_test(did, size)
|
||||
herr_t H5D__layout_contig_size_test(did, size)
|
||||
hid_t did; IN: Dataset to query
|
||||
hsize_t *size; OUT: Pointer to location to place size info
|
||||
RETURNS
|
||||
@ -121,12 +121,12 @@ done:
|
||||
REVISION LOG
|
||||
--------------------------------------------------------------------------*/
|
||||
herr_t
|
||||
H5D_layout_contig_size_test(hid_t did, hsize_t *size)
|
||||
H5D__layout_contig_size_test(hid_t did, hsize_t *size)
|
||||
{
|
||||
H5D_t *dset; /* Pointer to dataset to query */
|
||||
herr_t ret_value = SUCCEED; /* return value */
|
||||
|
||||
FUNC_ENTER_NOAPI(FAIL)
|
||||
FUNC_ENTER_PACKAGE
|
||||
|
||||
/* Check args */
|
||||
if(NULL == (dset = (H5D_t *)H5I_object_verify(did, H5I_DATASET)))
|
||||
@ -139,16 +139,16 @@ H5D_layout_contig_size_test(hid_t did, hsize_t *size)
|
||||
|
||||
done:
|
||||
FUNC_LEAVE_NOAPI(ret_value)
|
||||
} /* H5D_layout_contig_size_test() */
|
||||
} /* H5D__layout_contig_size_test() */
|
||||
|
||||
|
||||
/*--------------------------------------------------------------------------
|
||||
NAME
|
||||
H5D_current_cache_size_test
|
||||
H5D__current_cache_size_test
|
||||
PURPOSE
|
||||
Determine current the size of the dataset's chunk cache
|
||||
USAGE
|
||||
herr_t H5D_current_cache_size_test(did, size)
|
||||
herr_t H5D__current_cache_size_test(did, size)
|
||||
hid_t did; IN: Dataset to query
|
||||
hsize_t *size; OUT: Pointer to location to place size info
|
||||
RETURNS
|
||||
@ -162,12 +162,12 @@ done:
|
||||
REVISION LOG
|
||||
--------------------------------------------------------------------------*/
|
||||
herr_t
|
||||
H5D_current_cache_size_test(hid_t did, size_t *nbytes_used, int *nused)
|
||||
H5D__current_cache_size_test(hid_t did, size_t *nbytes_used, int *nused)
|
||||
{
|
||||
H5D_t *dset; /* Pointer to dataset to query */
|
||||
herr_t ret_value = SUCCEED; /* return value */
|
||||
|
||||
FUNC_ENTER_NOAPI(FAIL)
|
||||
FUNC_ENTER_PACKAGE
|
||||
|
||||
/* Check args */
|
||||
if(NULL == (dset = (H5D_t *)H5I_object_verify(did, H5I_DATASET)))
|
||||
@ -185,5 +185,5 @@ H5D_current_cache_size_test(hid_t did, size_t *nbytes_used, int *nused)
|
||||
|
||||
done:
|
||||
FUNC_LEAVE_NOAPI(ret_value)
|
||||
} /* H5D_current_cache_size_test() */
|
||||
} /* H5D__current_cache_size_test() */
|
||||
|
||||
|
@ -84,7 +84,7 @@ static herr_t H5O_dtype_debug(H5F_t *f, hid_t dxpl_id, const void *_mesg,
|
||||
#define H5O_DTYPE_CHECK_VERSION(DT, VERS, MIN_VERS, IOF, CLASS, ERR) \
|
||||
if(((VERS) < (MIN_VERS)) && !(*(IOF) & H5O_DECODEIO_NOCHANGE)) { \
|
||||
(VERS) = (MIN_VERS); \
|
||||
if(H5T_upgrade_version((DT), (VERS)) < 0) \
|
||||
if(H5T__upgrade_version((DT), (VERS)) < 0) \
|
||||
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTSET, FAIL, "can't upgrade " CLASS " encoding version") \
|
||||
*(IOF) |= H5O_DECODEIO_DIRTY; \
|
||||
} /* end if */
|
||||
@ -325,7 +325,7 @@ H5O_dtype_decode_helper(H5F_t *f, unsigned *ioflags/*in,out*/, const uint8_t **p
|
||||
} /* end if */
|
||||
|
||||
/* Allocate space for the field's datatype */
|
||||
if(NULL == (temp_type = H5T_alloc()))
|
||||
if(NULL == (temp_type = H5T__alloc()))
|
||||
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed")
|
||||
|
||||
/* Decode the field's datatype information */
|
||||
@ -349,7 +349,7 @@ H5O_dtype_decode_helper(H5F_t *f, unsigned *ioflags/*in,out*/, const uint8_t **p
|
||||
/* Check if this member is an array field */
|
||||
if(ndims > 0) {
|
||||
/* Create the array datatype for the field */
|
||||
if((array_dt = H5T_array_create(temp_type, ndims, dim)) == NULL) {
|
||||
if((array_dt = H5T__array_create(temp_type, ndims, dim)) == NULL) {
|
||||
for(j = 0; j <= i; j++)
|
||||
H5MM_xfree(dt->shared->u.compnd.memb[j].name);
|
||||
H5MM_xfree(dt->shared->u.compnd.memb);
|
||||
@ -409,12 +409,12 @@ H5O_dtype_decode_helper(H5F_t *f, unsigned *ioflags/*in,out*/, const uint8_t **p
|
||||
} /* end for */
|
||||
|
||||
/* Check if the compound type is packed */
|
||||
H5T_update_packed(dt);
|
||||
H5T__update_packed(dt);
|
||||
|
||||
/* Upgrade the compound if requested */
|
||||
if(version < upgrade_to) {
|
||||
version = upgrade_to;
|
||||
if(H5T_upgrade_version(dt, upgrade_to) < 0)
|
||||
if(H5T__upgrade_version(dt, upgrade_to) < 0)
|
||||
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTSET, FAIL, "can't upgrade compound encoding version")
|
||||
/* We won't mark the message dirty since there were no
|
||||
* errors in the file, simply type versions that we will no
|
||||
@ -453,7 +453,7 @@ H5O_dtype_decode_helper(H5F_t *f, unsigned *ioflags/*in,out*/, const uint8_t **p
|
||||
* Enumeration datatypes...
|
||||
*/
|
||||
dt->shared->u.enumer.nmembs = dt->shared->u.enumer.nalloc = flags & 0xffff;
|
||||
if(NULL == (dt->shared->parent = H5T_alloc()))
|
||||
if(NULL == (dt->shared->parent = H5T__alloc()))
|
||||
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed")
|
||||
if(H5O_dtype_decode_helper(f, ioflags, pp, dt->shared->parent) < 0)
|
||||
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTDECODE, FAIL, "unable to decode parent datatype")
|
||||
@ -495,7 +495,7 @@ H5O_dtype_decode_helper(H5F_t *f, unsigned *ioflags/*in,out*/, const uint8_t **p
|
||||
} /* end if */
|
||||
|
||||
/* Decode base type of VL information */
|
||||
if(NULL == (dt->shared->parent = H5T_alloc()))
|
||||
if(NULL == (dt->shared->parent = H5T__alloc()))
|
||||
HGOTO_ERROR(H5E_DATATYPE, H5E_NOSPACE, FAIL, "memory allocation failed")
|
||||
if(H5O_dtype_decode_helper(f, ioflags, pp, dt->shared->parent) < 0)
|
||||
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTDECODE, FAIL, "unable to decode VL parent type")
|
||||
@ -535,7 +535,7 @@ H5O_dtype_decode_helper(H5F_t *f, unsigned *ioflags/*in,out*/, const uint8_t **p
|
||||
*pp += dt->shared->u.array.ndims * 4;
|
||||
|
||||
/* Decode base type of array */
|
||||
if(NULL == (dt->shared->parent = H5T_alloc()))
|
||||
if(NULL == (dt->shared->parent = H5T__alloc()))
|
||||
HGOTO_ERROR(H5E_DATATYPE, H5E_NOSPACE, FAIL, "memory allocation failed")
|
||||
if(H5O_dtype_decode_helper(f, ioflags, pp, dt->shared->parent) < 0)
|
||||
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTDECODE, FAIL, "unable to decode array parent type")
|
||||
@ -1097,7 +1097,7 @@ H5O_dtype_decode(H5F_t *f, hid_t UNUSED dxpl_id, H5O_t UNUSED *open_oh, unsigned
|
||||
HDassert(p);
|
||||
|
||||
/* Allocate datatype message */
|
||||
if(NULL == (dt = H5T_alloc()))
|
||||
if(NULL == (dt = H5T__alloc()))
|
||||
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
|
||||
|
||||
/* Perform actual decode of message */
|
||||
@ -1358,7 +1358,7 @@ H5O_dtype_reset(void *_mesg)
|
||||
FUNC_ENTER_NOAPI_NOINIT_NOERR
|
||||
|
||||
if(dt)
|
||||
H5T_free(dt);
|
||||
H5T__free(dt);
|
||||
|
||||
FUNC_LEAVE_NOAPI(SUCCEED)
|
||||
} /* end H5O_dtype_reset() */
|
||||
|
@ -445,7 +445,7 @@ H5O_layout_size(const H5F_t *f, hbool_t UNUSED disable_shared, const void *_mesg
|
||||
|
||||
/* Compute serialized size */
|
||||
/* (including possibly compact data) */
|
||||
ret_value = H5D_layout_meta_size(f, mesg, TRUE);
|
||||
ret_value = H5D__layout_meta_size(f, mesg, TRUE);
|
||||
|
||||
FUNC_LEAVE_NOAPI(ret_value)
|
||||
} /* end H5O_layout_size() */
|
||||
@ -550,13 +550,13 @@ H5O_layout_delete(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, void *_mesg)
|
||||
|
||||
case H5D_CONTIGUOUS: /* Contiguous block on disk */
|
||||
/* Free the file space for the raw data */
|
||||
if(H5D_contig_delete(f, dxpl_id, &mesg->storage) < 0)
|
||||
if(H5D__contig_delete(f, dxpl_id, &mesg->storage) < 0)
|
||||
HGOTO_ERROR(H5E_OHDR, H5E_CANTFREE, FAIL, "unable to free raw data")
|
||||
break;
|
||||
|
||||
case H5D_CHUNKED: /* Chunked blocks on disk */
|
||||
/* Free the file space for the index & chunk raw data */
|
||||
if(H5D_chunk_delete(f, dxpl_id, open_oh, &mesg->storage) < 0)
|
||||
if(H5D__chunk_delete(f, dxpl_id, open_oh, &mesg->storage) < 0)
|
||||
HGOTO_ERROR(H5E_OHDR, H5E_CANTFREE, FAIL, "unable to free raw data")
|
||||
break;
|
||||
|
||||
@ -615,7 +615,7 @@ H5O_layout_copy_file(H5F_t *file_src, void *mesg_src, H5F_t *file_dst,
|
||||
case H5D_COMPACT:
|
||||
if(layout_src->storage.u.compact.buf) {
|
||||
/* copy compact raw data */
|
||||
if(H5D_compact_copy(file_src, &layout_src->storage.u.compact, file_dst, &layout_dst->storage.u.compact, udata->src_dtype, cpy_info, dxpl_id) < 0)
|
||||
if(H5D__compact_copy(file_src, &layout_src->storage.u.compact, file_dst, &layout_dst->storage.u.compact, udata->src_dtype, cpy_info, dxpl_id) < 0)
|
||||
HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, NULL, "unable to copy chunked storage")
|
||||
copied = TRUE;
|
||||
} /* end if */
|
||||
@ -630,18 +630,18 @@ H5O_layout_copy_file(H5F_t *file_src, void *mesg_src, H5F_t *file_dst,
|
||||
layout_dst->storage.u.contig.size = H5S_extent_nelem(udata->src_space_extent) *
|
||||
H5T_get_size(udata->src_dtype);
|
||||
|
||||
if(H5D_contig_is_space_alloc(&layout_src->storage)) {
|
||||
if(H5D__contig_is_space_alloc(&layout_src->storage)) {
|
||||
/* copy contiguous raw data */
|
||||
if(H5D_contig_copy(file_src, &layout_src->storage.u.contig, file_dst, &layout_dst->storage.u.contig, udata->src_dtype, cpy_info, dxpl_id) < 0)
|
||||
if(H5D__contig_copy(file_src, &layout_src->storage.u.contig, file_dst, &layout_dst->storage.u.contig, udata->src_dtype, cpy_info, dxpl_id) < 0)
|
||||
HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, NULL, "unable to copy contiguous storage")
|
||||
copied = TRUE;
|
||||
} /* end if */
|
||||
break;
|
||||
|
||||
case H5D_CHUNKED:
|
||||
if(H5D_chunk_is_space_alloc(&layout_src->storage)) {
|
||||
if(H5D__chunk_is_space_alloc(&layout_src->storage)) {
|
||||
/* Create chunked layout */
|
||||
if(H5D_chunk_copy(file_src, &layout_src->storage.u.chunk, &layout_src->u.chunk, file_dst, &layout_dst->storage.u.chunk, udata->src_space_extent, udata->src_dtype, udata->common.src_pline, cpy_info, dxpl_id) < 0)
|
||||
if(H5D__chunk_copy(file_src, &layout_src->storage.u.chunk, &layout_src->u.chunk, file_dst, &layout_dst->storage.u.chunk, udata->src_space_extent, udata->src_dtype, udata->common.src_pline, cpy_info, dxpl_id) < 0)
|
||||
HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, NULL, "unable to copy chunked storage")
|
||||
copied = TRUE;
|
||||
} /* end if */
|
||||
|
457
src/H5T.c
457
src/H5T.c
@ -275,6 +275,7 @@ static herr_t H5T_register(H5T_pers_t pers, const char *name, H5T_t *src,
|
||||
static htri_t H5T_compiler_conv(H5T_t *src, H5T_t *dst);
|
||||
static herr_t H5T_encode(H5T_t *obj, unsigned char *buf, size_t *nalloc);
|
||||
static H5T_t *H5T_decode(const unsigned char *buf);
|
||||
static herr_t H5T_set_size(H5T_t *dt, size_t size);
|
||||
|
||||
/* Local macro definitions */
|
||||
#define H5T_ENCODE_VERSION 0
|
||||
@ -478,7 +479,7 @@ static H5T_t *H5T_decode(const unsigned char *buf);
|
||||
|
||||
#define H5T_INIT_TYPE_ALLOC_CREATE(BASE) { \
|
||||
/* Allocate new datatype info */ \
|
||||
if(NULL == (dt = H5T_alloc())) \
|
||||
if(NULL == (dt = H5T__alloc())) \
|
||||
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTALLOC, FAIL, "memory allocation failed") \
|
||||
}
|
||||
|
||||
@ -569,9 +570,9 @@ H5T_init_inf(void)
|
||||
|
||||
/* +Inf */
|
||||
d = (uint8_t *)&H5T_NATIVE_FLOAT_POS_INF_g;
|
||||
H5T_bit_set(d, dst->u.f.sign, (size_t)1, FALSE);
|
||||
H5T_bit_set(d, dst->u.f.epos, dst->u.f.esize, TRUE);
|
||||
H5T_bit_set(d, dst->u.f.mpos, dst->u.f.msize, FALSE);
|
||||
H5T__bit_set(d, dst->u.f.sign, (size_t)1, FALSE);
|
||||
H5T__bit_set(d, dst->u.f.epos, dst->u.f.esize, TRUE);
|
||||
H5T__bit_set(d, dst->u.f.mpos, dst->u.f.msize, FALSE);
|
||||
|
||||
/* Swap the bytes if the machine architecture is big-endian */
|
||||
if (H5T_ORDER_BE == H5T_native_order_g) {
|
||||
@ -585,9 +586,9 @@ H5T_init_inf(void)
|
||||
|
||||
/* -Inf */
|
||||
d = (uint8_t *)&H5T_NATIVE_FLOAT_NEG_INF_g;
|
||||
H5T_bit_set(d, dst->u.f.sign, (size_t)1, TRUE);
|
||||
H5T_bit_set(d, dst->u.f.epos, dst->u.f.esize, TRUE);
|
||||
H5T_bit_set(d, dst->u.f.mpos, dst->u.f.msize, FALSE);
|
||||
H5T__bit_set(d, dst->u.f.sign, (size_t)1, TRUE);
|
||||
H5T__bit_set(d, dst->u.f.epos, dst->u.f.esize, TRUE);
|
||||
H5T__bit_set(d, dst->u.f.mpos, dst->u.f.msize, FALSE);
|
||||
|
||||
/* Swap the bytes if the machine architecture is big-endian */
|
||||
if(H5T_ORDER_BE == H5T_native_order_g) {
|
||||
@ -610,9 +611,9 @@ H5T_init_inf(void)
|
||||
|
||||
/* +Inf */
|
||||
d = (uint8_t *)&H5T_NATIVE_DOUBLE_POS_INF_g;
|
||||
H5T_bit_set(d, dst->u.f.sign, (size_t)1, FALSE);
|
||||
H5T_bit_set(d, dst->u.f.epos, dst->u.f.esize, TRUE);
|
||||
H5T_bit_set(d, dst->u.f.mpos, dst->u.f.msize, FALSE);
|
||||
H5T__bit_set(d, dst->u.f.sign, (size_t)1, FALSE);
|
||||
H5T__bit_set(d, dst->u.f.epos, dst->u.f.esize, TRUE);
|
||||
H5T__bit_set(d, dst->u.f.mpos, dst->u.f.msize, FALSE);
|
||||
|
||||
/* Swap the bytes if the machine architecture is big-endian */
|
||||
if(H5T_ORDER_BE == H5T_native_order_g) {
|
||||
@ -626,9 +627,9 @@ H5T_init_inf(void)
|
||||
|
||||
/* -Inf */
|
||||
d = (uint8_t *)&H5T_NATIVE_DOUBLE_NEG_INF_g;
|
||||
H5T_bit_set(d, dst->u.f.sign, (size_t)1, TRUE);
|
||||
H5T_bit_set(d, dst->u.f.epos, dst->u.f.esize, TRUE);
|
||||
H5T_bit_set(d, dst->u.f.mpos, dst->u.f.msize, FALSE);
|
||||
H5T__bit_set(d, dst->u.f.sign, (size_t)1, TRUE);
|
||||
H5T__bit_set(d, dst->u.f.epos, dst->u.f.esize, TRUE);
|
||||
H5T__bit_set(d, dst->u.f.mpos, dst->u.f.msize, FALSE);
|
||||
|
||||
/* Swap the bytes if the machine architecture is big-endian */
|
||||
if(H5T_ORDER_BE == H5T_native_order_g) {
|
||||
@ -1002,32 +1003,32 @@ H5T_init_interface(void)
|
||||
*/
|
||||
fixedpt = native_int;
|
||||
floatpt = native_float;
|
||||
if (NULL == (compound = H5T_create(H5T_COMPOUND, (size_t)1)))
|
||||
if (NULL == (compound = H5T__create(H5T_COMPOUND, (size_t)1)))
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype")
|
||||
if (NULL == (enum_type = H5T_create(H5T_ENUM, (size_t)1)))
|
||||
if (NULL == (enum_type = H5T__create(H5T_ENUM, (size_t)1)))
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype")
|
||||
if (NULL == (vlen = H5T_vlen_create(native_int)))
|
||||
if (NULL == (vlen = H5T__vlen_create(native_int)))
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype")
|
||||
if (NULL == (array = H5T_array_create(native_int, 1, dim)))
|
||||
if (NULL == (array = H5T__array_create(native_int, 1, dim)))
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype")
|
||||
status = 0;
|
||||
|
||||
status |= H5T_register(H5T_PERS_SOFT, "i_i", fixedpt, fixedpt, H5T_conv_i_i, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_SOFT, "i_f", fixedpt, floatpt, H5T_conv_i_f, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_SOFT, "f_f", floatpt, floatpt, H5T_conv_f_f, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_SOFT, "f_i", floatpt, fixedpt, H5T_conv_f_i, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_SOFT, "s_s", string, string, H5T_conv_s_s, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_SOFT, "b_b", bitfield, bitfield, H5T_conv_b_b, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_SOFT, "ibo", fixedpt, fixedpt, H5T_conv_order, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_SOFT, "ibo(opt)", fixedpt, fixedpt, H5T_conv_order_opt, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_SOFT, "fbo", floatpt, floatpt, H5T_conv_order, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_SOFT, "fbo(opt)", floatpt, floatpt, H5T_conv_order_opt, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_SOFT, "struct(no-opt)", compound, compound, H5T_conv_struct, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_SOFT, "struct(opt)", compound, compound, H5T_conv_struct_opt, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_SOFT, "enum", enum_type, enum_type, H5T_conv_enum, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_SOFT, "vlen", vlen, vlen, H5T_conv_vlen, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_SOFT, "array", array, array, H5T_conv_array, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_SOFT, "objref", objref, objref, H5T_conv_order_opt, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_SOFT, "i_i", fixedpt, fixedpt, H5T__conv_i_i, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_SOFT, "i_f", fixedpt, floatpt, H5T__conv_i_f, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_SOFT, "f_f", floatpt, floatpt, H5T__conv_f_f, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_SOFT, "f_i", floatpt, fixedpt, H5T__conv_f_i, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_SOFT, "s_s", string, string, H5T__conv_s_s, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_SOFT, "b_b", bitfield, bitfield, H5T__conv_b_b, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_SOFT, "ibo", fixedpt, fixedpt, H5T__conv_order, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_SOFT, "ibo(opt)", fixedpt, fixedpt, H5T__conv_order_opt, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_SOFT, "fbo", floatpt, floatpt, H5T__conv_order, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_SOFT, "fbo(opt)", floatpt, floatpt, H5T__conv_order_opt, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_SOFT, "struct(no-opt)", compound, compound, H5T__conv_struct, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_SOFT, "struct(opt)", compound, compound, H5T__conv_struct_opt, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_SOFT, "enum", enum_type, enum_type, H5T__conv_enum, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_SOFT, "vlen", vlen, vlen, H5T__conv_vlen, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_SOFT, "array", array, array, H5T__conv_array, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_SOFT, "objref", objref, objref, H5T__conv_order_opt, H5AC_dxpl_id, FALSE);
|
||||
|
||||
/*
|
||||
* Native conversions should be listed last since we can use hardware to
|
||||
@ -1039,263 +1040,263 @@ H5T_init_interface(void)
|
||||
|
||||
/* floating point */
|
||||
#if H5T_CONV_INTERNAL_FP_FP
|
||||
status |= H5T_register(H5T_PERS_HARD, "flt_dbl", native_float, native_double, H5T_conv_float_double, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "dbl_flt", native_double, native_float, H5T_conv_double_float, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "flt_dbl", native_float, native_double, H5T__conv_float_double, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "dbl_flt", native_double, native_float, H5T__conv_double_float, H5AC_dxpl_id, FALSE);
|
||||
#endif /*H5T_CONV_INTERNAL_FP_FP*/
|
||||
#if H5T_CONV_INTERNAL_FP_LDOUBLE
|
||||
status |= H5T_register(H5T_PERS_HARD, "flt_ldbl", native_float, native_ldouble, H5T_conv_float_ldouble, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "dbl_ldbl", native_double, native_ldouble, H5T_conv_double_ldouble, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "ldbl_flt", native_ldouble, native_float, H5T_conv_ldouble_float, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "ldbl_dbl", native_ldouble, native_double, H5T_conv_ldouble_double, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "flt_ldbl", native_float, native_ldouble, H5T__conv_float_ldouble, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "dbl_ldbl", native_double, native_ldouble, H5T__conv_double_ldouble, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "ldbl_flt", native_ldouble, native_float, H5T__conv_ldouble_float, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "ldbl_dbl", native_ldouble, native_double, H5T__conv_ldouble_double, H5AC_dxpl_id, FALSE);
|
||||
#endif /*H5T_CONV_INTERNAL_FP_LDOUBLE*/
|
||||
|
||||
/* from long long */
|
||||
status |= H5T_register(H5T_PERS_HARD, "llong_ullong", native_llong, native_ullong, H5T_conv_llong_ullong, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "ullong_llong", native_ullong, native_llong, H5T_conv_ullong_llong, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "llong_long", native_llong, native_long, H5T_conv_llong_long, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "llong_ulong", native_llong, native_ulong, H5T_conv_llong_ulong, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "ullong_long", native_ullong, native_long, H5T_conv_ullong_long, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "ullong_ulong", native_ullong, native_ulong, H5T_conv_ullong_ulong, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "llong_short", native_llong, native_short, H5T_conv_llong_short, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "llong_ushort", native_llong, native_ushort, H5T_conv_llong_ushort, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "ullong_short", native_ullong, native_short, H5T_conv_ullong_short, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "ullong_ushort", native_ullong, native_ushort, H5T_conv_ullong_ushort, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "llong_int", native_llong, native_int, H5T_conv_llong_int, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "llong_uint", native_llong, native_uint, H5T_conv_llong_uint, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "ullong_int", native_ullong, native_int, H5T_conv_ullong_int, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "ullong_uint", native_ullong, native_uint, H5T_conv_ullong_uint, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "llong_schar", native_llong, native_schar, H5T_conv_llong_schar, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "llong_uchar", native_llong, native_uchar, H5T_conv_llong_uchar, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "ullong_schar", native_ullong, native_schar, H5T_conv_ullong_schar, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "ullong_uchar", native_ullong, native_uchar, H5T_conv_ullong_uchar, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "llong_ullong", native_llong, native_ullong, H5T__conv_llong_ullong, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "ullong_llong", native_ullong, native_llong, H5T__conv_ullong_llong, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "llong_long", native_llong, native_long, H5T__conv_llong_long, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "llong_ulong", native_llong, native_ulong, H5T__conv_llong_ulong, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "ullong_long", native_ullong, native_long, H5T__conv_ullong_long, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "ullong_ulong", native_ullong, native_ulong, H5T__conv_ullong_ulong, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "llong_short", native_llong, native_short, H5T__conv_llong_short, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "llong_ushort", native_llong, native_ushort, H5T__conv_llong_ushort, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "ullong_short", native_ullong, native_short, H5T__conv_ullong_short, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "ullong_ushort", native_ullong, native_ushort, H5T__conv_ullong_ushort, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "llong_int", native_llong, native_int, H5T__conv_llong_int, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "llong_uint", native_llong, native_uint, H5T__conv_llong_uint, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "ullong_int", native_ullong, native_int, H5T__conv_ullong_int, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "ullong_uint", native_ullong, native_uint, H5T__conv_ullong_uint, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "llong_schar", native_llong, native_schar, H5T__conv_llong_schar, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "llong_uchar", native_llong, native_uchar, H5T__conv_llong_uchar, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "ullong_schar", native_ullong, native_schar, H5T__conv_ullong_schar, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "ullong_uchar", native_ullong, native_uchar, H5T__conv_ullong_uchar, H5AC_dxpl_id, FALSE);
|
||||
|
||||
/* From long */
|
||||
status |= H5T_register(H5T_PERS_HARD, "long_llong", native_long, native_llong, H5T_conv_long_llong, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "long_ullong", native_long, native_ullong, H5T_conv_long_ullong, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "ulong_llong", native_ulong, native_llong, H5T_conv_ulong_llong, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "ulong_ullong", native_ulong, native_ullong, H5T_conv_ulong_ullong, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "long_ulong", native_long, native_ulong, H5T_conv_long_ulong, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "ulong_long", native_ulong, native_long, H5T_conv_ulong_long, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "long_short", native_long, native_short, H5T_conv_long_short, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "long_ushort", native_long, native_ushort, H5T_conv_long_ushort, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "ulong_short", native_ulong, native_short, H5T_conv_ulong_short, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "ulong_ushort", native_ulong, native_ushort, H5T_conv_ulong_ushort, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "long_int", native_long, native_int, H5T_conv_long_int, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "long_uint", native_long, native_uint, H5T_conv_long_uint, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "ulong_int", native_ulong, native_int, H5T_conv_ulong_int, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "ulong_uint", native_ulong, native_uint, H5T_conv_ulong_uint, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "long_schar", native_long, native_schar, H5T_conv_long_schar, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "long_uchar", native_long, native_uchar, H5T_conv_long_uchar, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "ulong_schar", native_ulong, native_schar, H5T_conv_ulong_schar, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "ulong_uchar", native_ulong, native_uchar, H5T_conv_ulong_uchar, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "long_llong", native_long, native_llong, H5T__conv_long_llong, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "long_ullong", native_long, native_ullong, H5T__conv_long_ullong, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "ulong_llong", native_ulong, native_llong, H5T__conv_ulong_llong, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "ulong_ullong", native_ulong, native_ullong, H5T__conv_ulong_ullong, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "long_ulong", native_long, native_ulong, H5T__conv_long_ulong, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "ulong_long", native_ulong, native_long, H5T__conv_ulong_long, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "long_short", native_long, native_short, H5T__conv_long_short, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "long_ushort", native_long, native_ushort, H5T__conv_long_ushort, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "ulong_short", native_ulong, native_short, H5T__conv_ulong_short, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "ulong_ushort", native_ulong, native_ushort, H5T__conv_ulong_ushort, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "long_int", native_long, native_int, H5T__conv_long_int, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "long_uint", native_long, native_uint, H5T__conv_long_uint, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "ulong_int", native_ulong, native_int, H5T__conv_ulong_int, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "ulong_uint", native_ulong, native_uint, H5T__conv_ulong_uint, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "long_schar", native_long, native_schar, H5T__conv_long_schar, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "long_uchar", native_long, native_uchar, H5T__conv_long_uchar, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "ulong_schar", native_ulong, native_schar, H5T__conv_ulong_schar, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "ulong_uchar", native_ulong, native_uchar, H5T__conv_ulong_uchar, H5AC_dxpl_id, FALSE);
|
||||
|
||||
/* From short */
|
||||
status |= H5T_register(H5T_PERS_HARD, "short_llong", native_short, native_llong, H5T_conv_short_llong, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "short_ullong", native_short, native_ullong, H5T_conv_short_ullong, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "ushort_llong", native_ushort, native_llong, H5T_conv_ushort_llong, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "ushort_ullong", native_ushort, native_ullong, H5T_conv_ushort_ullong, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "short_long", native_short, native_long, H5T_conv_short_long, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "short_ulong", native_short, native_ulong, H5T_conv_short_ulong, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "ushort_long", native_ushort, native_long, H5T_conv_ushort_long, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "ushort_ulong", native_ushort, native_ulong, H5T_conv_ushort_ulong, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "short_ushort", native_short, native_ushort, H5T_conv_short_ushort, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "ushort_short", native_ushort, native_short, H5T_conv_ushort_short, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "short_int", native_short, native_int, H5T_conv_short_int, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "short_uint", native_short, native_uint, H5T_conv_short_uint, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "ushort_int", native_ushort, native_int, H5T_conv_ushort_int, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "ushort_uint", native_ushort, native_uint, H5T_conv_ushort_uint, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "short_schar", native_short, native_schar, H5T_conv_short_schar, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "short_uchar", native_short, native_uchar, H5T_conv_short_uchar, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "ushort_schar", native_ushort, native_schar, H5T_conv_ushort_schar, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "ushort_uchar", native_ushort, native_uchar, H5T_conv_ushort_uchar, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "short_llong", native_short, native_llong, H5T__conv_short_llong, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "short_ullong", native_short, native_ullong, H5T__conv_short_ullong, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "ushort_llong", native_ushort, native_llong, H5T__conv_ushort_llong, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "ushort_ullong", native_ushort, native_ullong, H5T__conv_ushort_ullong, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "short_long", native_short, native_long, H5T__conv_short_long, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "short_ulong", native_short, native_ulong, H5T__conv_short_ulong, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "ushort_long", native_ushort, native_long, H5T__conv_ushort_long, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "ushort_ulong", native_ushort, native_ulong, H5T__conv_ushort_ulong, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "short_ushort", native_short, native_ushort, H5T__conv_short_ushort, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "ushort_short", native_ushort, native_short, H5T__conv_ushort_short, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "short_int", native_short, native_int, H5T__conv_short_int, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "short_uint", native_short, native_uint, H5T__conv_short_uint, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "ushort_int", native_ushort, native_int, H5T__conv_ushort_int, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "ushort_uint", native_ushort, native_uint, H5T__conv_ushort_uint, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "short_schar", native_short, native_schar, H5T__conv_short_schar, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "short_uchar", native_short, native_uchar, H5T__conv_short_uchar, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "ushort_schar", native_ushort, native_schar, H5T__conv_ushort_schar, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "ushort_uchar", native_ushort, native_uchar, H5T__conv_ushort_uchar, H5AC_dxpl_id, FALSE);
|
||||
|
||||
/* From int */
|
||||
status |= H5T_register(H5T_PERS_HARD, "int_llong", native_int, native_llong, H5T_conv_int_llong, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "int_ullong", native_int, native_ullong, H5T_conv_int_ullong, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "uint_llong", native_uint, native_llong, H5T_conv_uint_llong, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "uint_ullong", native_uint, native_ullong, H5T_conv_uint_ullong, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "int_long", native_int, native_long, H5T_conv_int_long, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "int_ulong", native_int, native_ulong, H5T_conv_int_ulong, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "uint_long", native_uint, native_long, H5T_conv_uint_long, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "uint_ulong", native_uint, native_ulong, H5T_conv_uint_ulong, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "int_short", native_int, native_short, H5T_conv_int_short, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "int_ushort", native_int, native_ushort, H5T_conv_int_ushort, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "uint_short", native_uint, native_short, H5T_conv_uint_short, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "uint_ushort", native_uint, native_ushort, H5T_conv_uint_ushort, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "int_uint", native_int, native_uint, H5T_conv_int_uint, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "uint_int", native_uint, native_int, H5T_conv_uint_int, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "int_schar", native_int, native_schar, H5T_conv_int_schar, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "int_uchar", native_int, native_uchar, H5T_conv_int_uchar, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "uint_schar", native_uint, native_schar, H5T_conv_uint_schar, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "uint_uchar", native_uint, native_uchar, H5T_conv_uint_uchar, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "int_llong", native_int, native_llong, H5T__conv_int_llong, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "int_ullong", native_int, native_ullong, H5T__conv_int_ullong, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "uint_llong", native_uint, native_llong, H5T__conv_uint_llong, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "uint_ullong", native_uint, native_ullong, H5T__conv_uint_ullong, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "int_long", native_int, native_long, H5T__conv_int_long, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "int_ulong", native_int, native_ulong, H5T__conv_int_ulong, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "uint_long", native_uint, native_long, H5T__conv_uint_long, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "uint_ulong", native_uint, native_ulong, H5T__conv_uint_ulong, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "int_short", native_int, native_short, H5T__conv_int_short, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "int_ushort", native_int, native_ushort, H5T__conv_int_ushort, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "uint_short", native_uint, native_short, H5T__conv_uint_short, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "uint_ushort", native_uint, native_ushort, H5T__conv_uint_ushort, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "int_uint", native_int, native_uint, H5T__conv_int_uint, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "uint_int", native_uint, native_int, H5T__conv_uint_int, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "int_schar", native_int, native_schar, H5T__conv_int_schar, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "int_uchar", native_int, native_uchar, H5T__conv_int_uchar, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "uint_schar", native_uint, native_schar, H5T__conv_uint_schar, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "uint_uchar", native_uint, native_uchar, H5T__conv_uint_uchar, H5AC_dxpl_id, FALSE);
|
||||
|
||||
/* From char */
|
||||
status |= H5T_register(H5T_PERS_HARD, "schar_llong", native_schar, native_llong, H5T_conv_schar_llong, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "schar_ullong", native_schar, native_ullong, H5T_conv_schar_ullong, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "uchar_llong", native_uchar, native_llong, H5T_conv_uchar_llong, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "uchar_ullong", native_uchar, native_ullong, H5T_conv_uchar_ullong, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "schar_long", native_schar, native_long, H5T_conv_schar_long, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "schar_ulong", native_schar, native_ulong, H5T_conv_schar_ulong, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "uchar_long", native_uchar, native_long, H5T_conv_uchar_long, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "uchar_ulong", native_uchar, native_ulong, H5T_conv_uchar_ulong, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "schar_short", native_schar, native_short, H5T_conv_schar_short, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "schar_ushort", native_schar, native_ushort, H5T_conv_schar_ushort, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "uchar_short", native_uchar, native_short, H5T_conv_uchar_short, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "uchar_ushort", native_uchar, native_ushort, H5T_conv_uchar_ushort, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "schar_int", native_schar, native_int, H5T_conv_schar_int, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "schar_uint", native_schar, native_uint, H5T_conv_schar_uint, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "uchar_int", native_uchar, native_int, H5T_conv_uchar_int, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "uchar_uint", native_uchar, native_uint, H5T_conv_uchar_uint, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "schar_uchar", native_schar, native_uchar, H5T_conv_schar_uchar, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "uchar_schar", native_uchar, native_schar, H5T_conv_uchar_schar, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "schar_llong", native_schar, native_llong, H5T__conv_schar_llong, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "schar_ullong", native_schar, native_ullong, H5T__conv_schar_ullong, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "uchar_llong", native_uchar, native_llong, H5T__conv_uchar_llong, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "uchar_ullong", native_uchar, native_ullong, H5T__conv_uchar_ullong, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "schar_long", native_schar, native_long, H5T__conv_schar_long, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "schar_ulong", native_schar, native_ulong, H5T__conv_schar_ulong, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "uchar_long", native_uchar, native_long, H5T__conv_uchar_long, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "uchar_ulong", native_uchar, native_ulong, H5T__conv_uchar_ulong, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "schar_short", native_schar, native_short, H5T__conv_schar_short, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "schar_ushort", native_schar, native_ushort, H5T__conv_schar_ushort, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "uchar_short", native_uchar, native_short, H5T__conv_uchar_short, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "uchar_ushort", native_uchar, native_ushort, H5T__conv_uchar_ushort, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "schar_int", native_schar, native_int, H5T__conv_schar_int, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "schar_uint", native_schar, native_uint, H5T__conv_schar_uint, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "uchar_int", native_uchar, native_int, H5T__conv_uchar_int, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "uchar_uint", native_uchar, native_uint, H5T__conv_uchar_uint, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "schar_uchar", native_schar, native_uchar, H5T__conv_schar_uchar, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "uchar_schar", native_uchar, native_schar, H5T__conv_uchar_schar, H5AC_dxpl_id, FALSE);
|
||||
|
||||
/* From char to floats */
|
||||
status |= H5T_register(H5T_PERS_HARD, "schar_flt", native_schar, native_float, H5T_conv_schar_float, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "schar_dbl", native_schar, native_double, H5T_conv_schar_double, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "schar_flt", native_schar, native_float, H5T__conv_schar_float, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "schar_dbl", native_schar, native_double, H5T__conv_schar_double, H5AC_dxpl_id, FALSE);
|
||||
#if H5T_CONV_INTERNAL_INTEGER_LDOUBLE
|
||||
status |= H5T_register(H5T_PERS_HARD, "schar_ldbl", native_schar, native_ldouble, H5T_conv_schar_ldouble, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "schar_ldbl", native_schar, native_ldouble, H5T__conv_schar_ldouble, H5AC_dxpl_id, FALSE);
|
||||
#endif /* H5T_CONV_INTERNAL_INTEGER_LDOUBLE */
|
||||
|
||||
/* From unsigned char to floats */
|
||||
status |= H5T_register(H5T_PERS_HARD, "uchar_flt", native_uchar, native_float, H5T_conv_uchar_float, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "uchar_dbl", native_uchar, native_double, H5T_conv_uchar_double, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "uchar_flt", native_uchar, native_float, H5T__conv_uchar_float, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "uchar_dbl", native_uchar, native_double, H5T__conv_uchar_double, H5AC_dxpl_id, FALSE);
|
||||
#if H5T_CONV_INTERNAL_INTEGER_LDOUBLE
|
||||
status |= H5T_register(H5T_PERS_HARD, "uchar_ldbl", native_uchar, native_ldouble, H5T_conv_uchar_ldouble, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "uchar_ldbl", native_uchar, native_ldouble, H5T__conv_uchar_ldouble, H5AC_dxpl_id, FALSE);
|
||||
#endif /* H5T_CONV_INTERNAL_INTEGER_LDOUBLE */
|
||||
|
||||
/* From short to floats */
|
||||
status |= H5T_register(H5T_PERS_HARD, "short_flt", native_short, native_float, H5T_conv_short_float, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "short_dbl", native_short, native_double, H5T_conv_short_double, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "short_flt", native_short, native_float, H5T__conv_short_float, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "short_dbl", native_short, native_double, H5T__conv_short_double, H5AC_dxpl_id, FALSE);
|
||||
#if H5T_CONV_INTERNAL_INTEGER_LDOUBLE
|
||||
status |= H5T_register(H5T_PERS_HARD, "short_ldbl", native_short, native_ldouble, H5T_conv_short_ldouble, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "short_ldbl", native_short, native_ldouble, H5T__conv_short_ldouble, H5AC_dxpl_id, FALSE);
|
||||
#endif /* H5T_CONV_INTERNAL_INTEGER_LDOUBLE */
|
||||
|
||||
/* From unsigned short to floats */
|
||||
status |= H5T_register(H5T_PERS_HARD, "ushort_flt", native_ushort, native_float, H5T_conv_ushort_float, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "ushort_dbl", native_ushort, native_double, H5T_conv_ushort_double, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "ushort_flt", native_ushort, native_float, H5T__conv_ushort_float, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "ushort_dbl", native_ushort, native_double, H5T__conv_ushort_double, H5AC_dxpl_id, FALSE);
|
||||
#if H5T_CONV_INTERNAL_INTEGER_LDOUBLE
|
||||
status |= H5T_register(H5T_PERS_HARD, "ushort_ldbl", native_ushort, native_ldouble, H5T_conv_ushort_ldouble, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "ushort_ldbl", native_ushort, native_ldouble, H5T__conv_ushort_ldouble, H5AC_dxpl_id, FALSE);
|
||||
#endif /* H5T_CONV_INTERNAL_INTEGER_LDOUBLE */
|
||||
|
||||
/* From int to floats */
|
||||
status |= H5T_register(H5T_PERS_HARD, "int_flt", native_int, native_float, H5T_conv_int_float, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "int_dbl", native_int, native_double, H5T_conv_int_double, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "int_flt", native_int, native_float, H5T__conv_int_float, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "int_dbl", native_int, native_double, H5T__conv_int_double, H5AC_dxpl_id, FALSE);
|
||||
#if H5T_CONV_INTERNAL_INTEGER_LDOUBLE
|
||||
status |= H5T_register(H5T_PERS_HARD, "int_ldbl", native_int, native_ldouble, H5T_conv_int_ldouble, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "int_ldbl", native_int, native_ldouble, H5T__conv_int_ldouble, H5AC_dxpl_id, FALSE);
|
||||
#endif /* H5T_CONV_INTERNAL_INTEGER_LDOUBLE */
|
||||
|
||||
/* From unsigned int to floats */
|
||||
status |= H5T_register(H5T_PERS_HARD, "uint_flt", native_uint, native_float, H5T_conv_uint_float, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "uint_dbl", native_uint, native_double, H5T_conv_uint_double, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "uint_flt", native_uint, native_float, H5T__conv_uint_float, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "uint_dbl", native_uint, native_double, H5T__conv_uint_double, H5AC_dxpl_id, FALSE);
|
||||
#if H5T_CONV_INTERNAL_INTEGER_LDOUBLE
|
||||
status |= H5T_register(H5T_PERS_HARD, "uint_ldbl", native_uint, native_ldouble, H5T_conv_uint_ldouble, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "uint_ldbl", native_uint, native_ldouble, H5T__conv_uint_ldouble, H5AC_dxpl_id, FALSE);
|
||||
#endif /* H5T_CONV_INTERNAL_INTEGER_LDOUBLE */
|
||||
|
||||
/* From long to floats */
|
||||
status |= H5T_register(H5T_PERS_HARD, "long_flt", native_long, native_float, H5T_conv_long_float, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "long_dbl", native_long, native_double, H5T_conv_long_double, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "long_flt", native_long, native_float, H5T__conv_long_float, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "long_dbl", native_long, native_double, H5T__conv_long_double, H5AC_dxpl_id, FALSE);
|
||||
#if H5T_CONV_INTERNAL_INTEGER_LDOUBLE
|
||||
status |= H5T_register(H5T_PERS_HARD, "long_ldbl", native_long, native_ldouble, H5T_conv_long_ldouble, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "long_ldbl", native_long, native_ldouble, H5T__conv_long_ldouble, H5AC_dxpl_id, FALSE);
|
||||
#endif /* H5T_CONV_INTERNAL_INTEGER_LDOUBLE */
|
||||
|
||||
/* From unsigned long to floats */
|
||||
#if H5T_CONV_INTERNAL_ULONG_FLT
|
||||
status |= H5T_register(H5T_PERS_HARD, "ulong_flt", native_ulong, native_float, H5T_conv_ulong_float, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "ulong_flt", native_ulong, native_float, H5T__conv_ulong_float, H5AC_dxpl_id, FALSE);
|
||||
#endif /* H5T_CONV_INTERNAL_ULONG_FLT */
|
||||
#if H5T_CONV_INTERNAL_ULONG_DBL
|
||||
status |= H5T_register(H5T_PERS_HARD, "ulong_dbl", native_ulong, native_double, H5T_conv_ulong_double, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "ulong_dbl", native_ulong, native_double, H5T__conv_ulong_double, H5AC_dxpl_id, FALSE);
|
||||
#endif /* H5T_CONV_INTERNAL_ULONG_DBL */
|
||||
#if H5T_CONV_INTERNAL_ULONG_LDOUBLE
|
||||
status |= H5T_register(H5T_PERS_HARD, "ulong_ldbl", native_ulong, native_ldouble, H5T_conv_ulong_ldouble, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "ulong_ldbl", native_ulong, native_ldouble, H5T__conv_ulong_ldouble, H5AC_dxpl_id, FALSE);
|
||||
#endif /* H5T_CONV_INTERNAL_ULONG_LDOUBLE */
|
||||
|
||||
/* From long long to floats */
|
||||
status |= H5T_register(H5T_PERS_HARD, "llong_flt", native_llong, native_float, H5T_conv_llong_float, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "llong_dbl", native_llong, native_double, H5T_conv_llong_double, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "llong_flt", native_llong, native_float, H5T__conv_llong_float, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "llong_dbl", native_llong, native_double, H5T__conv_llong_double, H5AC_dxpl_id, FALSE);
|
||||
#ifdef H5T_CONV_INTERNAL_LLONG_LDOUBLE
|
||||
status |= H5T_register(H5T_PERS_HARD, "llong_ldbl", native_llong, native_ldouble, H5T_conv_llong_ldouble, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "llong_ldbl", native_llong, native_ldouble, H5T__conv_llong_ldouble, H5AC_dxpl_id, FALSE);
|
||||
#endif /* H5T_CONV_INTERNAL_LLONG_LDOUBLE */
|
||||
|
||||
/* From unsigned long long to floats */
|
||||
#if H5T_CONV_INTERNAL_ULLONG_FP
|
||||
status |= H5T_register(H5T_PERS_HARD, "ullong_flt", native_ullong, native_float, H5T_conv_ullong_float, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "ullong_dbl", native_ullong, native_double, H5T_conv_ullong_double, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "ullong_flt", native_ullong, native_float, H5T__conv_ullong_float, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "ullong_dbl", native_ullong, native_double, H5T__conv_ullong_double, H5AC_dxpl_id, FALSE);
|
||||
#endif /* H5T_CONV_INTERNAL_ULLONG_FP */
|
||||
#ifdef H5T_CONV_INTERNAL_ULLONG_LDOUBLE
|
||||
status |= H5T_register(H5T_PERS_HARD, "ullong_ldbl", native_ullong, native_ldouble, H5T_conv_ullong_ldouble, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "ullong_ldbl", native_ullong, native_ldouble, H5T__conv_ullong_ldouble, H5AC_dxpl_id, FALSE);
|
||||
#endif /* H5T_CONV_INTERNAL_ULLONG_LDOUBLE */
|
||||
|
||||
/* From floats to char */
|
||||
status |= H5T_register(H5T_PERS_HARD, "flt_schar", native_float, native_schar, H5T_conv_float_schar, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "dbl_schar", native_double, native_schar, H5T_conv_double_schar, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "flt_schar", native_float, native_schar, H5T__conv_float_schar, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "dbl_schar", native_double, native_schar, H5T__conv_double_schar, H5AC_dxpl_id, FALSE);
|
||||
#if H5T_CONV_INTERNAL_LDOUBLE_INTEGER
|
||||
status |= H5T_register(H5T_PERS_HARD, "ldbl_schar", native_ldouble, native_schar, H5T_conv_ldouble_schar, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "ldbl_schar", native_ldouble, native_schar, H5T__conv_ldouble_schar, H5AC_dxpl_id, FALSE);
|
||||
#endif /* H5T_CONV_INTERNAL_LDOUBLE_INTEGER */
|
||||
|
||||
/* From floats to unsigned char */
|
||||
status |= H5T_register(H5T_PERS_HARD, "flt_uchar", native_float, native_uchar, H5T_conv_float_uchar, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "dbl_uchar", native_double, native_uchar, H5T_conv_double_uchar, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "flt_uchar", native_float, native_uchar, H5T__conv_float_uchar, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "dbl_uchar", native_double, native_uchar, H5T__conv_double_uchar, H5AC_dxpl_id, FALSE);
|
||||
#if H5T_CONV_INTERNAL_LDOUBLE_INTEGER
|
||||
status |= H5T_register(H5T_PERS_HARD, "ldbl_uchar", native_ldouble, native_uchar, H5T_conv_ldouble_uchar, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "ldbl_uchar", native_ldouble, native_uchar, H5T__conv_ldouble_uchar, H5AC_dxpl_id, FALSE);
|
||||
#endif /* H5T_CONV_INTERNAL_LDOUBLE_INTEGER */
|
||||
|
||||
/* From floats to short */
|
||||
status |= H5T_register(H5T_PERS_HARD, "flt_short", native_float, native_short, H5T_conv_float_short, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "dbl_short", native_double, native_short, H5T_conv_double_short, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "flt_short", native_float, native_short, H5T__conv_float_short, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "dbl_short", native_double, native_short, H5T__conv_double_short, H5AC_dxpl_id, FALSE);
|
||||
#if H5T_CONV_INTERNAL_LDOUBLE_INTEGER
|
||||
status |= H5T_register(H5T_PERS_HARD, "ldbl_short", native_ldouble, native_short, H5T_conv_ldouble_short, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "ldbl_short", native_ldouble, native_short, H5T__conv_ldouble_short, H5AC_dxpl_id, FALSE);
|
||||
#endif /* H5T_CONV_INTERNAL_LDOUBLE_INTEGER */
|
||||
|
||||
/* From floats to unsigned short */
|
||||
status |= H5T_register(H5T_PERS_HARD, "flt_ushort", native_float, native_ushort, H5T_conv_float_ushort, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "dbl_ushort", native_double, native_ushort, H5T_conv_double_ushort, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "flt_ushort", native_float, native_ushort, H5T__conv_float_ushort, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "dbl_ushort", native_double, native_ushort, H5T__conv_double_ushort, H5AC_dxpl_id, FALSE);
|
||||
#if H5T_CONV_INTERNAL_LDOUBLE_INTEGER
|
||||
status |= H5T_register(H5T_PERS_HARD, "ldbl_ushort", native_ldouble, native_ushort, H5T_conv_ldouble_ushort, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "ldbl_ushort", native_ldouble, native_ushort, H5T__conv_ldouble_ushort, H5AC_dxpl_id, FALSE);
|
||||
#endif /* H5T_CONV_INTERNAL_LDOUBLE_INTEGER */
|
||||
|
||||
/* From floats to int */
|
||||
status |= H5T_register(H5T_PERS_HARD, "flt_int", native_float, native_int, H5T_conv_float_int, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "dbl_int", native_double, native_int, H5T_conv_double_int, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "flt_int", native_float, native_int, H5T__conv_float_int, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "dbl_int", native_double, native_int, H5T__conv_double_int, H5AC_dxpl_id, FALSE);
|
||||
#if H5T_CONV_INTERNAL_LDOUBLE_INTEGER
|
||||
status |= H5T_register(H5T_PERS_HARD, "ldbl_int", native_ldouble, native_int, H5T_conv_ldouble_int, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "ldbl_int", native_ldouble, native_int, H5T__conv_ldouble_int, H5AC_dxpl_id, FALSE);
|
||||
#endif /* H5T_CONV_INTERNAL_LDOUBLE_INTEGER */
|
||||
|
||||
/* From floats to unsigned int */
|
||||
status |= H5T_register(H5T_PERS_HARD, "flt_uint", native_float, native_uint, H5T_conv_float_uint, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "dbl_uint", native_double, native_uint, H5T_conv_double_uint, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "flt_uint", native_float, native_uint, H5T__conv_float_uint, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "dbl_uint", native_double, native_uint, H5T__conv_double_uint, H5AC_dxpl_id, FALSE);
|
||||
#if H5T_CONV_INTERNAL_LDOUBLE_UINT
|
||||
status |= H5T_register(H5T_PERS_HARD, "ldbl_uint", native_ldouble, native_uint, H5T_conv_ldouble_uint, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "ldbl_uint", native_ldouble, native_uint, H5T__conv_ldouble_uint, H5AC_dxpl_id, FALSE);
|
||||
#endif /* H5T_CONV_INTERNAL_LDOUBLE_UINT */
|
||||
|
||||
status |= H5T_register(H5T_PERS_HARD, "flt_long", native_float, native_long, H5T_conv_float_long, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "dbl_long", native_double, native_long, H5T_conv_double_long, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "flt_long", native_float, native_long, H5T__conv_float_long, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "dbl_long", native_double, native_long, H5T__conv_double_long, H5AC_dxpl_id, FALSE);
|
||||
#if H5T_CONV_INTERNAL_LDOUBLE_INTEGER
|
||||
status |= H5T_register(H5T_PERS_HARD, "ldbl_long", native_ldouble, native_long, H5T_conv_ldouble_long, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "ldbl_long", native_ldouble, native_long, H5T__conv_ldouble_long, H5AC_dxpl_id, FALSE);
|
||||
#endif /* H5T_CONV_INTERNAL_LDOUBLE_INTEGER */
|
||||
|
||||
/* From floats to unsigned long */
|
||||
status |= H5T_register(H5T_PERS_HARD, "flt_ulong", native_float, native_ulong, H5T_conv_float_ulong, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "dbl_ulong", native_double, native_ulong, H5T_conv_double_ulong, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "flt_ulong", native_float, native_ulong, H5T__conv_float_ulong, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "dbl_ulong", native_double, native_ulong, H5T__conv_double_ulong, H5AC_dxpl_id, FALSE);
|
||||
#if H5T_CONV_INTERNAL_LDOUBLE_INTEGER
|
||||
status |= H5T_register(H5T_PERS_HARD, "ldbl_ulong", native_ldouble, native_ulong, H5T_conv_ldouble_ulong, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "ldbl_ulong", native_ldouble, native_ulong, H5T__conv_ldouble_ulong, H5AC_dxpl_id, FALSE);
|
||||
#endif /* H5T_CONV_INTERNAL_LDOUBLE_INTEGER */
|
||||
|
||||
/* From floats to long long */
|
||||
#if H5T_CONV_INTERNAL_FP_LLONG
|
||||
status |= H5T_register(H5T_PERS_HARD, "flt_llong", native_float, native_llong, H5T_conv_float_llong, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "dbl_llong", native_double, native_llong, H5T_conv_double_llong, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "flt_llong", native_float, native_llong, H5T__conv_float_llong, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "dbl_llong", native_double, native_llong, H5T__conv_double_llong, H5AC_dxpl_id, FALSE);
|
||||
#endif /* H5T_CONV_INTERNAL_FP_LLONG */
|
||||
#ifdef H5T_CONV_INTERNAL_LDOUBLE_LLONG
|
||||
status |= H5T_register(H5T_PERS_HARD, "ldbl_llong", native_ldouble, native_llong, H5T_conv_ldouble_llong, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "ldbl_llong", native_ldouble, native_llong, H5T__conv_ldouble_llong, H5AC_dxpl_id, FALSE);
|
||||
#endif /* H5T_CONV_INTERNAL_LDOUBLE_LLONG */
|
||||
|
||||
/* From floats to unsigned long long */
|
||||
#if H5T_CONV_INTERNAL_FP_ULLONG
|
||||
status |= H5T_register(H5T_PERS_HARD, "flt_ullong", native_float, native_ullong, H5T_conv_float_ullong, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "dbl_ullong", native_double, native_ullong, H5T_conv_double_ullong, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "flt_ullong", native_float, native_ullong, H5T__conv_float_ullong, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "dbl_ullong", native_double, native_ullong, H5T__conv_double_ullong, H5AC_dxpl_id, FALSE);
|
||||
#endif /* H5T_CONV_INTERNAL_FP_ULLONG */
|
||||
#if H5T_CONV_INTERNAL_LDOUBLE_ULLONG
|
||||
status |= H5T_register(H5T_PERS_HARD, "ldbl_ullong", native_ldouble, native_ullong, H5T_conv_ldouble_ullong, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "ldbl_ullong", native_ldouble, native_ullong, H5T__conv_ldouble_ullong, H5AC_dxpl_id, FALSE);
|
||||
#endif /* H5T_CONV_INTERNAL_LDOUBLE_ULLONG */
|
||||
|
||||
/*
|
||||
@ -1303,7 +1304,7 @@ H5T_init_interface(void)
|
||||
* data types we use are not important as long as the source and
|
||||
* destination are equal.
|
||||
*/
|
||||
status |= H5T_register(H5T_PERS_HARD, "no-op", native_int, native_int, H5T_conv_noop, H5AC_dxpl_id, FALSE);
|
||||
status |= H5T_register(H5T_PERS_HARD, "no-op", native_int, native_int, H5T__conv_noop, H5AC_dxpl_id, FALSE);
|
||||
|
||||
/* Initialize the +/- Infinity values for floating-point types */
|
||||
status |= H5T_init_inf();
|
||||
@ -1416,7 +1417,7 @@ H5T_term_interface(void)
|
||||
path = H5T_g.path[i];
|
||||
HDassert(path);
|
||||
if(path->func) {
|
||||
H5T_print_stats(path, &nprint/*in,out*/);
|
||||
H5T__print_stats(path, &nprint/*in,out*/);
|
||||
path->cdata.command = H5T_CONV_FREE;
|
||||
if((path->func)(FAIL, FAIL, &(path->cdata), (size_t)0,
|
||||
(size_t)0, (size_t)0, NULL, NULL,H5AC_dxpl_id) < 0) {
|
||||
@ -1594,7 +1595,7 @@ H5Tcreate(H5T_class_t type, size_t size)
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "size must be positive")
|
||||
|
||||
/* create the type */
|
||||
if(NULL == (dt = H5T_create(type, size)))
|
||||
if(NULL == (dt = H5T__create(type, size)))
|
||||
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to create type")
|
||||
|
||||
/* Get an ID for the datatype */
|
||||
@ -2371,7 +2372,7 @@ H5T_register(H5T_pers_t pers, const char *name, H5T_t *src, H5T_t *dst,
|
||||
new_path = NULL; /*so we don't free it on error*/
|
||||
|
||||
/* Free old path */
|
||||
H5T_print_stats(old_path, &nprint);
|
||||
H5T__print_stats(old_path, &nprint);
|
||||
old_path->cdata.command = H5T_CONV_FREE;
|
||||
if ((old_path->func)(tmp_sid, tmp_did, &(old_path->cdata),
|
||||
(size_t)0, (size_t)0, (size_t)0, NULL, NULL, dxpl_id)<0) {
|
||||
@ -2543,7 +2544,7 @@ H5T_unregister(H5T_pers_t pers, const char *name, H5T_t *src, H5T_t *dst,
|
||||
--H5T_g.npaths;
|
||||
|
||||
/* Shut down path */
|
||||
H5T_print_stats(path, &nprint);
|
||||
H5T__print_stats(path, &nprint);
|
||||
path->cdata.command = H5T_CONV_FREE;
|
||||
if((path->func)(FAIL, FAIL, &(path->cdata),
|
||||
(size_t)0, (size_t)0, (size_t)0, NULL, NULL, dxpl_id) < 0) {
|
||||
@ -2955,7 +2956,7 @@ done:
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5T_create
|
||||
* Function: H5T__create
|
||||
*
|
||||
* Purpose: Creates a new data type and initializes it to reasonable
|
||||
* values. The new data type is SIZE bytes and an instance of
|
||||
@ -2975,12 +2976,12 @@ done:
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
H5T_t *
|
||||
H5T_create(H5T_class_t type, size_t size)
|
||||
H5T__create(H5T_class_t type, size_t size)
|
||||
{
|
||||
H5T_t *dt = NULL;
|
||||
H5T_t *ret_value = NULL;
|
||||
|
||||
FUNC_ENTER_NOAPI(NULL)
|
||||
FUNC_ENTER_PACKAGE
|
||||
|
||||
switch(type) {
|
||||
case H5T_INTEGER:
|
||||
@ -3008,7 +3009,7 @@ H5T_create(H5T_class_t type, size_t size)
|
||||
|
||||
case H5T_OPAQUE:
|
||||
case H5T_COMPOUND:
|
||||
if(NULL == (dt = H5T_alloc()))
|
||||
if(NULL == (dt = H5T__alloc()))
|
||||
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
|
||||
dt->shared->type = type;
|
||||
|
||||
@ -3039,7 +3040,7 @@ H5T_create(H5T_class_t type, size_t size)
|
||||
subtype = H5T_NATIVE_LLONG_g;
|
||||
else
|
||||
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, NULL, "no applicable native integer type")
|
||||
if(NULL == (dt = H5T_alloc()))
|
||||
if(NULL == (dt = H5T__alloc()))
|
||||
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
|
||||
dt->shared->type = type;
|
||||
if(NULL == (sub_t_obj = (H5T_t *)H5I_object(subtype)))
|
||||
@ -3078,7 +3079,7 @@ done:
|
||||
} /* end if */
|
||||
|
||||
FUNC_LEAVE_NOAPI(ret_value)
|
||||
} /* end H5T_create() */
|
||||
} /* end H5T__create() */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
@ -3420,7 +3421,7 @@ done:
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5T_alloc
|
||||
* Function: H5T__alloc
|
||||
*
|
||||
* Purpose: Allocates a new H5T_t structure, initializing it correctly.
|
||||
*
|
||||
@ -3432,12 +3433,12 @@ done:
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
H5T_t *
|
||||
H5T_alloc(void)
|
||||
H5T__alloc(void)
|
||||
{
|
||||
H5T_t *dt = NULL; /* Pointer to datatype allocated */
|
||||
H5T_t *ret_value; /* Return value */
|
||||
|
||||
FUNC_ENTER_NOAPI(NULL)
|
||||
FUNC_ENTER_PACKAGE
|
||||
|
||||
/* Allocate & initialize datatype wrapper info */
|
||||
if(NULL == (dt = H5FL_CALLOC(H5T_t)))
|
||||
@ -3463,11 +3464,11 @@ done:
|
||||
} /* end if */
|
||||
|
||||
FUNC_LEAVE_NOAPI(ret_value)
|
||||
} /* end H5T_alloc() */
|
||||
} /* end H5T__alloc() */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5T_free
|
||||
* Function: H5T__free
|
||||
*
|
||||
* Purpose: Frees all memory associated with a datatype, but does not
|
||||
* free the H5T_t or H5T_shared_t structures (which should
|
||||
@ -3481,12 +3482,12 @@ done:
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
herr_t
|
||||
H5T_free(H5T_t *dt)
|
||||
H5T__free(H5T_t *dt)
|
||||
{
|
||||
unsigned i;
|
||||
herr_t ret_value = SUCCEED; /* Return value */
|
||||
|
||||
FUNC_ENTER_NOAPI(FAIL)
|
||||
FUNC_ENTER_PACKAGE
|
||||
|
||||
HDassert(dt && dt->shared);
|
||||
|
||||
@ -3550,7 +3551,7 @@ H5T_free(H5T_t *dt)
|
||||
|
||||
done:
|
||||
FUNC_LEAVE_NOAPI(ret_value)
|
||||
} /* end H5T_free() */
|
||||
} /* end H5T__free() */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
@ -3575,7 +3576,7 @@ done:
|
||||
* Added "ID to name" support
|
||||
*
|
||||
* Quincey Koziol, 2003-01-06
|
||||
* Moved "guts" of function to H5T_free()
|
||||
* Moved "guts" of function to H5T__free()
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -3592,7 +3593,7 @@ H5T_close(H5T_t *dt)
|
||||
dt->shared->fo_count--;
|
||||
|
||||
if(dt->shared->state != H5T_STATE_OPEN || dt->shared->fo_count == 0) {
|
||||
if(H5T_free(dt) < 0)
|
||||
if(H5T__free(dt) < 0)
|
||||
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTFREE, FAIL, "unable to free datatype");
|
||||
|
||||
dt->shared = H5FL_FREE(H5T_shared_t, dt->shared);
|
||||
@ -3621,7 +3622,7 @@ H5T_close(H5T_t *dt)
|
||||
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTRELEASE, FAIL, "problem attempting to free location")
|
||||
} /* end if */
|
||||
|
||||
/* Free the group hier. path since we're not calling H5T_free*/
|
||||
/* Free the group hier. path since we're not calling H5T__free*/
|
||||
H5G_name_free(&(dt->path));
|
||||
} /* end else */
|
||||
|
||||
@ -3663,13 +3664,13 @@ done:
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
herr_t
|
||||
static herr_t
|
||||
H5T_set_size(H5T_t *dt, size_t size)
|
||||
{
|
||||
size_t prec, offset;
|
||||
herr_t ret_value=SUCCEED; /* Return value */
|
||||
|
||||
FUNC_ENTER_NOAPI(FAIL)
|
||||
FUNC_ENTER_NOAPI_NOINIT
|
||||
|
||||
/* Check args */
|
||||
assert(dt);
|
||||
@ -3731,7 +3732,7 @@ H5T_set_size(H5T_t *dt, size_t size)
|
||||
}
|
||||
}
|
||||
|
||||
max_size = H5T_get_member_size(dt, max_index);
|
||||
max_size = H5T__get_member_size(dt, max_index);
|
||||
|
||||
if(size<(max_offset+max_size))
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "size shrinking will cut off last member ");
|
||||
@ -3821,7 +3822,7 @@ H5T_set_size(H5T_t *dt, size_t size)
|
||||
|
||||
/* Check if the new compound type is packed */
|
||||
if(dt->shared->type == H5T_COMPOUND)
|
||||
H5T_update_packed(dt);
|
||||
H5T__update_packed(dt);
|
||||
}
|
||||
|
||||
done:
|
||||
@ -4348,9 +4349,9 @@ H5T_path_find(const H5T_t *src, const H5T_t *dst, const char *name,
|
||||
if(NULL == (H5T_g.path[0] = H5FL_CALLOC(H5T_path_t)))
|
||||
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for no-op conversion path")
|
||||
HDstrcpy(H5T_g.path[0]->name, "no-op");
|
||||
H5T_g.path[0]->func = H5T_conv_noop;
|
||||
H5T_g.path[0]->func = H5T__conv_noop;
|
||||
H5T_g.path[0]->cdata.command = H5T_CONV_INIT;
|
||||
if(H5T_conv_noop(FAIL, FAIL, &(H5T_g.path[0]->cdata), (size_t)0, (size_t)0, (size_t)0, NULL, NULL, dxpl_id) < 0) {
|
||||
if(H5T__conv_noop(FAIL, FAIL, &(H5T_g.path[0]->cdata), (size_t)0, (size_t)0, (size_t)0, NULL, NULL, dxpl_id) < 0) {
|
||||
#ifdef H5T_DEBUG
|
||||
if(H5DEBUG(T))
|
||||
fprintf(H5DEBUG(T), "H5T: unable to initialize no-op conversion function (ignored)\n");
|
||||
@ -4506,7 +4507,7 @@ H5T_path_find(const H5T_t *src, const H5T_t *dst, const char *name,
|
||||
/* Replace an existing table entry or add a new entry */
|
||||
if(table && path != table) {
|
||||
HDassert(table == H5T_g.path[md]);
|
||||
H5T_print_stats(table, &nprint/*in,out*/);
|
||||
H5T__print_stats(table, &nprint/*in,out*/);
|
||||
table->cdata.command = H5T_CONV_FREE;
|
||||
if((table->func)(FAIL, FAIL, &(table->cdata), (size_t)0, (size_t)0, (size_t)0, NULL, NULL, dxpl_id) < 0) {
|
||||
#ifdef H5T_DEBUG
|
||||
@ -4635,7 +4636,7 @@ H5T_path_compound_subset(const H5T_path_t *p)
|
||||
HDassert(p);
|
||||
|
||||
if(p->are_compounds)
|
||||
ret_value = H5T_conv_struct_subset(&(p->cdata));
|
||||
ret_value = H5T__conv_struct_subset(&(p->cdata));
|
||||
|
||||
FUNC_LEAVE_NOAPI(ret_value)
|
||||
} /* end H5T_path_compound_subset */
|
||||
@ -5075,7 +5076,7 @@ H5T_set_loc(H5T_t *dt, H5F_t *f, H5T_loc_t loc)
|
||||
|
||||
case H5T_COMPOUND: /* Check each field and recurse on VL, compound and array type */
|
||||
/* Sort the fields based on offsets */
|
||||
H5T_sort_value(dt,NULL);
|
||||
H5T__sort_value(dt, NULL);
|
||||
|
||||
for (i=0,accum_change=0; i<dt->shared->u.compnd.nmembs; i++) {
|
||||
H5T_t *memb_type; /* Member's datatype pointer */
|
||||
@ -5124,7 +5125,7 @@ H5T_set_loc(H5T_t *dt, H5F_t *f, H5T_loc_t loc)
|
||||
} /* end if */
|
||||
|
||||
/* Mark this VL sequence */
|
||||
if((changed=H5T_vlen_set_loc(dt,f,loc))<0)
|
||||
if((changed = H5T__vlen_set_loc(dt, f, loc)) < 0)
|
||||
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "Unable to set VL location");
|
||||
if(changed>0)
|
||||
ret_value=changed;
|
||||
@ -5196,7 +5197,7 @@ done:
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5T_upgrade_version_cb
|
||||
*
|
||||
* Purpose: H5T_visit callback to Upgrade the version of a datatype
|
||||
* Purpose: H5T__visit callback to Upgrade the version of a datatype
|
||||
* (if there's any benefit to doing so)
|
||||
*
|
||||
* Note: The behavior below is tightly coupled with the "better"
|
||||
@ -5243,7 +5244,7 @@ H5T_upgrade_version_cb(H5T_t *dt, void *op_value)
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5T_upgrade_version
|
||||
* Function: H5T__upgrade_version
|
||||
*
|
||||
* Purpose: Upgrade the version of a datatype (if there's any benefit to
|
||||
* doing so) and recursively apply to compound members and/or
|
||||
@ -5257,22 +5258,22 @@ H5T_upgrade_version_cb(H5T_t *dt, void *op_value)
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
herr_t
|
||||
H5T_upgrade_version(H5T_t *dt, unsigned new_version)
|
||||
H5T__upgrade_version(H5T_t *dt, unsigned new_version)
|
||||
{
|
||||
herr_t ret_value = SUCCEED; /* Return value */
|
||||
|
||||
FUNC_ENTER_NOAPI(FAIL)
|
||||
FUNC_ENTER_PACKAGE
|
||||
|
||||
/* Sanity check */
|
||||
HDassert(dt);
|
||||
|
||||
/* Iterate over entire datatype, upgrading the version of components, if it's useful */
|
||||
if(H5T_visit(dt, (H5T_VISIT_SIMPLE | H5T_VISIT_COMPLEX_LAST), H5T_upgrade_version_cb, &new_version) < 0)
|
||||
if(H5T__visit(dt, (H5T_VISIT_SIMPLE | H5T_VISIT_COMPLEX_LAST), H5T_upgrade_version_cb, &new_version) < 0)
|
||||
HGOTO_ERROR(H5E_DATATYPE, H5E_BADITER, FAIL, "iteration to upgrade datatype encoding version failed")
|
||||
|
||||
done:
|
||||
FUNC_LEAVE_NOAPI(ret_value)
|
||||
} /* end H5T_upgrade_version() */
|
||||
} /* end H5T__upgrade_version() */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
@ -5298,7 +5299,7 @@ H5T_set_latest_version(H5T_t *dt)
|
||||
HDassert(dt);
|
||||
|
||||
/* Upgrade the format version for the datatype to the latest */
|
||||
if(H5T_upgrade_version(dt, H5O_DTYPE_VERSION_LATEST) < 0)
|
||||
if(H5T__upgrade_version(dt, H5O_DTYPE_VERSION_LATEST) < 0)
|
||||
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTSET, FAIL, "can't upgrade datatype encoding")
|
||||
|
||||
done:
|
||||
|
@ -142,7 +142,7 @@ H5Tarray_create2(hid_t base_id, unsigned ndims, const hsize_t dim[/* ndims */])
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not an valid base datatype")
|
||||
|
||||
/* Create the array datatype */
|
||||
if(NULL == (dt = H5T_array_create(base, ndims, dim)))
|
||||
if(NULL == (dt = H5T__array_create(base, ndims, dim)))
|
||||
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTREGISTER, FAIL, "unable to create datatype")
|
||||
|
||||
/* Atomize the type */
|
||||
@ -160,7 +160,7 @@ done:
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5T_array_create
|
||||
* Function: H5T__array_create
|
||||
*
|
||||
* Purpose: Internal routine to create a new array data type based on the
|
||||
* specified BASE_TYPE. The type is an array with NDIMS dimensionality
|
||||
@ -177,19 +177,19 @@ done:
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
H5T_t *
|
||||
H5T_array_create(H5T_t *base, unsigned ndims, const hsize_t dim[/* ndims */])
|
||||
H5T__array_create(H5T_t *base, unsigned ndims, const hsize_t dim[/* ndims */])
|
||||
{
|
||||
H5T_t *ret_value; /* new array data type */
|
||||
unsigned u; /* local index variable */
|
||||
|
||||
FUNC_ENTER_NOAPI(NULL)
|
||||
FUNC_ENTER_PACKAGE
|
||||
|
||||
HDassert(base);
|
||||
HDassert(ndims <= H5S_MAX_RANK);
|
||||
HDassert(dim);
|
||||
|
||||
/* Build new type */
|
||||
if(NULL == (ret_value = H5T_alloc()))
|
||||
if(NULL == (ret_value = H5T__alloc()))
|
||||
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
|
||||
ret_value->shared->type = H5T_ARRAY;
|
||||
|
||||
@ -217,7 +217,7 @@ H5T_array_create(H5T_t *base, unsigned ndims, const hsize_t dim[/* ndims */])
|
||||
|
||||
done:
|
||||
FUNC_LEAVE_NOAPI(ret_value)
|
||||
} /* end H5T_array_create */
|
||||
} /* end H5T__array_create */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
@ -249,7 +249,7 @@ H5Tget_array_ndims(hid_t type_id)
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not an array datatype")
|
||||
|
||||
/* Retrieve the number of dimensions */
|
||||
ret_value = H5T_get_array_ndims(dt);
|
||||
ret_value = H5T__get_array_ndims(dt);
|
||||
|
||||
done:
|
||||
FUNC_LEAVE_API(ret_value)
|
||||
@ -257,9 +257,9 @@ done:
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5T_get_array_ndims
|
||||
* Function: H5T__get_array_ndims
|
||||
*
|
||||
* Purpose: Private function for H5T_get_array_ndims. Query the number
|
||||
* Purpose: Private function for H5T__get_array_ndims. Query the number
|
||||
* of dimensions for an array datatype.
|
||||
*
|
||||
* Return: Success: Number of dimensions of the array datatype
|
||||
@ -271,16 +271,16 @@ done:
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
int
|
||||
H5T_get_array_ndims(const H5T_t *dt)
|
||||
H5T__get_array_ndims(const H5T_t *dt)
|
||||
{
|
||||
FUNC_ENTER_NOAPI_NOINIT_NOERR
|
||||
FUNC_ENTER_PACKAGE_NOERR
|
||||
|
||||
HDassert(dt);
|
||||
HDassert(dt->shared->type == H5T_ARRAY);
|
||||
|
||||
/* Retrieve the number of dimensions */
|
||||
FUNC_LEAVE_NOAPI(dt->shared->u.array.ndims)
|
||||
} /* end H5T_get_array_ndims */
|
||||
} /* end H5T__get_array_ndims */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
@ -312,7 +312,7 @@ H5Tget_array_dims2(hid_t type_id, hsize_t dims[])
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not an array datatype")
|
||||
|
||||
/* Retrieve the sizes of the dimensions */
|
||||
if((ret_value = H5T_get_array_dims(dt, dims)) < 0)
|
||||
if((ret_value = H5T__get_array_dims(dt, dims)) < 0)
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "unable to get dimension sizes")
|
||||
done:
|
||||
FUNC_LEAVE_API(ret_value)
|
||||
@ -320,9 +320,9 @@ done:
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5T_get_array_dims
|
||||
* Function: H5T__get_array_dims
|
||||
*
|
||||
* Purpose: Private function for H5T_get_array_dims. Query the sizes
|
||||
* Purpose: Private function for H5T__get_array_dims. Query the sizes
|
||||
* of dimensions for an array datatype.
|
||||
*
|
||||
* Return: Success: Number of dimensions of the array type
|
||||
@ -334,12 +334,12 @@ done:
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
int
|
||||
H5T_get_array_dims(const H5T_t *dt, hsize_t dims[])
|
||||
H5T__get_array_dims(const H5T_t *dt, hsize_t dims[])
|
||||
{
|
||||
unsigned u; /* Local index variable */
|
||||
int ret_value; /* return value */
|
||||
|
||||
FUNC_ENTER_NOAPI(FAIL)
|
||||
FUNC_ENTER_PACKAGE
|
||||
|
||||
HDassert(dt);
|
||||
HDassert(dt->shared->type == H5T_ARRAY);
|
||||
@ -354,7 +354,7 @@ H5T_get_array_dims(const H5T_t *dt, hsize_t dims[])
|
||||
|
||||
done:
|
||||
FUNC_LEAVE_NOAPI(ret_value)
|
||||
} /* end H5T_get_array_dims */
|
||||
} /* end H5T__get_array_dims */
|
||||
|
||||
#ifndef H5_NO_DEPRECATED_SYMBOLS
|
||||
|
||||
@ -401,7 +401,7 @@ H5Tarray_create1(hid_t base_id, int ndims, const hsize_t dim[/* ndims */],
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not an valid base datatype")
|
||||
|
||||
/* Create the array datatype */
|
||||
if(NULL == (dt = H5T_array_create(base, (unsigned)ndims, dim)))
|
||||
if(NULL == (dt = H5T__array_create(base, (unsigned)ndims, dim)))
|
||||
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTREGISTER, FAIL, "unable to create datatype")
|
||||
|
||||
/* Atomize the type */
|
||||
@ -447,7 +447,7 @@ H5Tget_array_dims1(hid_t type_id, hsize_t dims[], int UNUSED perm[])
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not an array datatype")
|
||||
|
||||
/* Retrieve the sizes of the dimensions */
|
||||
if((ret_value = H5T_get_array_dims(dt, dims)) < 0)
|
||||
if((ret_value = H5T__get_array_dims(dt, dims)) < 0)
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "unable to get dimension sizes")
|
||||
|
||||
done:
|
||||
|
110
src/H5Tbit.c
110
src/H5Tbit.c
@ -31,7 +31,7 @@
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5T_bit_copy
|
||||
* Function: H5T__bit_copy
|
||||
*
|
||||
* Purpose: Copies bits from one vector to another.
|
||||
*
|
||||
@ -43,13 +43,15 @@
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
void
|
||||
H5T_bit_copy(uint8_t *dst, size_t dst_offset, const uint8_t *src,
|
||||
H5T__bit_copy(uint8_t *dst, size_t dst_offset, const uint8_t *src,
|
||||
size_t src_offset, size_t size)
|
||||
{
|
||||
size_t shift;
|
||||
size_t mask_lo, mask_hi;
|
||||
size_t s_idx, d_idx;
|
||||
|
||||
FUNC_ENTER_PACKAGE_NOERR
|
||||
|
||||
/*
|
||||
* Normalize the offset to be a byte number and a bit offset within that
|
||||
* byte.
|
||||
@ -155,11 +157,13 @@ H5T_bit_copy(uint8_t *dst, size_t dst_offset, const uint8_t *src,
|
||||
|
||||
size -= nbits;
|
||||
} /* end while */
|
||||
} /* end H5T_bit_copy() */
|
||||
|
||||
FUNC_LEAVE_NOAPI_VOID
|
||||
} /* end H5T__bit_copy() */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5T_bit_shift
|
||||
* Function: H5T__bit_shift
|
||||
*
|
||||
* Purpose: Simulation of hardware shifting. Shifts a bit vector
|
||||
* in a way similar to shifting a variable value, like
|
||||
@ -179,13 +183,13 @@ H5T_bit_copy(uint8_t *dst, size_t dst_offset, const uint8_t *src,
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
herr_t
|
||||
H5T_bit_shift(uint8_t *buf, ssize_t shift_dist, size_t offset, size_t size)
|
||||
H5T__bit_shift(uint8_t *buf, ssize_t shift_dist, size_t offset, size_t size)
|
||||
{
|
||||
uint8_t tmp_buf[512]; /* Temporary buffer */
|
||||
H5WB_t *wb = NULL; /* Wrapped buffer for temporary buffer */
|
||||
herr_t ret_value = SUCCEED; /* Return value */
|
||||
|
||||
FUNC_ENTER_NOAPI(FAIL)
|
||||
FUNC_ENTER_PACKAGE
|
||||
|
||||
/* Sanity check */
|
||||
HDassert(buf);
|
||||
@ -195,7 +199,7 @@ H5T_bit_shift(uint8_t *buf, ssize_t shift_dist, size_t offset, size_t size)
|
||||
size_t abs_shift_dist = (size_t)ABS(shift_dist);
|
||||
|
||||
if(abs_shift_dist >= size)
|
||||
H5T_bit_set(buf, offset, size, 0);
|
||||
H5T__bit_set(buf, offset, size, 0);
|
||||
else {
|
||||
size_t buf_size = (size / 8) + 1; /* Size of shift buffer needed */
|
||||
uint8_t *shift_buf; /* Pointer to shift buffer */
|
||||
@ -211,18 +215,18 @@ H5T_bit_shift(uint8_t *buf, ssize_t shift_dist, size_t offset, size_t size)
|
||||
/* Shift vector by making copies */
|
||||
if(shift_dist > 0) { /* left shift */
|
||||
/* Copy part to be shifted to a temporary buffer */
|
||||
H5T_bit_copy(shift_buf, (size_t)0, buf, offset, size - abs_shift_dist);
|
||||
H5T__bit_copy(shift_buf, (size_t)0, buf, offset, size - abs_shift_dist);
|
||||
|
||||
/* Copy it back to the original buffer */
|
||||
H5T_bit_copy(buf, offset + abs_shift_dist, shift_buf, (size_t)0, size - abs_shift_dist);
|
||||
H5T__bit_copy(buf, offset + abs_shift_dist, shift_buf, (size_t)0, size - abs_shift_dist);
|
||||
|
||||
/* Zero-set the left part*/
|
||||
H5T_bit_set(buf, offset, abs_shift_dist, 0);
|
||||
H5T__bit_set(buf, offset, abs_shift_dist, 0);
|
||||
} /* end if */
|
||||
else { /* right shift */
|
||||
H5T_bit_copy(shift_buf, (size_t)0, buf, offset + abs_shift_dist, size - abs_shift_dist);
|
||||
H5T_bit_copy(buf, offset, shift_buf, (size_t)0, size - abs_shift_dist);
|
||||
H5T_bit_set(buf, offset + size - abs_shift_dist, abs_shift_dist, 0);
|
||||
H5T__bit_copy(shift_buf, (size_t)0, buf, offset + abs_shift_dist, size - abs_shift_dist);
|
||||
H5T__bit_copy(buf, offset, shift_buf, (size_t)0, size - abs_shift_dist);
|
||||
H5T__bit_set(buf, offset + size - abs_shift_dist, abs_shift_dist, 0);
|
||||
} /* end else */
|
||||
} /* end else */
|
||||
} /* end if */
|
||||
@ -233,11 +237,11 @@ done:
|
||||
HDONE_ERROR(H5E_DATATYPE, H5E_CLOSEERROR, FAIL, "can't close wrapped buffer")
|
||||
|
||||
FUNC_LEAVE_NOAPI(ret_value)
|
||||
} /* end H5T_bit_shift() */
|
||||
} /* end H5T__bit_shift() */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5T_bit_get_d
|
||||
* Function: H5T__bit_get_d
|
||||
*
|
||||
* Purpose: Return a small bit sequence as a number. Bit vector starts
|
||||
* at OFFSET and is SIZE bits long.
|
||||
@ -253,17 +257,17 @@ done:
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
uint64_t
|
||||
H5T_bit_get_d(uint8_t *buf, size_t offset, size_t size)
|
||||
H5T__bit_get_d(uint8_t *buf, size_t offset, size_t size)
|
||||
{
|
||||
uint64_t val = 0;
|
||||
size_t i, hs;
|
||||
uint64_t ret_value; /* Return value */
|
||||
|
||||
FUNC_ENTER_NOAPI_NOINIT_NOERR
|
||||
FUNC_ENTER_PACKAGE_NOERR
|
||||
|
||||
HDassert(8 * sizeof(val) >= size);
|
||||
|
||||
H5T_bit_copy((uint8_t*)&val, (size_t)0, buf, offset, size);
|
||||
H5T__bit_copy((uint8_t*)&val, (size_t)0, buf, offset, size);
|
||||
switch(H5T_native_order_g) {
|
||||
case H5T_ORDER_LE:
|
||||
break;
|
||||
@ -290,11 +294,11 @@ H5T_bit_get_d(uint8_t *buf, size_t offset, size_t size)
|
||||
|
||||
done:
|
||||
FUNC_LEAVE_NOAPI(ret_value)
|
||||
} /* end H5T_bit_get_d() */
|
||||
} /* end H5T__bit_get_d() */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5T_bit_set_d
|
||||
* Function: H5T__bit_set_d
|
||||
*
|
||||
* Purpose: Sets part of a bit vector to the specified unsigned value.
|
||||
*
|
||||
@ -306,10 +310,12 @@ done:
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
void
|
||||
H5T_bit_set_d(uint8_t *buf, size_t offset, size_t size, uint64_t val)
|
||||
H5T__bit_set_d(uint8_t *buf, size_t offset, size_t size, uint64_t val)
|
||||
{
|
||||
size_t i, hs;
|
||||
|
||||
FUNC_ENTER_PACKAGE_NOERR
|
||||
|
||||
HDassert(8 * sizeof(val) >= size);
|
||||
|
||||
switch(H5T_native_order_g) {
|
||||
@ -332,12 +338,14 @@ H5T_bit_set_d(uint8_t *buf, size_t offset, size_t size, uint64_t val)
|
||||
HDabort();
|
||||
} /* end switch */
|
||||
|
||||
H5T_bit_copy(buf, offset, (uint8_t*)&val, (size_t)0, size);
|
||||
} /* end H5T_bit_set_d() */
|
||||
H5T__bit_copy(buf, offset, (uint8_t*)&val, (size_t)0, size);
|
||||
|
||||
FUNC_LEAVE_NOAPI_VOID
|
||||
} /* end H5T__bit_set_d() */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5T_bit_set
|
||||
* Function: H5T__bit_set
|
||||
*
|
||||
* Purpose: Sets or clears bits in a contiguous region of a vector
|
||||
* beginning at bit OFFSET and continuing for SIZE bits.
|
||||
@ -352,10 +360,12 @@ H5T_bit_set_d(uint8_t *buf, size_t offset, size_t size, uint64_t val)
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
void
|
||||
H5T_bit_set(uint8_t *buf, size_t offset, size_t size, hbool_t value)
|
||||
H5T__bit_set(uint8_t *buf, size_t offset, size_t size, hbool_t value)
|
||||
{
|
||||
int idx;
|
||||
|
||||
FUNC_ENTER_PACKAGE_NOERR
|
||||
|
||||
/* Normalize */
|
||||
idx = (int)offset / 8;
|
||||
offset %= 8;
|
||||
@ -385,11 +395,13 @@ H5T_bit_set(uint8_t *buf, size_t offset, size_t size, hbool_t value)
|
||||
else
|
||||
buf[idx] &= (uint8_t)(~(((unsigned)1 << size) - 1));
|
||||
} /* end if */
|
||||
} /* end H5T_bit_set() */
|
||||
|
||||
FUNC_LEAVE_NOAPI_VOID
|
||||
} /* end H5T__bit_set() */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5T_bit_find
|
||||
* Function: H5T__bit_find
|
||||
*
|
||||
* Purpose: Finds the first bit with the specified VALUE within a region
|
||||
* of a bit vector. The region begins at OFFSET and continues
|
||||
@ -409,7 +421,7 @@ H5T_bit_set(uint8_t *buf, size_t offset, size_t size, hbool_t value)
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
ssize_t
|
||||
H5T_bit_find(uint8_t *buf, size_t offset, size_t size, H5T_sdir_t direction,
|
||||
H5T__bit_find(uint8_t *buf, size_t offset, size_t size, H5T_sdir_t direction,
|
||||
hbool_t value)
|
||||
{
|
||||
ssize_t base = (ssize_t)offset;
|
||||
@ -417,8 +429,8 @@ H5T_bit_find(uint8_t *buf, size_t offset, size_t size, H5T_sdir_t direction,
|
||||
size_t iu;
|
||||
ssize_t ret_value = (-1); /* Return value */
|
||||
|
||||
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
|
||||
FUNC_ENTER_NOAPI_NOINIT_NOERR
|
||||
/* Use FUNC_ENTER_PACKAGE_NOERR here to avoid performance issues */
|
||||
FUNC_ENTER_PACKAGE_NOERR
|
||||
|
||||
/* Some functions call this with value=TRUE */
|
||||
HDassert(TRUE == 1);
|
||||
@ -496,11 +508,11 @@ H5T_bit_find(uint8_t *buf, size_t offset, size_t size, H5T_sdir_t direction,
|
||||
|
||||
done:
|
||||
FUNC_LEAVE_NOAPI(ret_value)
|
||||
} /* end H5T_bit_find() */
|
||||
} /* end H5T__bit_find() */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5T_bit_inc
|
||||
* Function: H5T__bit_inc
|
||||
*
|
||||
* Purpose: Increment part of a bit field by adding 1. The bit field
|
||||
* starts with bit position START and is SIZE bits long.
|
||||
@ -516,14 +528,14 @@ done:
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
htri_t
|
||||
H5T_bit_inc(uint8_t *buf, size_t start, size_t size)
|
||||
H5T__bit_inc(uint8_t *buf, size_t start, size_t size)
|
||||
{
|
||||
size_t idx = start / 8;
|
||||
unsigned carry = 1;
|
||||
unsigned acc, mask;
|
||||
|
||||
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
|
||||
FUNC_ENTER_NOAPI_NOINIT_NOERR
|
||||
/* Use FUNC_ENTER_PACKAGE_NOERR here to avoid performance issues */
|
||||
FUNC_ENTER_PACKAGE_NOERR
|
||||
|
||||
HDassert(buf);
|
||||
|
||||
@ -566,11 +578,11 @@ H5T_bit_inc(uint8_t *buf, size_t start, size_t size)
|
||||
} /* end if */
|
||||
|
||||
FUNC_LEAVE_NOAPI(carry ? TRUE : FALSE)
|
||||
} /* end H5T_bit_inc() */
|
||||
} /* end H5T__bit_inc() */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5T_bit_dec
|
||||
* Function: H5T__bit_dec
|
||||
*
|
||||
* Purpose: decrement part of a bit field by substracting 1. The bit
|
||||
* field starts with bit position START and is SIZE bits long.
|
||||
@ -586,15 +598,15 @@ H5T_bit_inc(uint8_t *buf, size_t start, size_t size)
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
htri_t
|
||||
H5T_bit_dec(uint8_t *buf, size_t start, size_t size)
|
||||
H5T__bit_dec(uint8_t *buf, size_t start, size_t size)
|
||||
{
|
||||
size_t idx = start / 8;
|
||||
size_t pos = start % 8;
|
||||
uint8_t tmp;
|
||||
unsigned borrow = 0;
|
||||
|
||||
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
|
||||
FUNC_ENTER_NOAPI_NOINIT_NOERR
|
||||
/* Use FUNC_ENTER_PACKAGE_NOERR here to avoid performance issues */
|
||||
FUNC_ENTER_PACKAGE_NOERR
|
||||
|
||||
HDassert(buf);
|
||||
HDassert(size);
|
||||
@ -645,11 +657,11 @@ H5T_bit_dec(uint8_t *buf, size_t start, size_t size)
|
||||
} /* end else */
|
||||
|
||||
FUNC_LEAVE_NOAPI(borrow ? TRUE : FALSE)
|
||||
} /* end H5T_bit_dec() */
|
||||
} /* end H5T__bit_dec() */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5T_bit_neg
|
||||
* Function: H5T__bit_neg
|
||||
*
|
||||
* Purpose: negate part of a bit sequence. The bit
|
||||
* field starts with bit position START and is SIZE bits long.
|
||||
@ -662,14 +674,14 @@ H5T_bit_dec(uint8_t *buf, size_t start, size_t size)
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
void
|
||||
H5T_bit_neg(uint8_t *buf, size_t start, size_t size)
|
||||
H5T__bit_neg(uint8_t *buf, size_t start, size_t size)
|
||||
{
|
||||
size_t idx = start / 8;
|
||||
size_t pos = start % 8;
|
||||
uint8_t tmp[1];
|
||||
|
||||
/* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */
|
||||
FUNC_ENTER_NOAPI_NOINIT_NOERR
|
||||
/* Use FUNC_ENTER_PACKAGE_NOERR here to avoid performance issues */
|
||||
FUNC_ENTER_PACKAGE_NOERR
|
||||
|
||||
HDassert(buf);
|
||||
HDassert(size);
|
||||
@ -679,7 +691,7 @@ H5T_bit_neg(uint8_t *buf, size_t start, size_t size)
|
||||
|
||||
/* Simply copy the negated bit field back to the original byte */
|
||||
if((size + start - 1) / 8 > idx) { /*bit sequence doesn't end in the same byte as starts*/
|
||||
H5T_bit_copy(&(buf[idx]), pos, tmp, pos, (8-pos));
|
||||
H5T__bit_copy(&(buf[idx]), pos, tmp, pos, (8-pos));
|
||||
idx++;
|
||||
size -= (8 - pos);
|
||||
|
||||
@ -694,12 +706,12 @@ H5T_bit_neg(uint8_t *buf, size_t start, size_t size)
|
||||
if(size > 0) {
|
||||
/* Similar to the first byte case, where sequence ends in the same byte as starts */
|
||||
tmp[0] = (uint8_t)~buf[idx];
|
||||
H5T_bit_copy(&(buf[idx]), (size_t)0, tmp, (size_t)0, size);
|
||||
H5T__bit_copy(&(buf[idx]), (size_t)0, tmp, (size_t)0, size);
|
||||
} /* end if */
|
||||
} /* end if */
|
||||
else /* bit sequence ends in the same byte as starts */
|
||||
H5T_bit_copy(&(buf[idx]), pos, tmp, pos, size);
|
||||
H5T__bit_copy(&(buf[idx]), pos, tmp, pos, size);
|
||||
|
||||
FUNC_LEAVE_NOAPI_VOID
|
||||
} /* end H5T_bit_neg() */
|
||||
} /* end H5T__bit_neg() */
|
||||
|
||||
|
@ -186,7 +186,7 @@ H5T__commit_named(const H5G_loc_t *loc, const char *name, H5T_t *dt,
|
||||
{
|
||||
H5O_obj_create_t ocrt_info; /* Information for object creation */
|
||||
H5T_obj_create_t tcrt_info; /* Information for named datatype creation */
|
||||
H5T_state_t old_state = H5T_STATE_TRANSIENT; /* The state of the datatype before H5T_commit. */
|
||||
H5T_state_t old_state = H5T_STATE_TRANSIENT; /* The state of the datatype before H5T__commit. */
|
||||
herr_t ret_value = SUCCEED; /* Return value */
|
||||
|
||||
FUNC_ENTER_PACKAGE
|
||||
@ -299,7 +299,7 @@ H5Tcommit_anon(hid_t loc_id, hid_t type_id, hid_t tcpl_id, hid_t tapl_id)
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not datatype access property list")
|
||||
|
||||
/* Commit the type */
|
||||
if(H5T_commit(loc.oloc->file, type, tcpl_id, H5AC_dxpl_id) < 0)
|
||||
if(H5T__commit(loc.oloc->file, type, tcpl_id, H5AC_dxpl_id) < 0)
|
||||
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to commit datatype")
|
||||
|
||||
/* Release the datatype's object header */
|
||||
@ -321,7 +321,7 @@ done:
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5T_commit
|
||||
* Function: H5T__commit
|
||||
*
|
||||
* Purpose: Commit a type, giving it a name and causing it to become
|
||||
* immutable.
|
||||
@ -334,7 +334,7 @@ done:
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
herr_t
|
||||
H5T_commit(H5F_t *file, H5T_t *type, hid_t tcpl_id, hid_t dxpl_id)
|
||||
H5T__commit(H5F_t *file, H5T_t *type, hid_t tcpl_id, hid_t dxpl_id)
|
||||
{
|
||||
H5O_loc_t temp_oloc; /* Temporary object header location */
|
||||
H5G_name_t temp_path; /* Temporary path */
|
||||
@ -342,7 +342,7 @@ H5T_commit(H5F_t *file, H5T_t *type, hid_t tcpl_id, hid_t dxpl_id)
|
||||
size_t dtype_size; /* Size of the datatype message */
|
||||
herr_t ret_value = SUCCEED; /* Return value */
|
||||
|
||||
FUNC_ENTER_NOAPI_NOINIT
|
||||
FUNC_ENTER_PACKAGE
|
||||
|
||||
HDassert(file);
|
||||
HDassert(type);
|
||||
@ -439,7 +439,7 @@ done:
|
||||
} /* end if */
|
||||
|
||||
FUNC_LEAVE_NOAPI(ret_value)
|
||||
} /* H5T_commit() */
|
||||
} /* H5T__commit() */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
|
@ -56,6 +56,7 @@
|
||||
/* Local Prototypes */
|
||||
/********************/
|
||||
static herr_t H5T_pack(const H5T_t *dt);
|
||||
static htri_t H5T_is_packed(const H5T_t *dt);
|
||||
|
||||
|
||||
/*********************/
|
||||
@ -298,7 +299,7 @@ done:
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5T_get_member_size
|
||||
* Function: H5T__get_member_size
|
||||
*
|
||||
* Purpose: Returns the size of the specified member.
|
||||
*
|
||||
@ -311,16 +312,15 @@ done:
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
size_t
|
||||
H5T_get_member_size(const H5T_t *dt, unsigned membno)
|
||||
H5T__get_member_size(const H5T_t *dt, unsigned membno)
|
||||
{
|
||||
FUNC_ENTER_NOAPI_NOINIT_NOERR
|
||||
FUNC_ENTER_PACKAGE_NOERR
|
||||
|
||||
HDassert(dt);
|
||||
HDassert(membno < dt->shared->u.compnd.nmembs);
|
||||
|
||||
|
||||
FUNC_LEAVE_NOAPI(dt->shared->u.compnd.memb[membno].type->shared->size)
|
||||
} /* end H5T_get_member_size() */
|
||||
} /* end H5T__get_member_size() */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
@ -370,7 +370,7 @@ H5Tinsert(hid_t parent_id, const char *name, size_t offset, hid_t member_id)
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype")
|
||||
|
||||
/* Insert */
|
||||
if(H5T_insert(parent, name, offset, member) < 0)
|
||||
if(H5T__insert(parent, name, offset, member) < 0)
|
||||
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINSERT, FAIL, "unable to insert member")
|
||||
|
||||
done:
|
||||
@ -416,7 +416,7 @@ done:
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5T_insert
|
||||
* Function: H5T__insert
|
||||
*
|
||||
* Purpose: Adds a new MEMBER to the compound datatype PARENT. The new
|
||||
* member will have a NAME that is unique within PARENT and an
|
||||
@ -431,14 +431,14 @@ done:
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
herr_t
|
||||
H5T_insert(H5T_t *parent, const char *name, size_t offset, const H5T_t *member)
|
||||
H5T__insert(H5T_t *parent, const char *name, size_t offset, const H5T_t *member)
|
||||
{
|
||||
unsigned idx; /* Index of member to insert */
|
||||
size_t total_size;
|
||||
unsigned i; /* Local index variable */
|
||||
herr_t ret_value = SUCCEED; /* Return value */
|
||||
|
||||
FUNC_ENTER_NOAPI(FAIL)
|
||||
FUNC_ENTER_PACKAGE
|
||||
|
||||
/* check args */
|
||||
HDassert(parent && H5T_COMPOUND == parent->shared->type);
|
||||
@ -492,7 +492,7 @@ H5T_insert(H5T_t *parent, const char *name, size_t offset, const H5T_t *member)
|
||||
HDassert(!(parent->shared->u.compnd.packed));
|
||||
|
||||
/* Determine if the compound datatype becomes packed */
|
||||
H5T_update_packed(parent);
|
||||
H5T__update_packed(parent);
|
||||
|
||||
/* Set the "force conversion" flag if the field's datatype indicates */
|
||||
if(member->shared->force_conv == TRUE)
|
||||
@ -504,12 +504,12 @@ H5T_insert(H5T_t *parent, const char *name, size_t offset, const H5T_t *member)
|
||||
/* (can't use a partial datatype and later versions of the format are
|
||||
* more efficient, so might as well upgrade all members also... -QAK)
|
||||
*/
|
||||
if(H5T_upgrade_version(parent, member->shared->version) < 0)
|
||||
if(H5T__upgrade_version(parent, member->shared->version) < 0)
|
||||
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTSET, FAIL, "can't upgrade member encoding version")
|
||||
|
||||
done:
|
||||
FUNC_LEAVE_NOAPI(ret_value)
|
||||
} /* end H5T_insert() */
|
||||
} /* end H5T__insert() */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
@ -567,7 +567,7 @@ H5T_pack(const H5T_t *dt)
|
||||
} /* end for */
|
||||
|
||||
/* Remove padding between members */
|
||||
if(H5T_sort_value(dt, NULL) < 0)
|
||||
if(H5T__sort_value(dt, NULL) < 0)
|
||||
HGOTO_ERROR(H5E_INTERNAL, H5E_CANTCOMPARE, FAIL, "value sort failed")
|
||||
for(i = 0, offset = 0; i < dt->shared->u.compnd.nmembs; i++) {
|
||||
dt->shared->u.compnd.memb[i].offset = offset;
|
||||
@ -602,7 +602,7 @@ done:
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
htri_t
|
||||
static htri_t
|
||||
H5T_is_packed(const H5T_t *dt)
|
||||
{
|
||||
htri_t ret_value = TRUE; /* Return value */
|
||||
@ -625,7 +625,7 @@ H5T_is_packed(const H5T_t *dt)
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5T_update_packed
|
||||
* Function: H5T__update_packed
|
||||
*
|
||||
* Purpose: Checks whether a datatype which is compound became packed
|
||||
* after recent changes. This function does not assume that
|
||||
@ -642,11 +642,11 @@ H5T_is_packed(const H5T_t *dt)
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
void
|
||||
H5T_update_packed(const H5T_t *dt)
|
||||
H5T__update_packed(const H5T_t *dt)
|
||||
{
|
||||
unsigned i; /* Index */
|
||||
|
||||
FUNC_ENTER_NOAPI_NOINIT_NOERR
|
||||
FUNC_ENTER_PACKAGE_NOERR
|
||||
|
||||
HDassert(dt);
|
||||
HDassert(dt->shared->type == H5T_COMPOUND);
|
||||
@ -667,5 +667,5 @@ H5T_update_packed(const H5T_t *dt)
|
||||
dt->shared->u.compnd.packed = FALSE;
|
||||
|
||||
FUNC_LEAVE_NOAPI_VOID
|
||||
} /* end H5T_update_packed() */
|
||||
} /* end H5T__update_packed() */
|
||||
|
||||
|
1052
src/H5Tconv.c
1052
src/H5Tconv.c
File diff suppressed because it is too large
Load Diff
@ -76,7 +76,7 @@
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5T_print_stats
|
||||
* Function: H5T__print_stats
|
||||
*
|
||||
* Purpose: Print statistics about a conversion path. Statistics are
|
||||
* printed only if all the following conditions are true:
|
||||
@ -102,14 +102,14 @@
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
herr_t
|
||||
H5T_print_stats(H5T_path_t UNUSED * path, int UNUSED * nprint/*in,out*/)
|
||||
H5T__print_stats(H5T_path_t UNUSED * path, int UNUSED * nprint/*in,out*/)
|
||||
{
|
||||
#ifdef H5T_DEBUG
|
||||
hsize_t nbytes;
|
||||
char bandwidth[32];
|
||||
#endif
|
||||
|
||||
FUNC_ENTER_NOAPI_NOINIT_NOERR
|
||||
FUNC_ENTER_PACKAGE_NOERR
|
||||
|
||||
#ifdef H5T_DEBUG
|
||||
if(H5DEBUG(T) && path->stats.ncalls > 0) {
|
||||
@ -143,7 +143,7 @@ H5T_print_stats(H5T_path_t UNUSED * path, int UNUSED * nprint/*in,out*/)
|
||||
}
|
||||
#endif
|
||||
FUNC_LEAVE_NOAPI(SUCCEED)
|
||||
} /* end H5T_print_stats() */
|
||||
} /* end H5T__print_stats() */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
|
@ -91,7 +91,7 @@ H5Tenum_create(hid_t parent_id)
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not an integer data type")
|
||||
|
||||
/* Build new type */
|
||||
if((dt=H5T_enum_create(parent))==NULL)
|
||||
if(NULL == (dt = H5T__enum_create(parent)))
|
||||
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "cannot create enum type")
|
||||
/* Atomize the type */
|
||||
if ((ret_value=H5I_register(H5I_DATATYPE, dt, TRUE))<0)
|
||||
@ -103,7 +103,7 @@ done:
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5T_enum_create
|
||||
* Function: H5T__enum_create
|
||||
*
|
||||
* Purpose: Private function for H5Tenum_create. Create a new
|
||||
* enumeration data type based on the specified
|
||||
@ -121,16 +121,16 @@ done:
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
H5T_t *
|
||||
H5T_enum_create(const H5T_t *parent)
|
||||
H5T__enum_create(const H5T_t *parent)
|
||||
{
|
||||
H5T_t *ret_value; /*new enumeration data type */
|
||||
|
||||
FUNC_ENTER_NOAPI(NULL)
|
||||
FUNC_ENTER_PACKAGE
|
||||
|
||||
assert(parent);
|
||||
|
||||
/* Build new type */
|
||||
if(NULL == (ret_value = H5T_alloc()))
|
||||
if(NULL == (ret_value = H5T__alloc()))
|
||||
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
|
||||
ret_value->shared->type = H5T_ENUM;
|
||||
ret_value->shared->parent = H5T_copy(parent, H5T_COPY_ALL);
|
||||
@ -183,7 +183,7 @@ H5Tenum_insert(hid_t type, const char *name, const void *value)
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no value specified")
|
||||
|
||||
/* Do work */
|
||||
if (H5T_enum_insert(dt, name, value)<0)
|
||||
if(H5T__enum_insert(dt, name, value) < 0)
|
||||
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to insert new enumeration member")
|
||||
|
||||
done:
|
||||
@ -192,7 +192,7 @@ done:
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5T_enum_insert
|
||||
* Function: H5T__enum_insert
|
||||
*
|
||||
* Purpose: Insert a new member having a NAME and VALUE into an
|
||||
* enumeration data TYPE. The NAME and VALUE must both be
|
||||
@ -211,14 +211,14 @@ done:
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
herr_t
|
||||
H5T_enum_insert(const H5T_t *dt, const char *name, const void *value)
|
||||
H5T__enum_insert(const H5T_t *dt, const char *name, const void *value)
|
||||
{
|
||||
unsigned i;
|
||||
char **names=NULL;
|
||||
uint8_t *values=NULL;
|
||||
herr_t ret_value=SUCCEED; /* Return value */
|
||||
|
||||
FUNC_ENTER_NOAPI(FAIL)
|
||||
FUNC_ENTER_PACKAGE
|
||||
|
||||
assert(dt);
|
||||
assert(name && *name);
|
||||
@ -292,7 +292,7 @@ H5Tget_member_value(hid_t type, unsigned membno, void *value/*out*/)
|
||||
if (!value)
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "null value buffer")
|
||||
|
||||
if (H5T_get_member_value(dt, membno, value)<0)
|
||||
if(H5T__get_member_value(dt, membno, value) < 0)
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to get member value")
|
||||
done:
|
||||
FUNC_LEAVE_API(ret_value)
|
||||
@ -300,9 +300,9 @@ done:
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5T_get_member_value
|
||||
* Function: H5T__get_member_value
|
||||
*
|
||||
* Purpose: Private function for H5T_get_member_value. Return the
|
||||
* Purpose: Private function for H5T__get_member_value. Return the
|
||||
* value for an enumeration data type member.
|
||||
*
|
||||
* Return: Success: non-negative with the member value copied
|
||||
@ -318,19 +318,16 @@ done:
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
herr_t
|
||||
H5T_get_member_value(const H5T_t *dt, unsigned membno, void *value/*out*/)
|
||||
H5T__get_member_value(const H5T_t *dt, unsigned membno, void *value/*out*/)
|
||||
{
|
||||
herr_t ret_value=SUCCEED; /* Return value */
|
||||
|
||||
FUNC_ENTER_NOAPI(FAIL)
|
||||
FUNC_ENTER_PACKAGE_NOERR
|
||||
|
||||
assert(dt);
|
||||
assert(value);
|
||||
|
||||
HDmemcpy(value, dt->shared->u.enumer.value + membno*dt->shared->size, dt->shared->size);
|
||||
|
||||
done:
|
||||
FUNC_LEAVE_NOAPI(ret_value)
|
||||
FUNC_LEAVE_NOAPI(SUCCEED)
|
||||
}
|
||||
|
||||
|
||||
@ -439,7 +436,7 @@ H5T_enum_nameof(const H5T_t *dt, const void *value, char *name/*out*/, size_t si
|
||||
* and search on the copied datatype to protect the original order. */
|
||||
if(NULL == (copied_dt = H5T_copy(dt, H5T_COPY_ALL)))
|
||||
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, NULL, "unable to copy data type")
|
||||
if(H5T_sort_value(copied_dt, NULL) < 0)
|
||||
if(H5T__sort_value(copied_dt, NULL) < 0)
|
||||
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCOMPARE, NULL, "value sort failed")
|
||||
|
||||
lt = 0;
|
||||
@ -578,7 +575,7 @@ H5T_enum_valueof(const H5T_t *dt, const char *name, void *value/*out*/)
|
||||
* and search on the copied datatype to protect the original order. */
|
||||
if (NULL==(copied_dt=H5T_copy(dt, H5T_COPY_ALL)))
|
||||
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to copy data type");
|
||||
if(H5T_sort_name(copied_dt, NULL)<0)
|
||||
if(H5T__sort_name(copied_dt, NULL) < 0)
|
||||
HGOTO_ERROR(H5E_INTERNAL, H5E_CANTCOMPARE, FAIL, "value sort failed")
|
||||
|
||||
lt = 0;
|
||||
|
@ -168,7 +168,7 @@ H5Tget_member_name(hid_t type_id, unsigned membno)
|
||||
if (NULL == (dt = H5I_object_verify(type_id,H5I_DATATYPE)))
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a datatype")
|
||||
|
||||
if((ret_value = H5T_get_member_name(dt, membno))==NULL)
|
||||
if(NULL == (ret_value = H5T__get_member_name(dt, membno)))
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "unable to get member name")
|
||||
|
||||
done:
|
||||
@ -177,7 +177,7 @@ done:
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5T_get_member_name
|
||||
* Function: H5T__get_member_name
|
||||
*
|
||||
* Purpose: Private function for H5Tget_member_name. Returns the name
|
||||
* of a member of a compound or enumeration datatype. Members
|
||||
@ -196,11 +196,11 @@ done:
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
char *
|
||||
H5T_get_member_name(H5T_t const *dt, unsigned membno)
|
||||
H5T__get_member_name(H5T_t const *dt, unsigned membno)
|
||||
{
|
||||
char *ret_value;
|
||||
|
||||
FUNC_ENTER_NOAPI(NULL)
|
||||
FUNC_ENTER_PACKAGE
|
||||
|
||||
assert(dt);
|
||||
|
||||
@ -283,7 +283,7 @@ done:
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5T_sort_value
|
||||
* Function: H5T__sort_value
|
||||
*
|
||||
* Purpose: Sorts the members of a compound datatype by their offsets;
|
||||
* sorts the members of an enum type by their values. This even
|
||||
@ -299,7 +299,7 @@ done:
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
herr_t
|
||||
H5T_sort_value(const H5T_t *dt, int *map)
|
||||
H5T__sort_value(const H5T_t *dt, int *map)
|
||||
{
|
||||
unsigned nmembs; /* Number of members for datatype */
|
||||
size_t size;
|
||||
@ -308,7 +308,7 @@ H5T_sort_value(const H5T_t *dt, int *map)
|
||||
unsigned i, j; /* Local index variables */
|
||||
herr_t ret_value = SUCCEED; /* Return value */
|
||||
|
||||
FUNC_ENTER_NOAPI(FAIL)
|
||||
FUNC_ENTER_PACKAGE
|
||||
|
||||
/* Check args */
|
||||
HDassert(dt);
|
||||
@ -383,11 +383,11 @@ H5T_sort_value(const H5T_t *dt, int *map)
|
||||
|
||||
done:
|
||||
FUNC_LEAVE_NOAPI(ret_value)
|
||||
} /* end H5T_sort_value() */
|
||||
} /* end H5T__sort_value() */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5T_sort_name
|
||||
* Function: H5T__sort_name
|
||||
*
|
||||
* Purpose: Sorts members of a compound or enumeration datatype by their
|
||||
* names. This even works for locked datatypes since it doesn't
|
||||
@ -405,7 +405,7 @@ done:
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
herr_t
|
||||
H5T_sort_name(const H5T_t *dt, int *map)
|
||||
H5T__sort_name(const H5T_t *dt, int *map)
|
||||
{
|
||||
unsigned i, j, nmembs;
|
||||
size_t size;
|
||||
@ -413,7 +413,7 @@ H5T_sort_name(const H5T_t *dt, int *map)
|
||||
uint8_t tbuf[32];
|
||||
herr_t ret_value=SUCCEED; /* Return value */
|
||||
|
||||
FUNC_ENTER_NOAPI(FAIL)
|
||||
FUNC_ENTER_PACKAGE
|
||||
|
||||
/* Check args */
|
||||
assert(dt);
|
||||
|
@ -290,7 +290,7 @@ H5T_get_native_type(H5T_t *dtype, H5T_direction_t direction, size_t *struct_alig
|
||||
if(NULL == (memb_type = H5T_get_member_type(dtype, u, H5T_COPY_TRANSIENT)))
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "member type retrieval failed")
|
||||
|
||||
if(NULL == (comp_mname[u] = H5T_get_member_name(dtype, u)))
|
||||
if(NULL == (comp_mname[u] = H5T__get_member_name(dtype, u)))
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "member type retrieval failed")
|
||||
|
||||
if(NULL == (memb_list[u] = H5T_get_native_type(memb_type, direction, &children_st_align, &(memb_offset[u]), &children_size)))
|
||||
@ -305,12 +305,12 @@ H5T_get_native_type(H5T_t *dtype, H5T_direction_t direction, size_t *struct_alig
|
||||
children_size += children_st_align - (children_size % children_st_align);
|
||||
|
||||
/* Construct new compound type based on native type */
|
||||
if(NULL == (new_type = H5T_create(H5T_COMPOUND, children_size)))
|
||||
if(NULL == (new_type = H5T__create(H5T_COMPOUND, children_size)))
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot create a compound type")
|
||||
|
||||
/* Insert members for the new compound type */
|
||||
for(u = 0; u < nmemb; u++)
|
||||
if(H5T_insert(new_type, comp_mname[u], memb_offset[u], memb_list[u]) < 0)
|
||||
if(H5T__insert(new_type, comp_mname[u], memb_offset[u], memb_list[u]) < 0)
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot insert member to compound datatype")
|
||||
|
||||
/* Update size, offset and compound alignment for parent in the case of
|
||||
@ -377,7 +377,7 @@ H5T_get_native_type(H5T_t *dtype, H5T_direction_t direction, size_t *struct_alig
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot allocate memory")
|
||||
|
||||
/* Construct new enum type based on native type */
|
||||
if(NULL == (new_type=H5T_enum_create(nat_super_type)))
|
||||
if(NULL == (new_type = H5T__enum_create(nat_super_type)))
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "unable to create enum type")
|
||||
|
||||
/* Retrieve member info and insert members into new enum type */
|
||||
@ -385,16 +385,16 @@ H5T_get_native_type(H5T_t *dtype, H5T_direction_t direction, size_t *struct_alig
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "enumerate data type doesn't have any member")
|
||||
H5_ASSIGN_OVERFLOW(nmemb, snmemb, int, unsigned);
|
||||
for(u = 0; u < nmemb; u++) {
|
||||
if(NULL == (memb_name = H5T_get_member_name(dtype, u)))
|
||||
if(NULL == (memb_name = H5T__get_member_name(dtype, u)))
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot get member name")
|
||||
if(H5T_get_member_value(dtype, u, tmp_memb_value) < 0)
|
||||
if(H5T__get_member_value(dtype, u, tmp_memb_value) < 0)
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot get member value")
|
||||
HDmemcpy(memb_value, tmp_memb_value, H5T_get_size(super_type));
|
||||
|
||||
if(H5Tconvert(super_type_id, nat_super_type_id, (size_t)1, memb_value, NULL, H5P_DEFAULT) < 0)
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot get member value")
|
||||
|
||||
if(H5T_enum_insert(new_type, memb_name, memb_value) < 0)
|
||||
if(H5T__enum_insert(new_type, memb_name, memb_value) < 0)
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot insert member")
|
||||
memb_name = (char *)H5MM_xfree(memb_name);
|
||||
}
|
||||
@ -422,12 +422,12 @@ H5T_get_native_type(H5T_t *dtype, H5T_direction_t direction, size_t *struct_alig
|
||||
size_t super_align = 0;
|
||||
|
||||
/* Retrieve dimension information for array data type */
|
||||
if((sarray_rank = H5T_get_array_ndims(dtype)) <= 0)
|
||||
if((sarray_rank = H5T__get_array_ndims(dtype)) <= 0)
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot get dimension rank")
|
||||
H5_ASSIGN_OVERFLOW(array_rank, sarray_rank, int, unsigned);
|
||||
if(NULL == (dims = (hsize_t*)H5MM_malloc(array_rank * sizeof(hsize_t))))
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot allocate memory")
|
||||
if(H5T_get_array_dims(dtype, dims) < 0)
|
||||
if(H5T__get_array_dims(dtype, dims) < 0)
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot get dimension size")
|
||||
|
||||
/* Retrieve base type for array type */
|
||||
@ -442,7 +442,7 @@ H5T_get_native_type(H5T_t *dtype, H5T_direction_t direction, size_t *struct_alig
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_CLOSEERROR, NULL, "cannot close datatype")
|
||||
|
||||
/* Create a new array type based on native type */
|
||||
if(NULL == (new_type = H5T_array_create(nat_super_type, array_rank, dims)))
|
||||
if(NULL == (new_type = H5T__array_create(nat_super_type, array_rank, dims)))
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "unable to create array type")
|
||||
|
||||
/* Close base type */
|
||||
@ -480,7 +480,7 @@ H5T_get_native_type(H5T_t *dtype, H5T_direction_t direction, size_t *struct_alig
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_CLOSEERROR, NULL, "cannot close datatype")
|
||||
|
||||
/* Create a new array type based on native type */
|
||||
if(NULL == (new_type = H5T_vlen_create(nat_super_type)))
|
||||
if(NULL == (new_type = H5T__vlen_create(nat_super_type)))
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "unable to create VL type")
|
||||
|
||||
/* Close base type */
|
||||
|
@ -183,7 +183,7 @@ H5O_dtype_create(H5F_t *f, void *_crt_info, H5G_loc_t *obj_loc, hid_t dxpl_id)
|
||||
HDassert(obj_loc);
|
||||
|
||||
/* Commit the type to the file */
|
||||
if(H5T_commit(f, crt_info->dt, crt_info->tcpl_id, dxpl_id) < 0)
|
||||
if(H5T__commit(f, crt_info->dt, crt_info->tcpl_id, dxpl_id) < 0)
|
||||
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, NULL, "unable to commit datatype")
|
||||
|
||||
/* Set up the new named datatype's location */
|
||||
|
406
src/H5Tpkg.h
406
src/H5Tpkg.h
File diff suppressed because it is too large
Load Diff
@ -83,7 +83,7 @@
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5T_visit
|
||||
* Function: H5T__visit
|
||||
*
|
||||
* Purpose: Visit a datatype and all it's members and/or parents, making
|
||||
* a callback for each.
|
||||
@ -96,12 +96,12 @@
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
herr_t
|
||||
H5T_visit(H5T_t *dt, unsigned visit_flags, H5T_operator_t op, void *op_value)
|
||||
H5T__visit(H5T_t *dt, unsigned visit_flags, H5T_operator_t op, void *op_value)
|
||||
{
|
||||
hbool_t is_complex; /* Flag indicating current datatype is "complex" */
|
||||
herr_t ret_value = SUCCEED; /* Return value */
|
||||
|
||||
FUNC_ENTER_NOAPI(FAIL)
|
||||
FUNC_ENTER_PACKAGE
|
||||
|
||||
/* Sanity check */
|
||||
HDassert(dt);
|
||||
@ -123,7 +123,7 @@ H5T_visit(H5T_t *dt, unsigned visit_flags, H5T_operator_t op, void *op_value)
|
||||
|
||||
/* Visit each member of the compound datatype */
|
||||
for(u = 0; u < dt->shared->u.compnd.nmembs; u++)
|
||||
if(H5T_visit(dt->shared->u.compnd.memb[u].type, visit_flags, op, op_value) < 0)
|
||||
if(H5T__visit(dt->shared->u.compnd.memb[u].type, visit_flags, op, op_value) < 0)
|
||||
HGOTO_ERROR(H5E_DATATYPE, H5E_BADITER, FAIL, "can't visit member datatype")
|
||||
} /* end case */
|
||||
break;
|
||||
@ -132,7 +132,7 @@ H5T_visit(H5T_t *dt, unsigned visit_flags, H5T_operator_t op, void *op_value)
|
||||
case H5T_VLEN:
|
||||
case H5T_ENUM:
|
||||
/* Visit parent type */
|
||||
if(H5T_visit(dt->shared->parent, visit_flags, op, op_value) < 0)
|
||||
if(H5T__visit(dt->shared->parent, visit_flags, op, op_value) < 0)
|
||||
HGOTO_ERROR(H5E_DATATYPE, H5E_BADITER, FAIL, "can't visit parent datatype")
|
||||
break;
|
||||
|
||||
@ -151,5 +151,5 @@ H5T_visit(H5T_t *dt, unsigned visit_flags, H5T_operator_t op, void *op_value)
|
||||
|
||||
done:
|
||||
FUNC_LEAVE_NOAPI(ret_value)
|
||||
} /* end H5T_visit() */
|
||||
} /* end H5T__visit() */
|
||||
|
||||
|
@ -117,7 +117,7 @@ H5Tvlen_create(hid_t base_id)
|
||||
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not an valid base datatype")
|
||||
|
||||
/* Create up VL datatype */
|
||||
if((dt = H5T_vlen_create(base)) == NULL)
|
||||
if((dt = H5T__vlen_create(base)) == NULL)
|
||||
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "invalid VL location")
|
||||
|
||||
/* Atomize the type */
|
||||
@ -130,7 +130,7 @@ done:
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5T_vlen_create
|
||||
* Function: H5T__vlen_create
|
||||
*
|
||||
* Purpose: Create a new variable-length datatype based on the specified
|
||||
* BASE_TYPE.
|
||||
@ -145,18 +145,18 @@ done:
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
H5T_t *
|
||||
H5T_vlen_create(const H5T_t *base)
|
||||
H5T__vlen_create(const H5T_t *base)
|
||||
{
|
||||
H5T_t *dt = NULL; /*new VL datatype */
|
||||
H5T_t *ret_value; /*return value */
|
||||
|
||||
FUNC_ENTER_NOAPI_NOINIT
|
||||
FUNC_ENTER_PACKAGE
|
||||
|
||||
/* Check args */
|
||||
HDassert(base);
|
||||
|
||||
/* Build new type */
|
||||
if(NULL == (dt = H5T_alloc()))
|
||||
if(NULL == (dt = H5T__alloc()))
|
||||
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTALLOC, NULL, "memory allocation failed")
|
||||
dt->shared->type = H5T_VLEN;
|
||||
|
||||
@ -187,11 +187,11 @@ done:
|
||||
HDONE_ERROR(H5E_DATATYPE, H5E_CANTRELEASE, NULL, "unable to release datatype info")
|
||||
|
||||
FUNC_LEAVE_NOAPI(ret_value)
|
||||
} /* end H5T_vlen_create() */
|
||||
} /* end H5T__vlen_create() */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5T_vlen_set_loc
|
||||
* Function: H5T__vlen_set_loc
|
||||
*
|
||||
* Purpose: Sets the location of a VL datatype to be either on disk or in memory
|
||||
*
|
||||
@ -207,11 +207,11 @@ done:
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
htri_t
|
||||
H5T_vlen_set_loc(const H5T_t *dt, H5F_t *f, H5T_loc_t loc)
|
||||
H5T__vlen_set_loc(const H5T_t *dt, H5F_t *f, H5T_loc_t loc)
|
||||
{
|
||||
htri_t ret_value = FALSE; /* Indicate success, but no location change */
|
||||
|
||||
FUNC_ENTER_NOAPI_NOINIT
|
||||
FUNC_ENTER_PACKAGE
|
||||
|
||||
/* check parameters */
|
||||
HDassert(dt);
|
||||
@ -298,7 +298,7 @@ H5T_vlen_set_loc(const H5T_t *dt, H5F_t *f, H5T_loc_t loc)
|
||||
|
||||
done:
|
||||
FUNC_LEAVE_NOAPI(ret_value)
|
||||
} /* end H5T_vlen_set_loc() */
|
||||
} /* end H5T__vlen_set_loc() */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
|
@ -648,7 +648,7 @@ H5TN_init_interface(void)\n\
|
||||
|
||||
/* The part common to fixed and floating types */
|
||||
printf("\
|
||||
if(NULL == (dt = H5T_alloc()))\n\
|
||||
if(NULL == (dt = H5T__alloc()))\n\
|
||||
HGOTO_ERROR(H5E_DATATYPE, H5E_NOSPACE, FAIL, \"datatype allocation failed\")\n\
|
||||
dt->shared->state = H5T_STATE_IMMUTABLE;\n\
|
||||
dt->shared->type = H5T_%s;\n\
|
||||
|
@ -1917,6 +1917,30 @@ static herr_t H5_INTERFACE_INIT_FUNC(void);
|
||||
H5_PUSH_FUNC \
|
||||
{
|
||||
|
||||
/* Use this macro for all "normal" staticly-scoped functions */
|
||||
#define FUNC_ENTER_STATIC { \
|
||||
FUNC_ENTER_COMMON(H5_IS_PKG(FUNC)); \
|
||||
H5_PUSH_FUNC \
|
||||
{
|
||||
|
||||
/* Use this macro for staticly-scoped functions which propgate errors, but don't issue them */
|
||||
#define FUNC_ENTER_STATIC_NOERR { \
|
||||
FUNC_ENTER_COMMON_NOERR(H5_IS_PKG(FUNC)); \
|
||||
H5_PUSH_FUNC \
|
||||
{
|
||||
|
||||
/* Use the following macro as replacement for the FUNC_ENTER_STATIC
|
||||
* macro when the function needs to set up a metadata tag. */
|
||||
#define FUNC_ENTER_STATIC_TAG(dxpl_id, tag, err) { \
|
||||
haddr_t prev_tag = HADDR_UNDEF; \
|
||||
hid_t tag_dxpl_id = dxpl_id; \
|
||||
\
|
||||
FUNC_ENTER_COMMON(H5_IS_PKG(FUNC)); \
|
||||
if(H5AC_tag(tag_dxpl_id, tag, &prev_tag) < 0) \
|
||||
HGOTO_ERROR(H5E_CACHE, H5E_CANTTAG, err, "unable to apply metadata tag") \
|
||||
H5_PUSH_FUNC \
|
||||
{
|
||||
|
||||
/* Use this macro for all non-API functions, which propagate errors, but don't issue them */
|
||||
#define FUNC_ENTER_NOAPI_NOERR { \
|
||||
FUNC_ENTER_COMMON_NOERR(!H5_IS_API(FUNC)); \
|
||||
@ -2160,11 +2184,11 @@ extern hbool_t H5_api_entered_g; /* Has library already been entered through
|
||||
{{{
|
||||
|
||||
/* Macros for substituting the package name */
|
||||
#define FUNC_ENTER_STATIC H5_PACKAGE_ENTER(H5_MY_PKG, H5_MY_PKG_INIT, REG)
|
||||
#define FUNC_ENTER_PKGINIT H5_PACKAGE_ENTER(H5_MY_PKG, H5_MY_PKG_INIT, INIT)
|
||||
#define FUNC_ENTER_PKG H5_PACKAGE_ENTER(H5_MY_PKG, H5_MY_PKG_INIT, REG)
|
||||
#define FUNC_ENTER_PRIV H5_PRIVATE_ENTER(H5_MY_PKG, H5_MY_PKG_INIT)
|
||||
#define FUNC_ENTER_PUB H5_PUBLIC_ENTER(H5_MY_PKG, H5_MY_PKG_INIT)
|
||||
#define FUNC_ENT_STATIC H5_PACKAGE_ENTER(H5_MY_PKG, H5_MY_PKG_INIT, REG)
|
||||
#define FUNC_ENT_PKGINIT H5_PACKAGE_ENTER(H5_MY_PKG, H5_MY_PKG_INIT, INIT)
|
||||
#define FUNC_ENT_PKG H5_PACKAGE_ENTER(H5_MY_PKG, H5_MY_PKG_INIT, REG)
|
||||
#define FUNC_ENT_PRIV H5_PRIVATE_ENTER(H5_MY_PKG, H5_MY_PKG_INIT)
|
||||
#define FUNC_ENT_PUB H5_PUBLIC_ENTER(H5_MY_PKG, H5_MY_PKG_INIT)
|
||||
|
||||
/* Macros for substituting a function prefix */
|
||||
#define FUNC_PREFIX_STATIC static
|
||||
@ -2190,7 +2214,7 @@ func \
|
||||
{ \
|
||||
ret_typ ret_value = ret_init; \
|
||||
H5_GLUE(FUNC_ERR_VAR_, use_err)(ret_typ, err) \
|
||||
H5_GLUE(FUNC_ENTER_, scope)
|
||||
H5_GLUE(FUNC_ENT_, scope)
|
||||
|
||||
/* Macros for label when a function initialization can fail */
|
||||
#define H5_PRIV_YES_FUNC_INIT_FAILED func_init_failed:
|
||||
|
104
test/bittests.c
104
test/bittests.c
@ -56,13 +56,13 @@ test_find (void)
|
||||
|
||||
/* The zero length buffer */
|
||||
HDmemset(v1, 0xaa, sizeof v1);
|
||||
n = H5T_bit_find(v1, (size_t)0, (size_t)0, H5T_BIT_LSB, TRUE);
|
||||
n = H5T__bit_find(v1, (size_t)0, (size_t)0, H5T_BIT_LSB, TRUE);
|
||||
if(-1 != n) {
|
||||
H5_FAILED();
|
||||
puts (" Zero length test failed (lsb)!");
|
||||
goto failed;
|
||||
}
|
||||
n = H5T_bit_find(v1, (size_t)0, (size_t)0, H5T_BIT_MSB, TRUE);
|
||||
n = H5T__bit_find(v1, (size_t)0, (size_t)0, H5T_BIT_MSB, TRUE);
|
||||
if(-1 != n) {
|
||||
H5_FAILED();
|
||||
puts (" Zero length test failed (msb)!");
|
||||
@ -72,13 +72,13 @@ test_find (void)
|
||||
|
||||
/* The zero buffer */
|
||||
HDmemset(v1, 0, sizeof v1);
|
||||
n = H5T_bit_find(v1, (size_t)0, 8 * sizeof(v1), H5T_BIT_LSB, TRUE);
|
||||
n = H5T__bit_find(v1, (size_t)0, 8 * sizeof(v1), H5T_BIT_LSB, TRUE);
|
||||
if(-1 != n) {
|
||||
H5_FAILED();
|
||||
puts (" Zero buffer test failed (lsb)!");
|
||||
goto failed;
|
||||
}
|
||||
n = H5T_bit_find(v1, (size_t)0, 8 * sizeof(v1), H5T_BIT_MSB, TRUE);
|
||||
n = H5T__bit_find(v1, (size_t)0, 8 * sizeof(v1), H5T_BIT_MSB, TRUE);
|
||||
if(-1 != n) {
|
||||
H5_FAILED();
|
||||
puts (" Zero buffer test failed (msb)!");
|
||||
@ -89,13 +89,13 @@ test_find (void)
|
||||
for(i = 0; i < 8 * (int)sizeof(v1); i++) {
|
||||
HDmemset(v1, 0, sizeof v1);
|
||||
v1[i / 8] = 1 << (i % 8);
|
||||
n = H5T_bit_find(v1, (size_t)0, 8 * sizeof(v1), H5T_BIT_LSB, TRUE);
|
||||
n = H5T__bit_find(v1, (size_t)0, 8 * sizeof(v1), H5T_BIT_LSB, TRUE);
|
||||
if((ssize_t)i != n) {
|
||||
H5_FAILED();
|
||||
printf (" Test for set bit %d failed (lsb)!\n", i);
|
||||
goto failed;
|
||||
}
|
||||
n = H5T_bit_find(v1, (size_t)0, 8 * sizeof(v1), H5T_BIT_MSB, TRUE);
|
||||
n = H5T__bit_find(v1, (size_t)0, 8 * sizeof(v1), H5T_BIT_MSB, TRUE);
|
||||
if((ssize_t)i != n) {
|
||||
H5_FAILED();
|
||||
printf (" Test for set bit %d failed (msb)!\n", i);
|
||||
@ -105,13 +105,13 @@ test_find (void)
|
||||
|
||||
/* The one buffer */
|
||||
HDmemset(v1, 0xff, sizeof v1);
|
||||
n = H5T_bit_find(v1, (size_t)0, 8 * sizeof(v1), H5T_BIT_LSB, FALSE);
|
||||
n = H5T__bit_find(v1, (size_t)0, 8 * sizeof(v1), H5T_BIT_LSB, FALSE);
|
||||
if(-1 != n) {
|
||||
H5_FAILED();
|
||||
puts (" One buffer test failed (lsb)!");
|
||||
goto failed;
|
||||
}
|
||||
n = H5T_bit_find(v1, (size_t)0, 8 * sizeof(v1), H5T_BIT_MSB, FALSE);
|
||||
n = H5T__bit_find(v1, (size_t)0, 8 * sizeof(v1), H5T_BIT_MSB, FALSE);
|
||||
if(-1 != n) {
|
||||
H5_FAILED();
|
||||
puts (" One buffer test failed (msb)!");
|
||||
@ -122,13 +122,13 @@ test_find (void)
|
||||
for (i=0; i<8*(int)sizeof(v1); i++) {
|
||||
memset (v1, 0xff, sizeof v1);
|
||||
v1[i/8] &= ~(1<<(i%8));
|
||||
n = H5T_bit_find (v1, (size_t)0, 8*sizeof(v1), H5T_BIT_LSB, FALSE);
|
||||
n = H5T__bit_find (v1, (size_t)0, 8*sizeof(v1), H5T_BIT_LSB, FALSE);
|
||||
if ((ssize_t)i!=n) {
|
||||
H5_FAILED();
|
||||
printf (" Test for clear bit %d failed (lsb)!\n", i);
|
||||
goto failed;
|
||||
}
|
||||
n = H5T_bit_find (v1, (size_t)0, 8*sizeof(v1), H5T_BIT_MSB, FALSE);
|
||||
n = H5T__bit_find (v1, (size_t)0, 8*sizeof(v1), H5T_BIT_MSB, FALSE);
|
||||
if ((ssize_t)i!=n) {
|
||||
H5_FAILED();
|
||||
printf (" Test for clear bit %d failed (lsb)!\n", i);
|
||||
@ -183,7 +183,7 @@ test_copy (void)
|
||||
memset (v2, 0x00, sizeof v2);
|
||||
|
||||
/* Copy some bits to v2 and make sure something was copied */
|
||||
H5T_bit_copy (v2, d_offset, v1, s_offset, size);
|
||||
H5T__bit_copy (v2, d_offset, v1, s_offset, size);
|
||||
for (j=0; j<(int)sizeof(v2); j++) if (v2[j]) break;
|
||||
if (size>0 && j>=(int)sizeof(v2)) {
|
||||
H5_FAILED();
|
||||
@ -198,7 +198,7 @@ test_copy (void)
|
||||
|
||||
|
||||
/* Look for the zeros and ones */
|
||||
n = H5T_bit_find (v2, (size_t)0, 8*sizeof(v2), H5T_BIT_LSB, 1);
|
||||
n = H5T__bit_find (v2, (size_t)0, 8*sizeof(v2), H5T_BIT_LSB, 1);
|
||||
if (size>0 && n!=(ssize_t)d_offset) {
|
||||
H5_FAILED();
|
||||
printf (" Unable to find first copied bit in destination "
|
||||
@ -210,7 +210,7 @@ test_copy (void)
|
||||
puts (" Found copied bits and shouldn't have!");
|
||||
goto failed;
|
||||
}
|
||||
n = H5T_bit_find (v2, d_offset, 8*sizeof(v2)-d_offset, H5T_BIT_LSB, 0);
|
||||
n = H5T__bit_find (v2, d_offset, 8*sizeof(v2)-d_offset, H5T_BIT_LSB, 0);
|
||||
if (d_offset+size<8*sizeof(v2) && n!=(ssize_t)size) {
|
||||
H5_FAILED();
|
||||
printf (" Unable to find last copied bit in destination "
|
||||
@ -227,7 +227,7 @@ test_copy (void)
|
||||
* Look for zeros and ones in reverse order. This is only to test
|
||||
* that reverse searches work as expected.
|
||||
*/
|
||||
n = H5T_bit_find (v2, (size_t)0, 8*sizeof(v2), H5T_BIT_MSB, 1);
|
||||
n = H5T__bit_find (v2, (size_t)0, 8*sizeof(v2), H5T_BIT_MSB, 1);
|
||||
if (size>0 && (size_t)(n+1)!=d_offset+size) {
|
||||
H5_FAILED();
|
||||
printf (" Unable to find last copied bit in destination "
|
||||
@ -239,7 +239,7 @@ test_copy (void)
|
||||
puts (" Found copied bits but shouldn't have (reverse)!");
|
||||
goto failed;
|
||||
}
|
||||
n = H5T_bit_find (v2, (size_t)0, d_offset+size, H5T_BIT_MSB, 0);
|
||||
n = H5T__bit_find (v2, (size_t)0, d_offset+size, H5T_BIT_MSB, 0);
|
||||
if (d_offset>0 && n+1!=(ssize_t)d_offset) {
|
||||
H5_FAILED();
|
||||
printf (" Unable to find beginning of copied data "
|
||||
@ -305,12 +305,12 @@ test_shift (void)
|
||||
|
||||
/*-------- LEFT-shift some bits and make sure something was shifted --------*/
|
||||
memset (vector, 0x00, sizeof vector);
|
||||
H5T_bit_set (vector, offset, size, 1);
|
||||
H5T__bit_set (vector, offset, size, 1);
|
||||
|
||||
H5T_bit_shift (vector, shift_dist, offset, size);
|
||||
H5T__bit_shift (vector, shift_dist, offset, size);
|
||||
|
||||
/* Look for the ones */
|
||||
n = H5T_bit_find (vector, (size_t)0, 8*sizeof(vector), H5T_BIT_LSB, 1);
|
||||
n = H5T__bit_find (vector, (size_t)0, 8*sizeof(vector), H5T_BIT_LSB, 1);
|
||||
if ((size_t)n!=offset+shift_dist) {
|
||||
H5_FAILED();
|
||||
printf (" Unable to find first bit in destination "
|
||||
@ -322,7 +322,7 @@ test_shift (void)
|
||||
* Look for zeros and ones in reverse order. This is only to test
|
||||
* that reverse searches work as expected.
|
||||
*/
|
||||
n = H5T_bit_find (vector, (size_t)0, 8*sizeof(vector), H5T_BIT_MSB, 1);
|
||||
n = H5T__bit_find (vector, (size_t)0, 8*sizeof(vector), H5T_BIT_MSB, 1);
|
||||
if (n!=(ssize_t)(offset+size-1)) {
|
||||
H5_FAILED();
|
||||
printf (" Unable to find last bit in destination "
|
||||
@ -332,12 +332,12 @@ test_shift (void)
|
||||
|
||||
/*-------- RIGHT-shift some bits and make sure something was shifted --------*/
|
||||
memset (vector, 0x00, sizeof vector);
|
||||
H5T_bit_set (vector, offset, size, 1);
|
||||
H5T__bit_set (vector, offset, size, 1);
|
||||
|
||||
H5T_bit_shift (vector, -shift_dist, offset, size);
|
||||
H5T__bit_shift (vector, -shift_dist, offset, size);
|
||||
|
||||
/* Look for the ones */
|
||||
n = H5T_bit_find (vector, (size_t)0, 8*sizeof(vector), H5T_BIT_LSB, 1);
|
||||
n = H5T__bit_find (vector, (size_t)0, 8*sizeof(vector), H5T_BIT_LSB, 1);
|
||||
if ((size_t)n!=offset) {
|
||||
H5_FAILED();
|
||||
printf (" Unable to find first bit in destination "
|
||||
@ -349,7 +349,7 @@ test_shift (void)
|
||||
* Look for zeros and ones in reverse order. This is only to test
|
||||
* that reverse searches work as expected.
|
||||
*/
|
||||
n = H5T_bit_find (vector, (size_t)0, 8*sizeof(vector), H5T_BIT_MSB, 1);
|
||||
n = H5T__bit_find (vector, (size_t)0, 8*sizeof(vector), H5T_BIT_MSB, 1);
|
||||
if (n!=(ssize_t)(offset+size-shift_dist-1)) {
|
||||
H5_FAILED();
|
||||
printf (" Unable to find last bit in destination "
|
||||
@ -367,12 +367,12 @@ test_shift (void)
|
||||
shift_dist = -((ssize_t)size);
|
||||
|
||||
memset (vector, 0x00, sizeof vector);
|
||||
H5T_bit_set (vector, offset, size, 1);
|
||||
H5T__bit_set (vector, offset, size, 1);
|
||||
|
||||
H5T_bit_shift (vector, shift_dist, offset, size);
|
||||
H5T__bit_shift (vector, shift_dist, offset, size);
|
||||
|
||||
/* Supposed to fail to find any ones */
|
||||
n = H5T_bit_find (vector, (size_t)0, 8*sizeof(vector), H5T_BIT_LSB, 1);
|
||||
n = H5T__bit_find (vector, (size_t)0, 8*sizeof(vector), H5T_BIT_LSB, 1);
|
||||
if (n >= 0) {
|
||||
H5_FAILED();
|
||||
printf (" Unable to verify all bits are zero in destination(LSB) "
|
||||
@ -381,7 +381,7 @@ test_shift (void)
|
||||
}
|
||||
|
||||
/* Look from the other direction */
|
||||
n = H5T_bit_find (vector, (size_t)0, 8*sizeof(vector), H5T_BIT_MSB, 1);
|
||||
n = H5T__bit_find (vector, (size_t)0, 8*sizeof(vector), H5T_BIT_MSB, 1);
|
||||
if (n >= 0) {
|
||||
H5_FAILED();
|
||||
printf (" Unable to verify all bits are zero in destination(MSB) "
|
||||
@ -437,15 +437,15 @@ test_increment (void)
|
||||
|
||||
memset (vector, 0x00, sizeof vector);
|
||||
if(size>1) /* if size=6, make a sequence like 011111 */
|
||||
H5T_bit_set (vector, offset, size-1, 1);
|
||||
H5T__bit_set (vector, offset, size-1, 1);
|
||||
else /* if size=1, just set this one bit to 1 */
|
||||
H5T_bit_set (vector, offset, size, 1);
|
||||
H5T__bit_set (vector, offset, size, 1);
|
||||
|
||||
/* Increment the sequence by one */
|
||||
H5T_bit_inc (vector, offset, size);
|
||||
H5T__bit_inc (vector, offset, size);
|
||||
|
||||
/* Look for the one */
|
||||
n = H5T_bit_find (vector, (size_t)0, 8*sizeof(vector), H5T_BIT_LSB, 1);
|
||||
n = H5T__bit_find (vector, (size_t)0, 8*sizeof(vector), H5T_BIT_LSB, 1);
|
||||
if (size!=1 && (size_t)n!=offset+size-1) {
|
||||
H5_FAILED();
|
||||
printf (" Unable to find first bit in destination "
|
||||
@ -463,7 +463,7 @@ test_increment (void)
|
||||
* Look for one in reverse order. This is only to test
|
||||
* that reverse searches work as expected.
|
||||
*/
|
||||
n = H5T_bit_find (vector, (size_t)0, 8*sizeof(vector), H5T_BIT_MSB, 1);
|
||||
n = H5T__bit_find (vector, (size_t)0, 8*sizeof(vector), H5T_BIT_MSB, 1);
|
||||
if (size!=1 && n!=(ssize_t)(offset+size-1)) {
|
||||
H5_FAILED();
|
||||
printf (" Unable to find last bit in destination "
|
||||
@ -526,10 +526,10 @@ test_decrement (void)
|
||||
memset (vector, 0x00, sizeof vector);
|
||||
|
||||
/* decrement the sequence by one */
|
||||
H5T_bit_dec (vector, offset, size);
|
||||
H5T__bit_dec (vector, offset, size);
|
||||
|
||||
/* Look for the ones */
|
||||
n = H5T_bit_find (vector, (size_t)0, 8*sizeof(vector), H5T_BIT_LSB, 1);
|
||||
n = H5T__bit_find (vector, (size_t)0, 8*sizeof(vector), H5T_BIT_LSB, 1);
|
||||
if ((size_t)n!=offset) {
|
||||
H5_FAILED();
|
||||
printf (" Unable to find first bit in destination "
|
||||
@ -541,7 +541,7 @@ test_decrement (void)
|
||||
* Look for zeros and ones in reverse order. This is only to test
|
||||
* that reverse searches work as expected.
|
||||
*/
|
||||
n = H5T_bit_find (vector, (size_t)0, 8*sizeof(vector), H5T_BIT_MSB, 1);
|
||||
n = H5T__bit_find (vector, (size_t)0, 8*sizeof(vector), H5T_BIT_MSB, 1);
|
||||
if (n!=(ssize_t)(offset+size-1)) {
|
||||
H5_FAILED();
|
||||
printf (" Unable to find last bit in destination "
|
||||
@ -598,10 +598,10 @@ test_negate (void)
|
||||
memset (vector, 0x00, sizeof vector);
|
||||
|
||||
/* negate the sequence */
|
||||
H5T_bit_neg (vector, offset, size);
|
||||
H5T__bit_neg (vector, offset, size);
|
||||
|
||||
/* Look for the ones */
|
||||
n = H5T_bit_find (vector, (size_t)0, 8*sizeof(vector), H5T_BIT_LSB, 1);
|
||||
n = H5T__bit_find (vector, (size_t)0, 8*sizeof(vector), H5T_BIT_LSB, 1);
|
||||
if ((size_t)n!=offset) {
|
||||
H5_FAILED();
|
||||
printf (" Unable to find first bit in destination "
|
||||
@ -613,7 +613,7 @@ test_negate (void)
|
||||
* Look for zeros and ones in reverse order. This is only to test
|
||||
* that reverse searches work as expected.
|
||||
*/
|
||||
n = H5T_bit_find (vector, (size_t)0, 8*sizeof(vector), H5T_BIT_MSB, 1);
|
||||
n = H5T__bit_find (vector, (size_t)0, 8*sizeof(vector), H5T_BIT_MSB, 1);
|
||||
if (n!=(ssize_t)(offset+size-1)) {
|
||||
H5_FAILED();
|
||||
printf (" Unable to find last bit in destination "
|
||||
@ -623,13 +623,13 @@ test_negate (void)
|
||||
|
||||
/* All-one sequence will become 000000(size=6) after negating */
|
||||
memset (vector, 0x00, sizeof vector);
|
||||
H5T_bit_set (vector, offset, size, 1);
|
||||
H5T__bit_set (vector, offset, size, 1);
|
||||
|
||||
/* negate the sequence */
|
||||
H5T_bit_neg (vector, offset, size);
|
||||
H5T__bit_neg (vector, offset, size);
|
||||
|
||||
/* Look for the ones */
|
||||
n = H5T_bit_find (vector, (size_t)0, 8*sizeof(vector), H5T_BIT_LSB, 1);
|
||||
n = H5T__bit_find (vector, (size_t)0, 8*sizeof(vector), H5T_BIT_LSB, 1);
|
||||
if (n>=0) {
|
||||
H5_FAILED();
|
||||
printf (" Unable to verify all-zero bits in destination "
|
||||
@ -641,7 +641,7 @@ test_negate (void)
|
||||
* Look for ones in reverse order. This is only to test
|
||||
* that reverse searches work as expected.
|
||||
*/
|
||||
n = H5T_bit_find (vector, (size_t)0, 8*sizeof(vector), H5T_BIT_MSB, 1);
|
||||
n = H5T__bit_find (vector, (size_t)0, 8*sizeof(vector), H5T_BIT_MSB, 1);
|
||||
if (n>=0) {
|
||||
H5_FAILED();
|
||||
printf (" Unable to verify all-zero bits in destination "
|
||||
@ -695,7 +695,7 @@ test_set (void)
|
||||
memset (v2, 0x00, sizeof v2);
|
||||
|
||||
/* Set some bits in v2 */
|
||||
H5T_bit_set (v2, d_offset, size, TRUE);
|
||||
H5T__bit_set (v2, d_offset, size, TRUE);
|
||||
for (j=0; j<(int)sizeof(v2); j++) if (v2[j]) break;
|
||||
if (size>0 && j>=(int)sizeof(v2)) {
|
||||
H5_FAILED();
|
||||
@ -710,7 +710,7 @@ test_set (void)
|
||||
|
||||
|
||||
/* Look for the zeros and ones */
|
||||
n = H5T_bit_find (v2, (size_t)0, 8*sizeof(v2), H5T_BIT_LSB, 1);
|
||||
n = H5T__bit_find (v2, (size_t)0, 8*sizeof(v2), H5T_BIT_LSB, 1);
|
||||
if (size>0 && n!=(ssize_t)d_offset) {
|
||||
H5_FAILED();
|
||||
printf (" Unable to find first set bit in destination "
|
||||
@ -722,7 +722,7 @@ test_set (void)
|
||||
puts (" Found set bits and shouldn't have!");
|
||||
goto failed;
|
||||
}
|
||||
n = H5T_bit_find (v2, d_offset, 8*sizeof(v2)-d_offset, H5T_BIT_LSB, 0);
|
||||
n = H5T__bit_find (v2, d_offset, 8*sizeof(v2)-d_offset, H5T_BIT_LSB, 0);
|
||||
if (d_offset+size<8*sizeof(v2) && n!=(ssize_t)size) {
|
||||
H5_FAILED();
|
||||
printf (" Unable to find last set bit in destination "
|
||||
@ -739,7 +739,7 @@ test_set (void)
|
||||
* Look for zeros and ones in reverse order. This is only to test
|
||||
* that reverse searches work as expected.
|
||||
*/
|
||||
n = H5T_bit_find (v2, (size_t)0, 8*sizeof(v2), H5T_BIT_MSB, 1);
|
||||
n = H5T__bit_find (v2, (size_t)0, 8*sizeof(v2), H5T_BIT_MSB, 1);
|
||||
if (size>0 && (size_t)(n+1)!=d_offset+size) {
|
||||
H5_FAILED();
|
||||
printf (" Unable to find last set bit in destination "
|
||||
@ -751,7 +751,7 @@ test_set (void)
|
||||
puts (" Found set bits but shouldn't have (reverse)!");
|
||||
goto failed;
|
||||
}
|
||||
n = H5T_bit_find (v2, (size_t)0, d_offset+size, H5T_BIT_MSB, 0);
|
||||
n = H5T__bit_find (v2, (size_t)0, d_offset+size, H5T_BIT_MSB, 0);
|
||||
if (d_offset>0 && n+1!=(ssize_t)d_offset) {
|
||||
H5_FAILED();
|
||||
printf (" Unable to find beginning of set bit region "
|
||||
@ -812,7 +812,7 @@ test_clear (void)
|
||||
memset (v2, 0xff, sizeof v2);
|
||||
|
||||
/* Clear some bits in v2 */
|
||||
H5T_bit_set (v2, d_offset, size, FALSE);
|
||||
H5T__bit_set (v2, d_offset, size, FALSE);
|
||||
for (j=0; j<(int)sizeof(v2); j++) if (0xff!=v2[j]) break;
|
||||
if (size>0 && j>=(int)sizeof(v2)) {
|
||||
H5_FAILED();
|
||||
@ -827,7 +827,7 @@ test_clear (void)
|
||||
|
||||
|
||||
/* Look for the zeros and ones */
|
||||
n = H5T_bit_find (v2, (size_t)0, 8*sizeof(v2), H5T_BIT_LSB, 0);
|
||||
n = H5T__bit_find (v2, (size_t)0, 8*sizeof(v2), H5T_BIT_LSB, 0);
|
||||
if (size>0 && n!=(ssize_t)d_offset) {
|
||||
H5_FAILED();
|
||||
printf (" Unable to find first cleared bit in destination "
|
||||
@ -839,7 +839,7 @@ test_clear (void)
|
||||
puts (" Found cleared bits and shouldn't have!");
|
||||
goto failed;
|
||||
}
|
||||
n = H5T_bit_find (v2, d_offset, 8*sizeof(v2)-d_offset, H5T_BIT_LSB, 1);
|
||||
n = H5T__bit_find (v2, d_offset, 8*sizeof(v2)-d_offset, H5T_BIT_LSB, 1);
|
||||
if (d_offset+size<8*sizeof(v2) && n!=(ssize_t)size) {
|
||||
H5_FAILED();
|
||||
printf (" Unable to find last cleared bit in destination "
|
||||
@ -856,7 +856,7 @@ test_clear (void)
|
||||
* Look for zeros and ones in reverse order. This is only to test
|
||||
* that reverse searches work as expected.
|
||||
*/
|
||||
n = H5T_bit_find (v2, (size_t)0, 8*sizeof(v2), H5T_BIT_MSB, 0);
|
||||
n = H5T__bit_find (v2, (size_t)0, 8*sizeof(v2), H5T_BIT_MSB, 0);
|
||||
if (size>0 && (size_t)(n+1)!=d_offset+size) {
|
||||
H5_FAILED();
|
||||
printf (" Unable to find last cleared bit in destination "
|
||||
@ -868,7 +868,7 @@ test_clear (void)
|
||||
puts (" Found cleared bits but shouldn't have (reverse)!");
|
||||
goto failed;
|
||||
}
|
||||
n = H5T_bit_find (v2, (size_t)0, d_offset+size, H5T_BIT_MSB, 1);
|
||||
n = H5T__bit_find (v2, (size_t)0, d_offset+size, H5T_BIT_MSB, 1);
|
||||
if (d_offset>0 && n+1!=(ssize_t)d_offset) {
|
||||
H5_FAILED();
|
||||
printf (" Unable to find beginning of cleared bit region "
|
||||
|
@ -2183,7 +2183,7 @@ main (int argc, char *argv[])
|
||||
fprintf(stderr, "usage: %s [--noopt]\n", argv[0]);
|
||||
exit(1);
|
||||
}
|
||||
H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_struct_opt);
|
||||
H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T__conv_struct_opt);
|
||||
}
|
||||
|
||||
/* Create the file */
|
||||
|
114
test/dt_arith.c
114
test/dt_arith.c
@ -306,9 +306,9 @@ static int without_hardware_g = 0;
|
||||
*00000111,..., until 11111111.*/ \
|
||||
memset(tmp1, 0, SRC_SIZE); \
|
||||
memset(tmp2, 0, SRC_SIZE); \
|
||||
H5T_bit_set (tmp2, SRC_PREC-1, (size_t)1, TRUE); /*the negative value*/ \
|
||||
H5T__bit_set (tmp2, SRC_PREC-1, (size_t)1, TRUE); /*the negative value*/ \
|
||||
for(n=0; n<SRC_MANT_DIG-1; n++) { \
|
||||
H5T_bit_set (tmp1, n, (size_t)1, TRUE); /*turn on 1 bit each time*/ \
|
||||
H5T__bit_set (tmp1, n, (size_t)1, TRUE); /*turn on 1 bit each time*/ \
|
||||
CHANGE_ORDER(tmp1, SRC_ORDR, SRC_SIZE); /*change order for big endian*/ \
|
||||
memcpy(buf_p, tmp1, SRC_SIZE); \
|
||||
memcpy(saved_p, tmp1, SRC_SIZE); \
|
||||
@ -317,7 +317,7 @@ static int without_hardware_g = 0;
|
||||
saved_p += SRC_SIZE; \
|
||||
\
|
||||
/*negative values*/ \
|
||||
H5T_bit_set (tmp2, n, (size_t)1, TRUE); \
|
||||
H5T__bit_set (tmp2, n, (size_t)1, TRUE); \
|
||||
CHANGE_ORDER(tmp2, SRC_ORDR, SRC_SIZE); \
|
||||
memcpy(buf_p, tmp2, SRC_SIZE); \
|
||||
memcpy(saved_p, tmp2, SRC_SIZE); \
|
||||
@ -353,7 +353,7 @@ static int without_hardware_g = 0;
|
||||
buf_p = BUF; \
|
||||
\
|
||||
/* +0 */ \
|
||||
H5T_bit_set(value, (size_t)0, SRC_PREC, FALSE); \
|
||||
H5T__bit_set(value, (size_t)0, SRC_PREC, FALSE); \
|
||||
memcpy(buf_p, value, SRC_SIZE*sizeof(unsigned char)); \
|
||||
buf_p += SRC_SIZE; \
|
||||
\
|
||||
@ -361,7 +361,7 @@ static int without_hardware_g = 0;
|
||||
if(n==1) { \
|
||||
memset(value, 0, SRC_SIZE*sizeof(unsigned char)); \
|
||||
/* -0 */ \
|
||||
H5T_bit_set(value, (size_t)(SRC_PREC - 1), (size_t)1, TRUE); \
|
||||
H5T__bit_set(value, (size_t)(SRC_PREC - 1), (size_t)1, TRUE); \
|
||||
CHANGE_ORDER(value, SRC_ORDR, SRC_SIZE);/*change order for big endian*/ \
|
||||
HDmemcpy(buf_p, value, SRC_SIZE*sizeof(unsigned char)); \
|
||||
CHANGE_ORDER(value, SRC_ORDR, SRC_SIZE);/*change back the order for bit operation*/ \
|
||||
@ -369,21 +369,21 @@ static int without_hardware_g = 0;
|
||||
} \
|
||||
\
|
||||
/* +/-infinity */ \
|
||||
H5T_bit_set(value, (size_t)(SRC_MANT_DIG - 1), SRC_PREC-SRC_MANT_DIG, TRUE); \
|
||||
H5T__bit_set(value, (size_t)(SRC_MANT_DIG - 1), SRC_PREC-SRC_MANT_DIG, TRUE); \
|
||||
CHANGE_ORDER(value, SRC_ORDR, SRC_SIZE); /*change order for big endian*/ \
|
||||
HDmemcpy(buf_p, value, SRC_SIZE*sizeof(unsigned char)); \
|
||||
CHANGE_ORDER(value, SRC_ORDR, SRC_SIZE); /*change back the order for bit operation*/ \
|
||||
buf_p += SRC_SIZE; \
|
||||
\
|
||||
/* +/-SNaN */ \
|
||||
H5T_bit_set(value, (size_t)0, (size_t)1, TRUE); \
|
||||
H5T__bit_set(value, (size_t)0, (size_t)1, TRUE); \
|
||||
CHANGE_ORDER(value, SRC_ORDR, SRC_SIZE); /*change order for big endian*/ \
|
||||
HDmemcpy(buf_p, value, SRC_SIZE * sizeof(unsigned char)); \
|
||||
CHANGE_ORDER(value, SRC_ORDR, SRC_SIZE); /*change back the order for bit operation*/ \
|
||||
buf_p += SRC_SIZE; \
|
||||
\
|
||||
/* +/-QNaN */ \
|
||||
H5T_bit_set(value, (size_t)(SRC_MANT_DIG - 2), (size_t)1, TRUE); \
|
||||
H5T__bit_set(value, (size_t)(SRC_MANT_DIG - 2), (size_t)1, TRUE); \
|
||||
CHANGE_ORDER(value, SRC_ORDR, SRC_SIZE); /*change order for big endian*/ \
|
||||
HDmemcpy(buf_p, value, SRC_SIZE*sizeof(unsigned char)); \
|
||||
CHANGE_ORDER(value, SRC_ORDR, SRC_SIZE); /*change back the order for bit operation*/ \
|
||||
@ -634,7 +634,7 @@ test_hard_query(void)
|
||||
|
||||
/* Unregister the hard conversion from int to float. Verify the conversion
|
||||
* is a soft conversion. */
|
||||
H5Tunregister(H5T_PERS_HARD, NULL, H5T_NATIVE_INT, H5T_NATIVE_FLOAT, H5T_conv_int_float);
|
||||
H5Tunregister(H5T_PERS_HARD, NULL, H5T_NATIVE_INT, H5T_NATIVE_FLOAT, H5T__conv_int_float);
|
||||
if(H5Tcompiler_conv(H5T_NATIVE_INT, H5T_NATIVE_FLOAT) != FALSE) {
|
||||
H5_FAILED();
|
||||
printf("Can't query conversion function\n");
|
||||
@ -643,7 +643,7 @@ test_hard_query(void)
|
||||
|
||||
/* Register the hard conversion from int to float. Verify the conversion
|
||||
* is a hard conversion. */
|
||||
H5Tregister(H5T_PERS_HARD, "int_flt", H5T_NATIVE_INT, H5T_NATIVE_FLOAT, H5T_conv_int_float);
|
||||
H5Tregister(H5T_PERS_HARD, "int_flt", H5T_NATIVE_INT, H5T_NATIVE_FLOAT, H5T__conv_int_float);
|
||||
if(H5Tcompiler_conv(H5T_NATIVE_INT, H5T_NATIVE_FLOAT) != TRUE) {
|
||||
H5_FAILED();
|
||||
printf("Can't query conversion function\n");
|
||||
@ -2337,92 +2337,92 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst)
|
||||
*/
|
||||
if (H5T_SGN_2==src_sign && H5T_SGN_2==dst_sign) {
|
||||
if (src_nbits>dst_nbits) {
|
||||
if(0==H5T_bit_get_d(src_bits, src_nbits-1, (size_t)1) &&
|
||||
H5T_bit_find(src_bits, dst_nbits-1, (src_nbits-dst_nbits),
|
||||
if(0==H5T__bit_get_d(src_bits, src_nbits-1, (size_t)1) &&
|
||||
H5T__bit_find(src_bits, dst_nbits-1, (src_nbits-dst_nbits),
|
||||
H5T_BIT_MSB, 1)>=0) {
|
||||
/*
|
||||
* Source is positive and the magnitude is too large for
|
||||
* the destination. The destination should be set to the
|
||||
* maximum possible value: 0x7f...f
|
||||
*/
|
||||
if (0==H5T_bit_get_d(dst_bits, dst_nbits-1, (size_t)1) &&
|
||||
H5T_bit_find(dst_bits, (size_t)0, dst_nbits-1, H5T_BIT_LSB, 0) < 0)
|
||||
if (0==H5T__bit_get_d(dst_bits, dst_nbits-1, (size_t)1) &&
|
||||
H5T__bit_find(dst_bits, (size_t)0, dst_nbits-1, H5T_BIT_LSB, 0) < 0)
|
||||
continue; /*no error*/
|
||||
} else if (1==H5T_bit_get_d(src_bits, src_nbits-1, (size_t)1) &&
|
||||
H5T_bit_find(src_bits, (size_t)0, src_nbits-1, H5T_BIT_MSB,
|
||||
} else if (1==H5T__bit_get_d(src_bits, src_nbits-1, (size_t)1) &&
|
||||
H5T__bit_find(src_bits, (size_t)0, src_nbits-1, H5T_BIT_MSB,
|
||||
0)+1>=(ssize_t)dst_nbits) {
|
||||
/*
|
||||
* Source is negative but the magnitude is too large for
|
||||
* the destination. The destination should be set to the
|
||||
* smallest possible value: 0x80...0
|
||||
*/
|
||||
if (1==H5T_bit_get_d(dst_bits, dst_nbits-1, (size_t)1) &&
|
||||
H5T_bit_find(dst_bits, (size_t)0, dst_nbits-1, H5T_BIT_LSB, 1) < 0)
|
||||
if (1==H5T__bit_get_d(dst_bits, dst_nbits-1, (size_t)1) &&
|
||||
H5T__bit_find(dst_bits, (size_t)0, dst_nbits-1, H5T_BIT_LSB, 1) < 0)
|
||||
continue; /*no error*/
|
||||
}
|
||||
} else if(src_nbits<dst_nbits) {
|
||||
/* Source is smaller than the destination */
|
||||
if(0==H5T_bit_get_d(src_bits, src_nbits-1, (size_t)1)) {
|
||||
if(0==H5T__bit_get_d(src_bits, src_nbits-1, (size_t)1)) {
|
||||
/*
|
||||
* Source is positive, so the excess bits in the
|
||||
* destination should be set to 0's.
|
||||
*/
|
||||
if (0==H5T_bit_get_d(dst_bits, src_nbits-1, (size_t)1) &&
|
||||
H5T_bit_find(dst_bits, src_nbits, dst_nbits-src_nbits, H5T_BIT_LSB, 1) < 0)
|
||||
if (0==H5T__bit_get_d(dst_bits, src_nbits-1, (size_t)1) &&
|
||||
H5T__bit_find(dst_bits, src_nbits, dst_nbits-src_nbits, H5T_BIT_LSB, 1) < 0)
|
||||
continue; /*no error*/
|
||||
} else {
|
||||
/*
|
||||
* Source is negative, so the excess bits in the
|
||||
* destination should be set to 1's.
|
||||
*/
|
||||
if (1==H5T_bit_get_d(dst_bits, src_nbits-1, (size_t)1) &&
|
||||
H5T_bit_find(dst_bits, src_nbits, dst_nbits-src_nbits, H5T_BIT_LSB, 0) < 0)
|
||||
if (1==H5T__bit_get_d(dst_bits, src_nbits-1, (size_t)1) &&
|
||||
H5T__bit_find(dst_bits, src_nbits, dst_nbits-src_nbits, H5T_BIT_LSB, 0) < 0)
|
||||
continue; /*no error*/
|
||||
}
|
||||
}
|
||||
} else if (H5T_SGN_2==src_sign && H5T_SGN_NONE==dst_sign) {
|
||||
if (H5T_bit_get_d(src_bits, src_nbits-1, (size_t)1)) {
|
||||
if (H5T__bit_get_d(src_bits, src_nbits-1, (size_t)1)) {
|
||||
/*
|
||||
* The source is negative so the result should be zero.
|
||||
* The source is negative if the most significant bit is
|
||||
* set. The destination is zero if all bits are zero.
|
||||
*/
|
||||
if (H5T_bit_find(dst_bits, (size_t)0, dst_nbits, H5T_BIT_LSB, 1) < 0)
|
||||
if (H5T__bit_find(dst_bits, (size_t)0, dst_nbits, H5T_BIT_LSB, 1) < 0)
|
||||
continue; /*no error*/
|
||||
} else if (src_nbits>dst_nbits &&
|
||||
H5T_bit_find(src_bits, dst_nbits-1,
|
||||
H5T__bit_find(src_bits, dst_nbits-1,
|
||||
src_nbits-dst_nbits, H5T_BIT_LSB, 1)>=0) {
|
||||
/*
|
||||
* The source is a value with a magnitude too large for
|
||||
* the destination. The destination should be the
|
||||
* largest possible value: 0xff...f
|
||||
*/
|
||||
if (H5T_bit_find(dst_bits, (size_t)0, dst_nbits, H5T_BIT_LSB, 0) < 0)
|
||||
if (H5T__bit_find(dst_bits, (size_t)0, dst_nbits, H5T_BIT_LSB, 0) < 0)
|
||||
continue; /*no error*/
|
||||
}
|
||||
} else if (H5T_SGN_NONE==src_sign && H5T_SGN_2==dst_sign) {
|
||||
if (src_nbits>=dst_nbits &&
|
||||
H5T_bit_find(src_bits, dst_nbits-1, (src_nbits-dst_nbits)+1,
|
||||
H5T__bit_find(src_bits, dst_nbits-1, (src_nbits-dst_nbits)+1,
|
||||
H5T_BIT_LSB, 1)>=0) {
|
||||
/*
|
||||
* The source value has a magnitude that is larger than
|
||||
* the destination can handle. The destination should be
|
||||
* set to the largest possible positive value: 0x7f...f
|
||||
*/
|
||||
if (0==H5T_bit_get_d(dst_bits, dst_nbits-1, (size_t)1) &&
|
||||
H5T_bit_find(dst_bits, (size_t)0, dst_nbits-1, H5T_BIT_LSB, 0) < 0)
|
||||
if (0==H5T__bit_get_d(dst_bits, dst_nbits-1, (size_t)1) &&
|
||||
H5T__bit_find(dst_bits, (size_t)0, dst_nbits-1, H5T_BIT_LSB, 0) < 0)
|
||||
continue; /*no error*/
|
||||
}
|
||||
} else {
|
||||
if (src_nbits>dst_nbits &&
|
||||
H5T_bit_find(src_bits, dst_nbits, src_nbits-dst_nbits,
|
||||
H5T__bit_find(src_bits, dst_nbits, src_nbits-dst_nbits,
|
||||
H5T_BIT_LSB, 1)>=0) {
|
||||
/*
|
||||
* The unsigned source has a value which is too large for
|
||||
* the unsigned destination. The destination should be
|
||||
* set to the largest possible value: 0xff...f
|
||||
*/
|
||||
if (H5T_bit_find(dst_bits, (size_t)0, dst_nbits, H5T_BIT_LSB, 0) < 0)
|
||||
if (H5T__bit_find(dst_bits, (size_t)0, dst_nbits, H5T_BIT_LSB, 0) < 0)
|
||||
continue; /*no error*/
|
||||
}
|
||||
}
|
||||
@ -2610,8 +2610,8 @@ error:
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: test_conv_int_2
|
||||
*
|
||||
* Purpose: Tests overlap calculates in H5T_conv_i_i(), which should be
|
||||
* the same as for H5T_conv_f_f() and H5T_conv_s_s().
|
||||
* Purpose: Tests overlap calculates in H5T__conv_i_i(), which should be
|
||||
* the same as for H5T__conv_f_f() and H5T__conv_s_s().
|
||||
*
|
||||
* Return: Success: 0
|
||||
*
|
||||
@ -2648,7 +2648,7 @@ test_conv_int_2(void)
|
||||
|
||||
/*
|
||||
* Conversion. If overlap calculations aren't right then an
|
||||
* assertion will fail in H5T_conv_i_i()
|
||||
* assertion will fail in H5T__conv_i_i()
|
||||
*/
|
||||
H5Tconvert(src_type, dst_type, (size_t)100, buf, NULL, H5P_DEFAULT);
|
||||
H5Tclose(src_type);
|
||||
@ -2788,8 +2788,8 @@ my_isinf(int endian, unsigned char *val, size_t size,
|
||||
bits[size-(i+1)] = *(val + ENDIAN(size, i, endian));
|
||||
#endif /*H5_VMS*/
|
||||
|
||||
if(H5T_bit_find(bits, mpos, msize, H5T_BIT_LSB, 1) < 0 &&
|
||||
H5T_bit_find(bits, epos, esize, H5T_BIT_LSB, 0) < 0)
|
||||
if(H5T__bit_find(bits, mpos, msize, H5T_BIT_LSB, 1) < 0 &&
|
||||
H5T__bit_find(bits, epos, esize, H5T_BIT_LSB, 0) < 0)
|
||||
retval = 1;
|
||||
|
||||
free(bits);
|
||||
@ -3321,7 +3321,7 @@ test_conv_flt_1 (const char *name, int run_test, hid_t src, hid_t dst)
|
||||
}
|
||||
}
|
||||
|
||||
expo = H5T_bit_get_d(tmp, src_epos, src_esize);
|
||||
expo = H5T__bit_get_d(tmp, src_epos, src_esize);
|
||||
if(expo==0)
|
||||
continue; /* Denormalized floating-point value detected */
|
||||
else {
|
||||
@ -3341,7 +3341,7 @@ test_conv_flt_1 (const char *name, int run_test, hid_t src, hid_t dst)
|
||||
}
|
||||
}
|
||||
|
||||
expo = H5T_bit_get_d(tmp, dst_epos, dst_esize);
|
||||
expo = H5T__bit_get_d(tmp, dst_epos, dst_esize);
|
||||
if(expo==0)
|
||||
continue; /* Denormalized floating-point value detected */
|
||||
else {
|
||||
@ -4348,7 +4348,7 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst)
|
||||
)
|
||||
&& (INT_SCHAR==dst_type || INT_SHORT==dst_type || INT_INT==dst_type
|
||||
|| INT_LONG==dst_type || INT_LLONG==dst_type)) {
|
||||
if(0==H5T_bit_get_d(src_bits, src_nbits-1, (size_t)1) &&
|
||||
if(0==H5T__bit_get_d(src_bits, src_nbits-1, (size_t)1) &&
|
||||
overflows(src_bits, src, dst_nbits-1)) {
|
||||
/*
|
||||
* Source is positive and the magnitude is too large for
|
||||
@ -4356,15 +4356,15 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst)
|
||||
* maximum possible value: 0x7f...f
|
||||
*/
|
||||
if(!except_set) {
|
||||
if (0==H5T_bit_get_d(dst_bits, dst_nbits-1, (size_t)1) &&
|
||||
H5T_bit_find(dst_bits, (size_t)0, dst_nbits-1, H5T_BIT_LSB, 0) < 0)
|
||||
if (0==H5T__bit_get_d(dst_bits, dst_nbits-1, (size_t)1) &&
|
||||
H5T__bit_find(dst_bits, (size_t)0, dst_nbits-1, H5T_BIT_LSB, 0) < 0)
|
||||
continue; /*no error*/
|
||||
} else {
|
||||
/* fill_value is small so we know only the 1st byte is set */
|
||||
if (dst_bits[0] == fill_value)
|
||||
continue; /*no error*/
|
||||
}
|
||||
} else if (1==H5T_bit_get_d(src_bits, src_nbits-1, (size_t)1) &&
|
||||
} else if (1==H5T__bit_get_d(src_bits, src_nbits-1, (size_t)1) &&
|
||||
overflows(src_bits, src, dst_nbits-1)) {
|
||||
/*
|
||||
* Source is negative but the magnitude is too large for
|
||||
@ -4372,8 +4372,8 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst)
|
||||
* smallest possible value: 0x80...0
|
||||
*/
|
||||
if(!except_set) {
|
||||
if (1==H5T_bit_get_d(dst_bits, dst_nbits-1, (size_t)1) &&
|
||||
H5T_bit_find(dst_bits, (size_t)0, dst_nbits-1, H5T_BIT_LSB, 1) < 0)
|
||||
if (1==H5T__bit_get_d(dst_bits, dst_nbits-1, (size_t)1) &&
|
||||
H5T__bit_find(dst_bits, (size_t)0, dst_nbits-1, H5T_BIT_LSB, 1) < 0)
|
||||
continue; /*no error*/
|
||||
} else {
|
||||
if (dst_bits[0] == fill_value)
|
||||
@ -4389,14 +4389,14 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst)
|
||||
)
|
||||
&& (INT_UCHAR==dst_type || INT_USHORT==dst_type || INT_UINT==dst_type
|
||||
|| INT_ULONG==dst_type || INT_ULLONG==dst_type)) {
|
||||
if (H5T_bit_get_d(src_bits, src_nbits-1, (size_t)1)) {
|
||||
if (H5T__bit_get_d(src_bits, src_nbits-1, (size_t)1)) {
|
||||
/*
|
||||
* The source is negative so the result should be zero.
|
||||
* The source is negative if the most significant bit is
|
||||
* set. The destination is zero if all bits are zero.
|
||||
*/
|
||||
if(!except_set) {
|
||||
if (H5T_bit_find(dst_bits, (size_t)0, dst_nbits, H5T_BIT_LSB, 1) < 0)
|
||||
if (H5T__bit_find(dst_bits, (size_t)0, dst_nbits, H5T_BIT_LSB, 1) < 0)
|
||||
continue; /*no error*/
|
||||
} else {
|
||||
if (dst_bits[0] == fill_value)
|
||||
@ -4409,7 +4409,7 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst)
|
||||
* largest possible value: 0xff...f
|
||||
*/
|
||||
if(!except_set) {
|
||||
if (H5T_bit_find(dst_bits, (size_t)0, dst_nbits, H5T_BIT_LSB, 0) < 0)
|
||||
if (H5T__bit_find(dst_bits, (size_t)0, dst_nbits, H5T_BIT_LSB, 0) < 0)
|
||||
continue; /*no error*/
|
||||
} else {
|
||||
if (dst_bits[0] == fill_value)
|
||||
@ -4757,13 +4757,13 @@ overflows(unsigned char *origin_bits, hid_t src_id, size_t dst_num_bits)
|
||||
HDmemcpy(bits, origin_bits, src_prec/8+1);
|
||||
|
||||
/*Check for special cases: +Inf, -Inf*/
|
||||
if (H5T_bit_find (bits, mpos, mant_digits, H5T_BIT_LSB, TRUE) < 0) {
|
||||
if (H5T_bit_find (bits, epos, expt_digits, H5T_BIT_LSB, FALSE) < 0) {
|
||||
if (H5T__bit_find (bits, mpos, mant_digits, H5T_BIT_LSB, TRUE) < 0) {
|
||||
if (H5T__bit_find (bits, epos, expt_digits, H5T_BIT_LSB, FALSE) < 0) {
|
||||
ret_value=TRUE;
|
||||
goto done;
|
||||
}
|
||||
} else if (H5T_NORM_NONE==norm && H5T_bit_find (bits, mpos, mant_digits-1,
|
||||
H5T_BIT_LSB, TRUE) < 0 && H5T_bit_find (bits, epos, expt_digits,
|
||||
} else if (H5T_NORM_NONE==norm && H5T__bit_find (bits, mpos, mant_digits-1,
|
||||
H5T_BIT_LSB, TRUE) < 0 && H5T__bit_find (bits, epos, expt_digits,
|
||||
H5T_BIT_LSB, FALSE) < 0) {
|
||||
/*This is a special case for the source of no implied mantissa bit.
|
||||
*If the exponent bits are all 1s and only the 1st bit of mantissa
|
||||
@ -4773,7 +4773,7 @@ overflows(unsigned char *origin_bits, hid_t src_id, size_t dst_num_bits)
|
||||
}
|
||||
|
||||
/* get exponent */
|
||||
expt = H5T_bit_get_d(bits, mant_digits, expt_digits) - bias;
|
||||
expt = H5T__bit_get_d(bits, mant_digits, expt_digits) - bias;
|
||||
|
||||
if(expt>=(dst_num_bits-1)) {
|
||||
ret_value=TRUE;
|
||||
@ -4781,19 +4781,19 @@ overflows(unsigned char *origin_bits, hid_t src_id, size_t dst_num_bits)
|
||||
}
|
||||
|
||||
/* get significand */
|
||||
H5T_bit_copy (mant_bits, (size_t)0, bits, (size_t)0, mant_digits);
|
||||
H5T__bit_copy (mant_bits, (size_t)0, bits, (size_t)0, mant_digits);
|
||||
|
||||
|
||||
/* restore implicit bit if normalization is implied*/
|
||||
if(norm == H5T_NORM_IMPLIED) {
|
||||
H5T_bit_inc(mant_bits, mant_digits, (size_t)1);
|
||||
H5T__bit_inc(mant_bits, mant_digits, (size_t)1);
|
||||
mant_digits++;
|
||||
}
|
||||
|
||||
/* shift significand */
|
||||
H5T_bit_shift (mant_bits, (ssize_t)(expt-expt_digits), (size_t)0, (size_t)(32 * 8));
|
||||
H5T__bit_shift (mant_bits, (ssize_t)(expt-expt_digits), (size_t)0, (size_t)(32 * 8));
|
||||
|
||||
indx = H5T_bit_find(mant_bits, (size_t)0, (size_t)(32 * 8), H5T_BIT_MSB, 1);
|
||||
indx = H5T__bit_find(mant_bits, (size_t)0, (size_t)(32 * 8), H5T_BIT_MSB, 1);
|
||||
|
||||
if((size_t)indx>=dst_num_bits)
|
||||
ret_value=TRUE;
|
||||
|
@ -111,6 +111,7 @@ test_1a(hid_t file)
|
||||
char name[256]; /*external file name */
|
||||
off_t file_offset; /*external file offset */
|
||||
hsize_t file_size; /*sizeof external file segment */
|
||||
haddr_t dset_addr; /*address of dataset */
|
||||
|
||||
TESTING("fixed-size data space, exact storage");
|
||||
|
||||
@ -130,7 +131,10 @@ test_1a(hid_t file)
|
||||
if((dset = H5Dopen2(file, "dset1", H5P_DEFAULT)) < 0) goto error;
|
||||
|
||||
/* Test dataset address. Should be undefined. */
|
||||
if(H5Dget_offset(dset) != HADDR_UNDEF) goto error;
|
||||
H5E_BEGIN_TRY {
|
||||
dset_addr = H5Dget_offset(dset);
|
||||
} H5E_END_TRY;
|
||||
if(dset_addr != HADDR_UNDEF) goto error;
|
||||
|
||||
if((dcpl = H5Dget_create_plist(dset)) < 0) goto error;
|
||||
if((n = H5Pget_external_count(dcpl)) < 0) goto error;
|
||||
|
@ -44,13 +44,13 @@ HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs):
|
||||
#000: (file name) line (number) in H5Dread(): can't read data
|
||||
major: Dataset
|
||||
minor: Read failed
|
||||
#001: (file name) line (number) in H5D_read(): can't read data
|
||||
#001: (file name) line (number) in H5D__read(): can't read data
|
||||
major: Dataset
|
||||
minor: Read failed
|
||||
#002: (file name) line (number) in H5D_chunk_read(): unable to read raw data chunk
|
||||
#002: (file name) line (number) in H5D__chunk_read(): unable to read raw data chunk
|
||||
major: Low-level I/O
|
||||
minor: Read failed
|
||||
#003: (file name) line (number) in H5D_chunk_lock(): data pipeline read failed
|
||||
#003: (file name) line (number) in H5D__chunk_lock(): data pipeline read failed
|
||||
major: Data filters
|
||||
minor: Filter operation failed
|
||||
#004: (file name) line (number) in H5Z_pipeline(): required filter 'bogus' is not registered
|
||||
|
84
test/tmisc.c
84
test/tmisc.c
@ -3460,14 +3460,14 @@ test_misc20(void)
|
||||
CHECK(did, FAIL, "H5Dopen2");
|
||||
|
||||
/* Get the layout version */
|
||||
ret = H5D_layout_version_test(did,&version);
|
||||
CHECK(ret, FAIL, "H5D_layout_version_test");
|
||||
VERIFY(version, 3, "H5D_layout_version_test");
|
||||
ret = H5D__layout_version_test(did,&version);
|
||||
CHECK(ret, FAIL, "H5D__layout_version_test");
|
||||
VERIFY(version, 3, "H5D__layout_version_test");
|
||||
|
||||
/* Get the layout contiguous storage size */
|
||||
ret = H5D_layout_contig_size_test(did,&contig_size);
|
||||
CHECK(ret, FAIL, "H5D_layout_contig_size_test");
|
||||
VERIFY(contig_size, (MISC20_SPACE_DIM0 * MISC20_SPACE_DIM1 * H5Tget_size(H5T_NATIVE_INT)), "H5D_layout_contig_size_test");
|
||||
ret = H5D__layout_contig_size_test(did,&contig_size);
|
||||
CHECK(ret, FAIL, "H5D__layout_contig_size_test");
|
||||
VERIFY(contig_size, (MISC20_SPACE_DIM0 * MISC20_SPACE_DIM1 * H5Tget_size(H5T_NATIVE_INT)), "H5D__layout_contig_size_test");
|
||||
|
||||
/* Close datasset */
|
||||
ret = H5Dclose(did);
|
||||
@ -3478,14 +3478,14 @@ test_misc20(void)
|
||||
CHECK(did, FAIL, "H5Dopen2");
|
||||
|
||||
/* Get the layout version */
|
||||
ret = H5D_layout_version_test(did,&version);
|
||||
CHECK(ret, FAIL, "H5D_layout_version_test");
|
||||
VERIFY(version, 3, "H5D_layout_version_test");
|
||||
ret = H5D__layout_version_test(did,&version);
|
||||
CHECK(ret, FAIL, "H5D__layout_version_test");
|
||||
VERIFY(version, 3, "H5D__layout_version_test");
|
||||
|
||||
/* Get the layout contiguous storage size */
|
||||
ret = H5D_layout_contig_size_test(did,&contig_size);
|
||||
CHECK(ret, FAIL, "H5D_layout_contig_size_test");
|
||||
VERIFY(contig_size, (MISC20_SPACE2_DIM0 * MISC20_SPACE2_DIM1 * H5Tget_size(H5T_NATIVE_INT)), "H5D_layout_contig_size_test");
|
||||
ret = H5D__layout_contig_size_test(did,&contig_size);
|
||||
CHECK(ret, FAIL, "H5D__layout_contig_size_test");
|
||||
VERIFY(contig_size, (MISC20_SPACE2_DIM0 * MISC20_SPACE2_DIM1 * H5Tget_size(H5T_NATIVE_INT)), "H5D__layout_contig_size_test");
|
||||
|
||||
/* Close datasset */
|
||||
ret = H5Dclose(did);
|
||||
@ -3508,14 +3508,14 @@ test_misc20(void)
|
||||
CHECK(did, FAIL, "H5Dopen2");
|
||||
|
||||
/* Get the layout version */
|
||||
ret = H5D_layout_version_test(did,&version);
|
||||
CHECK(ret, FAIL, "H5D_layout_version_test");
|
||||
VERIFY(version, 2, "H5D_layout_version_test");
|
||||
ret = H5D__layout_version_test(did,&version);
|
||||
CHECK(ret, FAIL, "H5D__layout_version_test");
|
||||
VERIFY(version, 2, "H5D__layout_version_test");
|
||||
|
||||
/* Get the layout contiguous storage size */
|
||||
ret = H5D_layout_contig_size_test(did,&contig_size);
|
||||
CHECK(ret, FAIL, "H5D_layout_contig_size_test");
|
||||
VERIFY(contig_size, (MISC20_SPACE_DIM0 * MISC20_SPACE_DIM1 * H5Tget_size(H5T_STD_I32LE)), "H5D_layout_contig_size_test");
|
||||
ret = H5D__layout_contig_size_test(did,&contig_size);
|
||||
CHECK(ret, FAIL, "H5D__layout_contig_size_test");
|
||||
VERIFY(contig_size, (MISC20_SPACE_DIM0 * MISC20_SPACE_DIM1 * H5Tget_size(H5T_STD_I32LE)), "H5D__layout_contig_size_test");
|
||||
|
||||
/* Close datasset */
|
||||
ret = H5Dclose(did);
|
||||
@ -4963,10 +4963,10 @@ test_misc28(void)
|
||||
CHECK(did, FAIL, "H5Dcreate2");
|
||||
|
||||
/* Verify that the chunk cache is empty */
|
||||
ret = H5D_current_cache_size_test(did, &nbytes_used, &nused);
|
||||
CHECK(ret, FAIL, "H5D_current_cache_size_test");
|
||||
VERIFY(nbytes_used, (size_t) 0, "H5D_current_cache_size_test");
|
||||
VERIFY(nused, 0, "H5D_current_cache_size_test");
|
||||
ret = H5D__current_cache_size_test(did, &nbytes_used, &nused);
|
||||
CHECK(ret, FAIL, "H5D__current_cache_size_test");
|
||||
VERIFY(nbytes_used, (size_t) 0, "H5D__current_cache_size_test");
|
||||
VERIFY(nused, 0, "H5D__current_cache_size_test");
|
||||
|
||||
/* Initialize write buffer */
|
||||
for(i=0; i<MISC28_SIZE; i++)
|
||||
@ -4984,10 +4984,10 @@ test_misc28(void)
|
||||
CHECK(ret, FAIL, "H5Dwrite");
|
||||
|
||||
/* Verify that all 10 chunks written have been cached */
|
||||
ret = H5D_current_cache_size_test(did, &nbytes_used, &nused);
|
||||
CHECK(ret, FAIL, "H5D_current_cache_size_test");
|
||||
VERIFY(nbytes_used, (size_t) MISC28_SIZE, "H5D_current_cache_size_test");
|
||||
VERIFY(nused, MISC28_SIZE, "H5D_current_cache_size_test");
|
||||
ret = H5D__current_cache_size_test(did, &nbytes_used, &nused);
|
||||
CHECK(ret, FAIL, "H5D__current_cache_size_test");
|
||||
VERIFY(nbytes_used, (size_t) MISC28_SIZE, "H5D__current_cache_size_test");
|
||||
VERIFY(nused, MISC28_SIZE, "H5D__current_cache_size_test");
|
||||
|
||||
/* Initialize write buffer */
|
||||
for(i=0; i<MISC28_SIZE; i++)
|
||||
@ -5003,10 +5003,10 @@ test_misc28(void)
|
||||
CHECK(ret, FAIL, "H5Dwrite");
|
||||
|
||||
/* Verify that the size of the cache remains at 10 */
|
||||
ret = H5D_current_cache_size_test(did, &nbytes_used, &nused);
|
||||
CHECK(ret, FAIL, "H5D_current_cache_size_test");
|
||||
VERIFY(nbytes_used, (size_t) MISC28_SIZE, "H5D_current_cache_size_test");
|
||||
VERIFY(nused, MISC28_SIZE, "H5D_current_cache_size_test");
|
||||
ret = H5D__current_cache_size_test(did, &nbytes_used, &nused);
|
||||
CHECK(ret, FAIL, "H5D__current_cache_size_test");
|
||||
VERIFY(nbytes_used, (size_t) MISC28_SIZE, "H5D__current_cache_size_test");
|
||||
VERIFY(nused, MISC28_SIZE, "H5D__current_cache_size_test");
|
||||
|
||||
/* Close dataset */
|
||||
ret = H5Dclose(did);
|
||||
@ -5018,10 +5018,10 @@ test_misc28(void)
|
||||
CHECK(did, FAIL, "H5Dopen2");
|
||||
|
||||
/* Verify that the chunk cache is empty */
|
||||
ret = H5D_current_cache_size_test(did, &nbytes_used, &nused);
|
||||
CHECK(ret, FAIL, "H5D_current_cache_size_test");
|
||||
VERIFY(nbytes_used, (size_t) 0, "H5D_current_cache_size_test");
|
||||
VERIFY(nused, 0, "H5D_current_cache_size_test");
|
||||
ret = H5D__current_cache_size_test(did, &nbytes_used, &nused);
|
||||
CHECK(ret, FAIL, "H5D__current_cache_size_test");
|
||||
VERIFY(nbytes_used, (size_t) 0, "H5D__current_cache_size_test");
|
||||
VERIFY(nused, 0, "H5D__current_cache_size_test");
|
||||
|
||||
/* Select hyperslabe for reading */
|
||||
start[1] = 0;
|
||||
@ -5037,10 +5037,10 @@ test_misc28(void)
|
||||
VERIFY(buf[i], i, "H5Dread");
|
||||
|
||||
/* Verify that all 10 chunks read have been cached */
|
||||
ret = H5D_current_cache_size_test(did, &nbytes_used, &nused);
|
||||
CHECK(ret, FAIL, "H5D_current_cache_size_test");
|
||||
VERIFY(nbytes_used, (size_t) MISC28_SIZE, "H5D_current_cache_size_test");
|
||||
VERIFY(nused, MISC28_SIZE, "H5D_current_cache_size_test");
|
||||
ret = H5D__current_cache_size_test(did, &nbytes_used, &nused);
|
||||
CHECK(ret, FAIL, "H5D__current_cache_size_test");
|
||||
VERIFY(nbytes_used, (size_t) MISC28_SIZE, "H5D__current_cache_size_test");
|
||||
VERIFY(nused, MISC28_SIZE, "H5D__current_cache_size_test");
|
||||
|
||||
/* Select new hyperslab */
|
||||
start[1] = 1;
|
||||
@ -5056,10 +5056,10 @@ test_misc28(void)
|
||||
VERIFY(buf[i], MISC28_SIZE - 1 - i, "H5Dread");
|
||||
|
||||
/* Verify that the size of the cache remains at 10 */
|
||||
ret = H5D_current_cache_size_test(did, &nbytes_used, &nused);
|
||||
CHECK(ret, FAIL, "H5D_current_cache_size_test");
|
||||
VERIFY(nbytes_used, (size_t) MISC28_SIZE, "H5D_current_cache_size_test");
|
||||
VERIFY(nused, MISC28_SIZE, "H5D_current_cache_size_test");
|
||||
ret = H5D__current_cache_size_test(did, &nbytes_used, &nused);
|
||||
CHECK(ret, FAIL, "H5D__current_cache_size_test");
|
||||
VERIFY(nbytes_used, (size_t) MISC28_SIZE, "H5D__current_cache_size_test");
|
||||
VERIFY(nused, MISC28_SIZE, "H5D__current_cache_size_test");
|
||||
|
||||
/* Close dataset */
|
||||
ret = H5Dclose(did);
|
||||
|
@ -2534,7 +2534,7 @@ none_selection_chunk(void)
|
||||
* H5D_link_chunk_collective_io, processes report linked chunk I/O
|
||||
*
|
||||
* TEST_ACTUAL_IO_CONTIGUOUS:
|
||||
* H5D_contig_collective_write or H5D_contig_collective_read
|
||||
* H5D__contig_collective_write or H5D__contig_collective_read
|
||||
* each process reports contiguous collective I/O
|
||||
*
|
||||
* TEST_ACTUAL_IO_NO_COLLECTIVE:
|
||||
|
@ -2849,8 +2849,6 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info,
|
||||
hsize_t size; /* size of external file */
|
||||
hsize_t storage_size;
|
||||
hsize_t curr_pos = 0; /* total data element position */
|
||||
hsize_t elmt_counter = 0;/* counts the # elements printed.*/
|
||||
haddr_t ioffset;
|
||||
h5tools_str_t buffer; /* string into which to render */
|
||||
|
||||
/* setup */
|
||||
@ -2860,7 +2858,6 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info,
|
||||
|
||||
storage_size = H5Dget_storage_size(obj_id);
|
||||
nfilters = H5Pget_nfilters(dcpl_id);
|
||||
ioffset = H5Dget_offset(obj_id);
|
||||
HDstrcpy(f_name,"\0");
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
@ -3043,6 +3040,8 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info,
|
||||
h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, ncols, 0, 0);
|
||||
}
|
||||
else {
|
||||
haddr_t ioffset;
|
||||
|
||||
ctx->indent_level++;
|
||||
|
||||
ctx->need_prefix = TRUE;
|
||||
@ -3063,6 +3062,7 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info,
|
||||
h5tools_simple_prefix(stream, info, ctx, curr_pos, 0);
|
||||
|
||||
h5tools_str_reset(&buffer);
|
||||
ioffset = H5Dget_offset(obj_id);
|
||||
h5tools_str_append(&buffer,"OFFSET "H5_PRINTF_HADDR_FMT, ioffset);
|
||||
h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, ncols, 0, 0);
|
||||
|
||||
@ -3375,7 +3375,6 @@ h5tools_dump_comment(FILE *stream, const h5tool_format_t *info,
|
||||
size_t buf_size = 0;
|
||||
size_t ncols = 80; /* available output width */
|
||||
h5tools_str_t buffer; /* string into which to render */
|
||||
hsize_t elmt_counter = 0;/* counts the # elements printed.*/
|
||||
hsize_t curr_pos = ctx->sm_pos; /* total data element position */
|
||||
/* pass to the prefix in h5tools_simple_prefix the total position
|
||||
* instead of the current stripmine position i; this is necessary
|
||||
@ -3429,7 +3428,6 @@ h5tools_dump_attribute(FILE *stream, const h5tool_format_t *info,
|
||||
{
|
||||
h5tools_str_t buffer; /* string into which to render */
|
||||
size_t ncols = 80; /* available output width */
|
||||
hsize_t elmt_counter = 0;/* counts the # elements printed.*/
|
||||
hsize_t curr_pos = ctx->sm_pos; /* total data element position */
|
||||
/* pass to the prefix in h5tools_simple_prefix the total position
|
||||
* instead of the current stripmine position i; this is necessary
|
||||
|
@ -23,33 +23,34 @@
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
#define H5A_PACKAGE /*suppress error about including H5Apkg */
|
||||
#define H5B2_PACKAGE /*suppress error about including H5B2pkg */
|
||||
#define H5A_PACKAGE /*suppress error about including H5Apkg */
|
||||
#define H5B2_PACKAGE /*suppress error about including H5B2pkg */
|
||||
#define H5B2_TESTING /*suppress warning about H5B2 testing funcs*/
|
||||
#define H5EA_PACKAGE /*suppress error about including H5EApkg */
|
||||
#define H5D_PACKAGE /*suppress error about including H5Dpkg */
|
||||
#define H5EA_PACKAGE /*suppress error about including H5EApkg */
|
||||
#define H5EA_TESTING /*suppress warning about H5EA testing funcs*/
|
||||
#define H5FA_PACKAGE /*suppress error about including H5FApkg */
|
||||
#define H5FA_PACKAGE /*suppress error about including H5FApkg */
|
||||
#define H5FA_TESTING /*suppress warning about H5FA testing funcs*/
|
||||
#define H5F_PACKAGE /*suppress error about including H5Fpkg */
|
||||
#define H5G_PACKAGE /*suppress error about including H5Gpkg */
|
||||
#define H5HF_PACKAGE /*suppress error about including H5HFpkg */
|
||||
#define H5O_PACKAGE /*suppress error about including H5Opkg */
|
||||
#define H5SM_PACKAGE /*suppress error about including H5SMpkg */
|
||||
#define H5F_PACKAGE /*suppress error about including H5Fpkg */
|
||||
#define H5G_PACKAGE /*suppress error about including H5Gpkg */
|
||||
#define H5HF_PACKAGE /*suppress error about including H5HFpkg */
|
||||
#define H5O_PACKAGE /*suppress error about including H5Opkg */
|
||||
#define H5SM_PACKAGE /*suppress error about including H5SMpkg */
|
||||
|
||||
#include "H5private.h" /* Generic Functions */
|
||||
#include "H5Apkg.h" /* Attributes */
|
||||
#include "H5B2pkg.h" /* v2 B-trees */
|
||||
#include "H5Dprivate.h" /* Datasets */
|
||||
#include "H5Eprivate.h" /* Error handling */
|
||||
#include "H5EApkg.h" /* Extensible Arrays */
|
||||
#include "H5FApkg.h" /* Fixed Arrays */
|
||||
#include "H5Fpkg.h" /* File access */
|
||||
#include "H5FSprivate.h" /* Free space manager */
|
||||
#include "H5Gpkg.h" /* Groups */
|
||||
#include "H5HFpkg.h" /* Fractal heaps */
|
||||
#include "H5HGprivate.h" /* Global Heaps */
|
||||
#include "H5Iprivate.h" /* IDs */
|
||||
#include "H5Opkg.h" /* Object headers */
|
||||
#include "H5private.h" /* Generic Functions */
|
||||
#include "H5Apkg.h" /* Attributes */
|
||||
#include "H5B2pkg.h" /* v2 B-trees */
|
||||
#include "H5Dpkg.h" /* Datasets */
|
||||
#include "H5Eprivate.h" /* Error handling */
|
||||
#include "H5EApkg.h" /* Extensible Arrays */
|
||||
#include "H5FApkg.h" /* Fixed Arrays */
|
||||
#include "H5Fpkg.h" /* File access */
|
||||
#include "H5FSprivate.h" /* Free space manager */
|
||||
#include "H5Gpkg.h" /* Groups */
|
||||
#include "H5HFpkg.h" /* Fractal heaps */
|
||||
#include "H5HGprivate.h" /* Global Heaps */
|
||||
#include "H5Iprivate.h" /* IDs */
|
||||
#include "H5Opkg.h" /* Object headers */
|
||||
#include "H5SMpkg.h" /* Implicitly shared messages */
|
||||
|
||||
/* File drivers */
|
||||
|
@ -12,13 +12,13 @@ HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs):
|
||||
#000: (file name) line (number) in H5Dread(): can't read data
|
||||
major: Dataset
|
||||
minor: Read failed
|
||||
#001: (file name) line (number) in H5D_read(): can't read data
|
||||
#001: (file name) line (number) in H5D__read(): can't read data
|
||||
major: Dataset
|
||||
minor: Read failed
|
||||
#002: (file name) line (number) in H5D_chunk_read(): unable to read raw data chunk
|
||||
#002: (file name) line (number) in H5D__chunk_read(): unable to read raw data chunk
|
||||
major: Low-level I/O
|
||||
minor: Read failed
|
||||
#003: (file name) line (number) in H5D_chunk_lock(): data pipeline read failed
|
||||
#003: (file name) line (number) in H5D__chunk_lock(): data pipeline read failed
|
||||
major: Data filters
|
||||
minor: Filter operation failed
|
||||
#004: (file name) line (number) in H5Z_pipeline(): required filter 'filter_fail_test' is not registered
|
||||
|
Loading…
x
Reference in New Issue
Block a user