From a68c8c28e9b0c86e7c23ae03edc508582015c5b1 Mon Sep 17 00:00:00 2001 From: Jordan Henderson Date: Mon, 11 Mar 2024 20:17:13 -0500 Subject: [PATCH 1/2] Remove some H5T_copy calls that are now unnecessary Removes some datatype copying calls that are now unnecessary after refactoring the datatype conversion code to use pointers internally rather than IDs Rewrites the enum conversion function so that it uses cached copies of the source and destination datatypes in order to avoid modifying the datatypes passed in Adds a 'recursive' field to the datatype conversion context which allows the conversion functions for members of a container datatype to skip unnecessary repetitive conversion setup code Changes internal datatype conversion callback functions so that the source and destination datatype structure pointers are const Removes some unused and unnecessary internal IDs registered with H5I_register --- src/H5Aint.c | 46 +- src/H5D.c | 4 +- src/H5Dchunk.c | 71 +-- src/H5Dcompact.c | 13 +- src/H5Dcontig.c | 11 +- src/H5Ddeprec.c | 8 +- src/H5Dfill.c | 25 +- src/H5Dint.c | 33 +- src/H5Dio.c | 5 +- src/H5Dpkg.h | 10 +- src/H5Ocopy_ref.c | 6 +- src/H5Ofill.c | 34 +- src/H5Oprivate.h | 2 +- src/H5Pdcpl.c | 20 +- src/H5Sprivate.h | 54 +- src/H5Sselect.c | 2 +- src/H5T.c | 152 +++--- src/H5Tconv.c | 1077 ++++++++++++++++++++++---------------- src/H5Tenum.c | 19 +- src/H5Tpkg.h | 558 +++++++++++--------- src/H5Tprivate.h | 28 +- src/H5VLnative_dataset.c | 2 +- test/dtypes.c | 102 ++++ 23 files changed, 1253 insertions(+), 1029 deletions(-) diff --git a/src/H5Aint.c b/src/H5Aint.c index 160e359f309..626c75b1fe3 100644 --- a/src/H5Aint.c +++ b/src/H5Aint.c @@ -681,9 +681,7 @@ H5A__read(const H5A_t *attr, const H5T_t *mem_type, void *buf) uint8_t *bkg_buf = NULL; /* background buffer */ hssize_t snelmts; /* elements in attribute */ size_t nelmts; /* elements in attribute*/ - H5T_path_t *tpath = NULL; /* type conversion info */ - H5T_t *src_type = NULL; /* temporary datatype */ - H5T_t *dst_type = NULL; /* temporary datatype */ + H5T_path_t *tpath = NULL; /* type conversion info */ size_t src_type_size; /* size of source type */ size_t dst_type_size; /* size of destination type */ size_t buf_size; /* desired buffer size */ @@ -723,11 +721,6 @@ H5A__read(const H5A_t *attr, const H5T_t *mem_type, void *buf) if (!H5T_path_noop(tpath)) { H5T_bkg_t need_bkg; /* Background buffer type */ - if (NULL == (src_type = H5T_copy(attr->shared->dt, H5T_COPY_ALL))) - HGOTO_ERROR(H5E_ATTR, H5E_CANTCOPY, FAIL, "unable to copy attribute datatype"); - if (NULL == (dst_type = H5T_copy(mem_type, H5T_COPY_ALL))) - HGOTO_ERROR(H5E_ATTR, H5E_CANTCOPY, FAIL, "unable to copy memory datatype"); - /* Get the maximum buffer size needed and allocate it */ buf_size = nelmts * MAX(src_type_size, dst_type_size); if (NULL == (tconv_buf = H5FL_BLK_MALLOC(attr_buf, buf_size))) @@ -752,8 +745,8 @@ H5A__read(const H5A_t *attr, const H5T_t *mem_type, void *buf) } /* Perform datatype conversion. */ - if (H5T_convert(tpath, src_type, dst_type, nelmts, (size_t)0, (size_t)0, tconv_buf, bkg_buf) < - 0) + if (H5T_convert(tpath, attr->shared->dt, mem_type, nelmts, (size_t)0, (size_t)0, tconv_buf, + bkg_buf) < 0) HGOTO_ERROR(H5E_ATTR, H5E_CANTCONVERT, FAIL, "datatype conversion failed"); /* Copy the converted data into the user's buffer */ @@ -771,10 +764,6 @@ H5A__read(const H5A_t *attr, const H5T_t *mem_type, void *buf) done: /* Release resources */ - if (src_type && H5T_close(src_type) < 0) - HDONE_ERROR(H5E_ATTR, H5E_CANTCLOSEOBJ, FAIL, "unable to close temporary datatype"); - if (dst_type && H5T_close(dst_type) < 0) - HDONE_ERROR(H5E_ATTR, H5E_CANTCLOSEOBJ, FAIL, "unable to close temporary datatype"); if (tconv_buf) tconv_buf = H5FL_BLK_FREE(attr_buf, tconv_buf); if (bkg_buf) @@ -805,9 +794,7 @@ H5A__write(H5A_t *attr, const H5T_t *mem_type, const void *buf) uint8_t *bkg_buf = NULL; /* temp conversion buffer */ hssize_t snelmts; /* elements in attribute */ size_t nelmts; /* elements in attribute */ - H5T_path_t *tpath = NULL; /* conversion information*/ - H5T_t *src_type = NULL; /* temporary datatype */ - H5T_t *dst_type = NULL; /* temporary datatype */ + H5T_path_t *tpath = NULL; /* conversion information*/ size_t src_type_size; /* size of source type */ size_t dst_type_size; /* size of destination type*/ size_t buf_size; /* desired buffer size */ @@ -843,11 +830,6 @@ H5A__write(H5A_t *attr, const H5T_t *mem_type, const void *buf) if (!H5T_path_noop(tpath)) { H5T_bkg_t need_bkg; /* Background buffer type */ - if (NULL == (src_type = H5T_copy(mem_type, H5T_COPY_ALL))) - HGOTO_ERROR(H5E_ATTR, H5E_CANTCOPY, FAIL, "unable to copy memory datatype"); - if (NULL == (dst_type = H5T_copy(attr->shared->dt, H5T_COPY_ALL))) - HGOTO_ERROR(H5E_ATTR, H5E_CANTCOPY, FAIL, "unable to copy attribute datatype"); - /* Get the maximum buffer size needed and allocate it */ buf_size = nelmts * MAX(src_type_size, dst_type_size); if (NULL == (tconv_buf = H5FL_BLK_MALLOC(attr_buf, buf_size))) @@ -880,7 +862,8 @@ H5A__write(H5A_t *attr, const H5T_t *mem_type, const void *buf) } /* Perform datatype conversion */ - if (H5T_convert(tpath, src_type, dst_type, nelmts, (size_t)0, (size_t)0, tconv_buf, bkg_buf) < 0) + if (H5T_convert(tpath, mem_type, attr->shared->dt, nelmts, (size_t)0, (size_t)0, tconv_buf, + bkg_buf) < 0) HGOTO_ERROR(H5E_ATTR, H5E_CANTCONVERT, FAIL, "datatype conversion failed"); /* Free the previous attribute data buffer, if there is one */ @@ -911,10 +894,6 @@ H5A__write(H5A_t *attr, const H5T_t *mem_type, const void *buf) done: /* Release resources */ - if (src_type && H5T_close(src_type) < 0) - HDONE_ERROR(H5E_ATTR, H5E_CANTCLOSEOBJ, FAIL, "unable to close temporary datatype"); - if (dst_type && H5T_close(dst_type) < 0) - HDONE_ERROR(H5E_ATTR, H5E_CANTCLOSEOBJ, FAIL, "unable to close temporary datatype"); if (tconv_buf) tconv_buf = H5FL_BLK_FREE(attr_buf, tconv_buf); if (bkg_buf) @@ -2084,10 +2063,10 @@ H5A__attr_copy_file(const H5A_t *attr_src, H5F_t *file_dst, bool *recompute_size { H5A_t *attr_dst = NULL; /* Destination attribute */ H5T_t *dt_mem = NULL; /* Memory datatype */ + H5S_t *buf_space = NULL; /* Dataspace describing buffer */ void *buf = NULL; /* Buffer for copying data */ void *reclaim_buf = NULL; /* Buffer for reclaiming data */ void *bkg_buf = NULL; /* Background buffer */ - hid_t buf_sid = -1; /* ID for buffer dataspace */ hssize_t sdst_nelmts; /* # of elements in destination attribute (signed) */ size_t dst_nelmts; /* # of elements in destination attribute */ size_t dst_dt_size; /* Size of destination attribute datatype */ @@ -2200,7 +2179,6 @@ H5A__attr_copy_file(const H5A_t *attr_src, H5F_t *file_dst, bool *recompute_size size_t src_dt_size; /* Source datatype size */ size_t tmp_dt_size; /* Temp. datatype size */ size_t max_dt_size; /* Max atatype size */ - H5S_t *buf_space; /* Dataspace describing buffer */ hsize_t buf_dim; /* Dimension for buffer */ size_t nelmts; /* Number of elements in buffer */ size_t buf_size; /* Size of copy buffer */ @@ -2241,12 +2219,6 @@ H5A__attr_copy_file(const H5A_t *attr_src, H5F_t *file_dst, bool *recompute_size if (NULL == (buf_space = H5S_create_simple((unsigned)1, &buf_dim, NULL))) HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCREATE, NULL, "can't create simple dataspace"); - /* Register */ - if ((buf_sid = H5I_register(H5I_DATASPACE, buf_space, false)) < 0) { - H5S_close(buf_space); - HGOTO_ERROR(H5E_ID, H5E_CANTREGISTER, NULL, "unable to register dataspace ID"); - } /* end if */ - /* Allocate memory for recclaim buf */ if (NULL == (reclaim_buf = H5FL_BLK_MALLOC(attr_buf, buf_size))) HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation NULLed for raw data chunk"); @@ -2304,10 +2276,10 @@ H5A__attr_copy_file(const H5A_t *attr_src, H5F_t *file_dst, bool *recompute_size ret_value = attr_dst; done: - if (buf_sid > 0 && H5I_dec_ref(buf_sid) < 0) - HDONE_ERROR(H5E_ATTR, H5E_CANTFREE, NULL, "can't decrement temporary dataspace ID"); if (dt_mem && (H5T_close(dt_mem) < 0)) HDONE_ERROR(H5E_ATTR, H5E_CANTCLOSEOBJ, NULL, "can't close temporary datatype"); + if (buf_space && H5S_close(buf_space) < 0) + HDONE_ERROR(H5E_ATTR, H5E_CANTCLOSEOBJ, NULL, "can't close temporary dataspace"); if (buf) buf = H5FL_BLK_FREE(attr_buf, buf); if (reclaim_buf) diff --git a/src/H5D.c b/src/H5D.c index 79b945a8e3f..10f647c9cb9 100644 --- a/src/H5D.c +++ b/src/H5D.c @@ -1853,7 +1853,7 @@ H5Dfill(const void *fill, hid_t fill_type_id, void *buf, hid_t buf_type_id, hid_ herr_t H5Diterate(void *buf, hid_t type_id, hid_t space_id, H5D_operator_t op, void *operator_data) { - H5T_t *type; /* Datatype */ + const H5T_t *type; /* Datatype */ H5S_t *space; /* Dataspace for iteration */ H5S_sel_iter_op_t dset_op; /* Operator for iteration */ herr_t ret_value; /* Return value */ @@ -1868,7 +1868,7 @@ H5Diterate(void *buf, hid_t type_id, hid_t space_id, H5D_operator_t op, void *op HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid buffer"); if (H5I_DATATYPE != H5I_get_type(type_id)) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid datatype"); - if (NULL == (type = (H5T_t *)H5I_object_verify(type_id, H5I_DATATYPE))) + if (NULL == (type = (const H5T_t *)H5I_object_verify(type_id, H5I_DATATYPE))) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not an valid base datatype"); if (NULL == (space = (H5S_t *)H5I_object_verify(space_id, H5I_DATASPACE))) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid dataspace"); diff --git a/src/H5Dchunk.c b/src/H5Dchunk.c index 173f3903334..e930fb560a8 100644 --- a/src/H5Dchunk.c +++ b/src/H5Dchunk.c @@ -179,15 +179,15 @@ typedef struct H5D_chunk_it_ud3_t { bool do_convert; /* Whether to perform type conversions */ /* needed for converting variable-length data */ - H5T_t *dt_src; /* Source datatype */ - H5T_t *dt_dst; /* Destination datatype */ - H5T_t *dt_mem; /* Memory datatype */ - H5T_path_t *tpath_src_mem; /* Datatype conversion path from source file to memory */ - H5T_path_t *tpath_mem_dst; /* Datatype conversion path from memory to dest. file */ - void *reclaim_buf; /* Buffer for reclaiming data */ - size_t reclaim_buf_size; /* Reclaim buffer size */ - uint32_t nelmts; /* Number of elements in buffer */ - H5S_t *buf_space; /* Dataspace describing buffer */ + const H5T_t *dt_src; /* Source datatype */ + const H5T_t *dt_dst; /* Destination datatype */ + const H5T_t *dt_mem; /* Memory datatype */ + H5T_path_t *tpath_src_mem; /* Datatype conversion path from source file to memory */ + H5T_path_t *tpath_mem_dst; /* Datatype conversion path from memory to dest. file */ + void *reclaim_buf; /* Buffer for reclaiming data */ + size_t reclaim_buf_size; /* Reclaim buffer size */ + uint32_t nelmts; /* Number of elements in buffer */ + H5S_t *buf_space; /* Dataspace describing buffer */ /* needed for compressed variable-length data */ const H5O_pline_t *pline; /* Filter pipeline */ @@ -296,9 +296,9 @@ static herr_t H5D__create_piece_file_map_all(H5D_dset_io_info_t *di, H5D_io_in static herr_t H5D__create_piece_file_map_hyper(H5D_dset_io_info_t *di, H5D_io_info_t *io_info); static herr_t H5D__create_piece_mem_map_1d(const H5D_dset_io_info_t *di); static herr_t H5D__create_piece_mem_map_hyper(const H5D_dset_io_info_t *di); -static herr_t H5D__piece_file_cb(void *elem, H5T_t *type, unsigned ndims, const hsize_t *coords, +static herr_t H5D__piece_file_cb(void *elem, const H5T_t *type, unsigned ndims, const hsize_t *coords, void *_opdata); -static herr_t H5D__piece_mem_cb(void *elem, H5T_t *type, unsigned ndims, const hsize_t *coords, +static herr_t H5D__piece_mem_cb(void *elem, const H5T_t *type, unsigned ndims, const hsize_t *coords, void *_opdata); static herr_t H5D__chunk_may_use_select_io(H5D_io_info_t *io_info, const H5D_dset_io_info_t *dset_info); static unsigned H5D__chunk_hash_val(const H5D_shared_t *shared, const hsize_t *scaled); @@ -1177,7 +1177,6 @@ H5D__chunk_io_init_selections(H5D_io_info_t *io_info, H5D_dset_io_info_t *dinfo) const H5D_t *dataset; /* Local pointer to dataset info */ const H5T_t *mem_type; /* Local pointer to memory datatype */ H5S_t *tmp_mspace = NULL; /* Temporary memory dataspace */ - H5T_t *file_type = NULL; /* Temporary copy of file datatype for iteration */ bool iter_init = false; /* Selection iteration info has been initialized */ char bogus; /* "bogus" buffer to pass to selection iterator */ H5D_io_info_wrap_t io_info_wrap; @@ -1280,10 +1279,6 @@ H5D__chunk_io_init_selections(H5D_io_info_t *io_info, H5D_dset_io_info_t *dinfo) else { H5S_sel_iter_op_t iter_op; /* Operator for iteration */ - /* Create temporary datatypes for selection iteration */ - if (NULL == (file_type = H5T_copy(dataset->shared->type, H5T_COPY_ALL))) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCOPY, FAIL, "unable to copy file datatype"); - /* set opdata for H5D__piece_mem_cb */ io_info_wrap.io_info = io_info; io_info_wrap.dinfo = dinfo; @@ -1291,7 +1286,8 @@ H5D__chunk_io_init_selections(H5D_io_info_t *io_info, H5D_dset_io_info_t *dinfo) iter_op.u.lib_op = H5D__piece_file_cb; /* Spaces might not be the same shape, iterate over the file selection directly */ - if (H5S_select_iterate(&bogus, file_type, dinfo->file_space, &iter_op, &io_info_wrap) < 0) + if (H5S_select_iterate(&bogus, dataset->shared->type, dinfo->file_space, &iter_op, + &io_info_wrap) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to create file chunk selections"); /* Reset "last piece" info */ @@ -1330,11 +1326,6 @@ H5D__chunk_io_init_selections(H5D_io_info_t *io_info, H5D_dset_io_info_t *dinfo) /* Save chunk template information */ fm->mchunk_tmpl = tmp_mspace; - /* Create temporary datatypes for selection iteration */ - if (!file_type) - if (NULL == (file_type = H5T_copy(dataset->shared->type, H5T_COPY_ALL))) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCOPY, FAIL, "unable to copy file datatype"); - /* Create selection iterator for memory selection */ if (0 == (elmt_size = H5T_get_size(mem_type))) HGOTO_ERROR(H5E_DATATYPE, H5E_BADSIZE, FAIL, "datatype size invalid"); @@ -1349,7 +1340,8 @@ H5D__chunk_io_init_selections(H5D_io_info_t *io_info, H5D_dset_io_info_t *dinfo) iter_op.u.lib_op = H5D__piece_mem_cb; /* Spaces aren't the same shape, iterate over the memory selection directly */ - if (H5S_select_iterate(&bogus, file_type, dinfo->file_space, &iter_op, &io_info_wrap) < 0) + if (H5S_select_iterate(&bogus, dataset->shared->type, dinfo->file_space, &iter_op, + &io_info_wrap) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to create memory chunk selections"); } /* end else */ } /* end else */ @@ -1367,8 +1359,6 @@ H5D__chunk_io_init_selections(H5D_io_info_t *io_info, H5D_dset_io_info_t *dinfo) if (iter_init && H5S_SELECT_ITER_RELEASE(&(fm->mem_iter)) < 0) HDONE_ERROR(H5E_DATASPACE, H5E_CANTRELEASE, FAIL, "unable to release selection iterator"); - if (file_type && (H5T_close_real(file_type) < 0)) - HDONE_ERROR(H5E_DATATYPE, H5E_CANTFREE, FAIL, "Can't free temporary datatype"); FUNC_LEAVE_NOAPI(ret_value) } /* end H5D__chunk_io_init_selections() */ @@ -2232,7 +2222,7 @@ H5D__create_piece_mem_map_1d(const H5D_dset_io_info_t *dinfo) *------------------------------------------------------------------------- */ static herr_t -H5D__piece_file_cb(void H5_ATTR_UNUSED *elem, H5T_t H5_ATTR_UNUSED *type, unsigned ndims, +H5D__piece_file_cb(void H5_ATTR_UNUSED *elem, const H5T_t H5_ATTR_UNUSED *type, unsigned ndims, const hsize_t *coords, void *_opdata) { H5D_io_info_wrap_t *opdata = (H5D_io_info_wrap_t *)_opdata; @@ -2358,7 +2348,7 @@ H5D__piece_file_cb(void H5_ATTR_UNUSED *elem, H5T_t H5_ATTR_UNUSED *type, unsign *------------------------------------------------------------------------- */ static herr_t -H5D__piece_mem_cb(void H5_ATTR_UNUSED *elem, H5T_t H5_ATTR_UNUSED *type, unsigned ndims, +H5D__piece_mem_cb(void H5_ATTR_UNUSED *elem, const H5T_t H5_ATTR_UNUSED *type, unsigned ndims, const hsize_t *coords, void *_opdata) { H5D_io_info_wrap_t *opdata = (H5D_io_info_wrap_t *)_opdata; @@ -6573,7 +6563,7 @@ H5D__chunk_copy_cb(const H5D_chunk_rec_t *chunk_rec, void *_udata) bool need_insert = false; /* Whether the chunk needs to be inserted into the index */ /* General information about chunk copy */ - H5T_t *dt_src = udata->dt_src; + const H5T_t *dt_src = udata->dt_src; void *bkg = udata->bkg; /* Background buffer for datatype conversion */ void *buf = udata->buf; /* Chunk buffer for I/O & datatype conversions */ size_t buf_size = udata->buf_size; /* Size of chunk buffer */ @@ -6700,13 +6690,13 @@ H5D__chunk_copy_cb(const H5D_chunk_rec_t *chunk_rec, void *_udata) /* Perform datatype conversion, if necessary */ if (is_vlen) { - H5T_path_t *tpath_src_mem = udata->tpath_src_mem; - H5T_path_t *tpath_mem_dst = udata->tpath_mem_dst; - H5T_t *dt_dst = udata->dt_dst; - H5T_t *dt_mem = udata->dt_mem; - H5S_t *buf_space = udata->buf_space; - void *reclaim_buf = udata->reclaim_buf; - size_t reclaim_buf_size = udata->reclaim_buf_size; + H5T_path_t *tpath_src_mem = udata->tpath_src_mem; + H5T_path_t *tpath_mem_dst = udata->tpath_mem_dst; + const H5T_t *dt_dst = udata->dt_dst; + const H5T_t *dt_mem = udata->dt_mem; + H5S_t *buf_space = udata->buf_space; + void *reclaim_buf = udata->reclaim_buf; + size_t reclaim_buf_size = udata->reclaim_buf_size; /* Convert from source file to memory */ H5_CHECK_OVERFLOW(udata->nelmts, uint32_t, size_t); @@ -6831,7 +6821,6 @@ H5D__chunk_copy(H5F_t *f_src, H5O_storage_chunk_t *storage_src, H5O_layout_chunk void *bkg = NULL; /* Buffer for background during type conversion */ void *reclaim_buf = NULL; /* Buffer for reclaiming data */ H5S_t *buf_space = NULL; /* Dataspace describing buffer */ - hid_t sid_buf = -1; /* ID for buffer dataspace */ uint32_t nelmts = 0; /* Number of elements in buffer */ bool do_convert = false; /* Indicate that type conversions should be performed */ bool copy_setup_done = false; /* Indicate that 'copy setup' is done */ @@ -6939,12 +6928,6 @@ H5D__chunk_copy(H5F_t *f_src, H5O_storage_chunk_t *storage_src, H5O_layout_chunk if (NULL == (buf_space = H5S_create_simple((unsigned)1, &buf_dim, NULL))) HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCREATE, FAIL, "can't create simple dataspace"); - /* Register */ - if ((sid_buf = H5I_register(H5I_DATASPACE, buf_space, false)) < 0) { - (void)H5S_close(buf_space); - HGOTO_ERROR(H5E_ID, H5E_CANTREGISTER, FAIL, "unable to register dataspace ID"); - } /* end if */ - /* Set initial buffer sizes */ buf_size = nelmts * max_dt_size; reclaim_buf_size = nelmts * mem_dt_size; @@ -7039,8 +7022,6 @@ H5D__chunk_copy(H5F_t *f_src, H5O_storage_chunk_t *storage_src, H5O_layout_chunk bkg = udata.bkg; done: - if (sid_buf > 0 && H5I_dec_ref(sid_buf) < 0) - HDONE_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "can't decrement temporary dataspace ID"); /* Caller expects that source datatype will be freed */ if (dt_src && (H5T_close(dt_src) < 0)) HDONE_ERROR(H5E_DATASET, H5E_CANTCLOSEOBJ, FAIL, "can't close temporary datatype"); @@ -7048,6 +7029,8 @@ H5D__chunk_copy(H5F_t *f_src, H5O_storage_chunk_t *storage_src, H5O_layout_chunk HDONE_ERROR(H5E_DATASET, H5E_CANTCLOSEOBJ, FAIL, "can't close temporary datatype"); if (dt_mem && (H5T_close(dt_mem) < 0)) HDONE_ERROR(H5E_DATASET, H5E_CANTCLOSEOBJ, FAIL, "can't close temporary datatype"); + if (buf_space && H5S_close(buf_space) < 0) + HDONE_ERROR(H5E_DATASET, H5E_CANTCLOSEOBJ, FAIL, "can't close temporary dataspace"); if (buf) H5MM_xfree(buf); if (bkg) diff --git a/src/H5Dcompact.c b/src/H5Dcompact.c index 66acfd5efa6..864d4963a6e 100644 --- a/src/H5Dcompact.c +++ b/src/H5Dcompact.c @@ -472,10 +472,10 @@ H5D__compact_copy(H5F_t *f_src, H5O_storage_compact_t *_storage_src, H5F_t *f_ds { H5T_t *dt_mem = NULL; /* Memory datatype */ H5T_t *dt_dst = NULL; /* Destination datatype */ + H5S_t *buf_space = NULL; /* Dataspace describing buffer */ void *buf = NULL; /* Buffer for copying data */ void *bkg = NULL; /* Temporary buffer for copying data */ void *reclaim_buf = NULL; /* Buffer for reclaiming data */ - hid_t buf_sid = -1; /* ID for buffer dataspace */ H5D_shared_t *shared_fo = (H5D_shared_t *)cpy_info->shared_fo; /* Pointer to the shared struct for dataset object */ H5O_storage_compact_t *storage_src = _storage_src; /* Pointer to storage_src */ @@ -498,7 +498,6 @@ H5D__compact_copy(H5F_t *f_src, H5O_storage_compact_t *_storage_src, H5F_t *f_ds /* If there's a VLEN source datatype, do type conversion information */ if (H5T_detect_class(dt_src, H5T_VLEN, false) > 0) { H5T_path_t *tpath_src_mem, *tpath_mem_dst; /* Datatype conversion paths */ - H5S_t *buf_space; /* Dataspace describing buffer */ size_t buf_size; /* Size of copy buffer */ size_t nelmts; /* Number of elements in buffer */ size_t src_dt_size; /* Source datatype size */ @@ -548,12 +547,6 @@ H5D__compact_copy(H5F_t *f_src, H5O_storage_compact_t *_storage_src, H5F_t *f_ds if (NULL == (buf_space = H5S_create_simple((unsigned)1, &buf_dim, NULL))) HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCREATE, FAIL, "can't create simple dataspace"); - /* Register */ - if ((buf_sid = H5I_register(H5I_DATASPACE, buf_space, false)) < 0) { - H5S_close(buf_space); - HGOTO_ERROR(H5E_ID, H5E_CANTREGISTER, FAIL, "unable to register dataspace ID"); - } /* end if */ - /* Allocate memory for recclaim buf */ if (NULL == (reclaim_buf = H5FL_BLK_MALLOC(type_conv, buf_size))) HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed"); @@ -613,8 +606,6 @@ H5D__compact_copy(H5F_t *f_src, H5O_storage_compact_t *_storage_src, H5F_t *f_ds storage_dst->dirty = true; done: - if (buf_sid > 0 && H5I_dec_ref(buf_sid) < 0) - HDONE_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "can't decrement temporary dataspace ID"); /* Caller expects that source datatype will be freed */ if (dt_src && (H5T_close(dt_src) < 0)) HDONE_ERROR(H5E_DATASET, H5E_CANTCLOSEOBJ, FAIL, "can't close temporary datatype"); @@ -622,6 +613,8 @@ H5D__compact_copy(H5F_t *f_src, H5O_storage_compact_t *_storage_src, H5F_t *f_ds HDONE_ERROR(H5E_DATASET, H5E_CANTCLOSEOBJ, FAIL, "can't close temporary datatype"); if (dt_mem && (H5T_close(dt_mem) < 0)) HDONE_ERROR(H5E_DATASET, H5E_CANTCLOSEOBJ, FAIL, "can't close temporary datatype"); + if (buf_space && H5S_close(buf_space) < 0) + HDONE_ERROR(H5E_DATASET, H5E_CANTCLOSEOBJ, FAIL, "can't close temporary dataspace"); if (buf) buf = H5FL_BLK_FREE(type_conv, buf); if (reclaim_buf) diff --git a/src/H5Dcontig.c b/src/H5Dcontig.c index 0407736810c..c266e6c00f7 100644 --- a/src/H5Dcontig.c +++ b/src/H5Dcontig.c @@ -1610,7 +1610,6 @@ H5D__contig_copy(H5F_t *f_src, const H5O_storage_contig_t *storage_src, H5F_t *f void *bkg = NULL; /* Temporary buffer for copying data */ void *reclaim_buf = NULL; /* Buffer for reclaiming data */ H5S_t *buf_space = NULL; /* Dataspace describing buffer */ - hid_t buf_sid = -1; /* ID for buffer dataspace */ hsize_t buf_dim[1] = {0}; /* Dimension for buffer */ bool is_vlen = false; /* Flag to indicate that VL type conversion should occur */ bool fix_ref = false; /* Flag to indicate that ref values should be fixed */ @@ -1689,12 +1688,6 @@ H5D__contig_copy(H5F_t *f_src, const H5O_storage_contig_t *storage_src, H5F_t *f if (NULL == (buf_space = H5S_create_simple((unsigned)1, buf_dim, NULL))) HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCREATE, FAIL, "can't create simple dataspace"); - /* Register */ - if ((buf_sid = H5I_register(H5I_DATASPACE, buf_space, false)) < 0) { - H5S_close(buf_space); - HGOTO_ERROR(H5E_ID, H5E_CANTREGISTER, FAIL, "unable to register dataspace ID"); - } /* end if */ - /* Set flag to do type conversion */ is_vlen = true; } /* end if */ @@ -1819,8 +1812,6 @@ H5D__contig_copy(H5F_t *f_src, const H5O_storage_contig_t *storage_src, H5F_t *f } /* end while */ done: - if (buf_sid > 0 && H5I_dec_ref(buf_sid) < 0) - HDONE_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "can't decrement temporary dataspace ID"); /* Caller expects that source datatype will be freed */ if (dt_src && (H5T_close(dt_src) < 0)) HDONE_ERROR(H5E_DATASET, H5E_CANTCLOSEOBJ, FAIL, "can't close temporary datatype"); @@ -1828,6 +1819,8 @@ H5D__contig_copy(H5F_t *f_src, const H5O_storage_contig_t *storage_src, H5F_t *f HDONE_ERROR(H5E_DATASET, H5E_CANTCLOSEOBJ, FAIL, "can't close temporary datatype"); if (dt_mem && (H5T_close(dt_mem) < 0)) HDONE_ERROR(H5E_DATASET, H5E_CANTCLOSEOBJ, FAIL, "can't close temporary datatype"); + if (buf_space && H5S_close(buf_space) < 0) + HDONE_ERROR(H5E_DATASET, H5E_CANTCLOSEOBJ, FAIL, "can't close temporary dataspace"); if (buf) buf = H5FL_BLK_FREE(type_conv, buf); if (reclaim_buf) diff --git a/src/H5Ddeprec.c b/src/H5Ddeprec.c index 0a71b5c5ec8..e763a9b7b2e 100644 --- a/src/H5Ddeprec.c +++ b/src/H5Ddeprec.c @@ -306,9 +306,9 @@ H5Dextend(hid_t dset_id, const hsize_t size[]) herr_t H5Dvlen_reclaim(hid_t type_id, hid_t space_id, hid_t dxpl_id, void *buf) { - H5T_t *type; - H5S_t *space; /* Dataspace for iteration */ - herr_t ret_value; /* Return value */ + const H5T_t *type; + H5S_t *space; /* Dataspace for iteration */ + herr_t ret_value; /* Return value */ FUNC_ENTER_API(FAIL) H5TRACE4("e", "iii*x", type_id, space_id, dxpl_id, buf); @@ -316,7 +316,7 @@ H5Dvlen_reclaim(hid_t type_id, hid_t space_id, hid_t dxpl_id, void *buf) /* Check args */ if (buf == NULL) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "'buf' pointer is NULL"); - if (NULL == (type = (H5T_t *)H5I_object_verify(type_id, H5I_DATATYPE))) + if (NULL == (type = (const H5T_t *)H5I_object_verify(type_id, H5I_DATATYPE))) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid datatype"); if (NULL == (space = (H5S_t *)H5I_object_verify(space_id, H5I_DATASPACE))) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid dataspace"); diff --git a/src/H5Dfill.c b/src/H5Dfill.c index 12cc3eaebf5..383d9c69314 100644 --- a/src/H5Dfill.c +++ b/src/H5Dfill.c @@ -116,10 +116,8 @@ H5D__fill(const void *fill, const H5T_t *fill_type, void *buf, const H5T_t *buf_ uint8_t elem_buf[H5T_ELEM_BUF_SIZE]; /* Buffer for element data */ H5WB_t *bkg_elem_wb = NULL; /* Wrapped buffer for background data */ uint8_t bkg_elem_buf[H5T_ELEM_BUF_SIZE]; /* Buffer for background data */ - uint8_t *bkg_buf = NULL; /* Background conversion buffer */ - uint8_t *tmp_buf = NULL; /* Temp conversion buffer */ - H5T_t *src_type = NULL; /* Source datatype */ - H5T_t *dst_type = NULL; /* Destination datatype */ + uint8_t *bkg_buf = NULL; /* Background conversion buffer */ + uint8_t *tmp_buf = NULL; /* Temp conversion buffer */ size_t dst_type_size; /* Size of destination type*/ herr_t ret_value = SUCCEED; /* Return value */ @@ -170,15 +168,6 @@ H5D__fill(const void *fill, const H5T_t *fill_type, void *buf, const H5T_t *buf_ HGOTO_ERROR(H5E_DATASET, H5E_UNSUPPORTED, FAIL, "unable to convert between src and dest datatype"); - /* Construct source & destination datatype IDs, if we will need them */ - if (!H5T_path_noop(tpath)) { - if (NULL == (src_type = H5T_copy(fill_type, H5T_COPY_ALL))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "unable to copy fill value datatype"); - - if (NULL == (dst_type = H5T_copy(buf_type, H5T_COPY_ALL))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "unable to copy memory datatype"); - } /* end if */ - /* If there's VL type of data, make multiple copies of fill value first, * then do conversion on each element so that each of them has a copy * of the VL data. @@ -203,7 +192,7 @@ H5D__fill(const void *fill, const H5T_t *fill_type, void *buf, const H5T_t *buf_ H5VM_array_fill(tmp_buf, fill, src_type_size, (size_t)nelmts); /* Convert from file's fill value into memory form */ - if (H5T_convert(tpath, src_type, dst_type, (size_t)nelmts, (size_t)0, (size_t)0, tmp_buf, + if (H5T_convert(tpath, fill_type, buf_type, (size_t)nelmts, (size_t)0, (size_t)0, tmp_buf, bkg_buf) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTCONVERT, FAIL, "data type conversion failed"); @@ -253,7 +242,7 @@ H5D__fill(const void *fill, const H5T_t *fill_type, void *buf, const H5T_t *buf_ } /* end if */ /* Perform datatype conversion */ - if (H5T_convert(tpath, src_type, dst_type, (size_t)1, (size_t)0, (size_t)0, elem_ptr, + if (H5T_convert(tpath, fill_type, buf_type, (size_t)1, (size_t)0, (size_t)0, elem_ptr, bkg_ptr) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTCONVERT, FAIL, "data type conversion failed"); @@ -274,10 +263,6 @@ H5D__fill(const void *fill, const H5T_t *fill_type, void *buf, const H5T_t *buf_ HDONE_ERROR(H5E_DATASET, H5E_CANTFREE, FAIL, "Can't release selection iterator"); if (mem_iter) mem_iter = H5FL_FREE(H5S_sel_iter_t, mem_iter); - if (src_type && H5T_close(src_type) < 0) - HDONE_ERROR(H5E_DATASET, H5E_CANTCLOSEOBJ, FAIL, "unable to close temporary datatype"); - if (dst_type && H5T_close(dst_type) < 0) - HDONE_ERROR(H5E_DATASET, H5E_CANTCLOSEOBJ, FAIL, "unable to close temporary datatype"); if (tmp_buf) tmp_buf = H5FL_BLK_FREE(type_conv, tmp_buf); if (elem_wb && H5WB_unwrap(elem_wb) < 0) @@ -302,7 +287,7 @@ H5D__fill(const void *fill, const H5T_t *fill_type, void *buf, const H5T_t *buf_ 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, - H5T_t *dset_type, size_t total_nelmts, size_t max_buf_size) + const H5T_t *dset_type, size_t total_nelmts, size_t max_buf_size) { herr_t ret_value = SUCCEED; /* Return value */ diff --git a/src/H5Dint.c b/src/H5Dint.c index 2e835a5df5d..7736c4e5a79 100644 --- a/src/H5Dint.c +++ b/src/H5Dint.c @@ -88,7 +88,7 @@ static herr_t H5D__use_minimized_dset_headers(H5F_t *file, bool *minimize); static herr_t H5D__prepare_minimized_oh(H5F_t *file, H5D_t *dset, H5O_loc_t *oloc); static size_t H5D__calculate_minimum_header_size(H5F_t *file, H5D_t *dset, H5O_t *ohdr); static void *H5D__vlen_get_buf_size_alloc(size_t size, void *info); -static herr_t H5D__vlen_get_buf_size_cb(void *elem, H5T_t *type, unsigned ndim, const hsize_t *point, +static herr_t H5D__vlen_get_buf_size_cb(void *elem, const H5T_t *type, unsigned ndim, const hsize_t *point, void *op_data); static herr_t H5D__vlen_get_buf_size_gen_cb(void *elem, hid_t type_id, unsigned ndim, const hsize_t *point, void *op_data); @@ -2624,7 +2624,7 @@ H5D__vlen_get_buf_size_alloc(size_t size, void *info) *------------------------------------------------------------------------- */ static herr_t -H5D__vlen_get_buf_size_cb(void H5_ATTR_UNUSED *elem, H5T_t *type, unsigned H5_ATTR_UNUSED ndim, +H5D__vlen_get_buf_size_cb(void H5_ATTR_UNUSED *elem, const H5T_t *type, unsigned H5_ATTR_UNUSED ndim, const hsize_t *point, void *op_data) { H5D_vlen_bufsize_native_t *vlen_bufsize = (H5D_vlen_bufsize_native_t *)op_data; @@ -2687,14 +2687,14 @@ H5D__vlen_get_buf_size(H5D_t *dset, hid_t type_id, hid_t space_id, hsize_t *size H5S_t *mspace = NULL; /* Memory dataspace */ char bogus; /* bogus value to pass to H5Diterate() */ H5S_t *space; /* Dataspace for iteration */ - H5T_t *type; /* Datatype */ + const H5T_t *type; /* Datatype */ H5S_sel_iter_op_t dset_op; /* Operator for iteration */ herr_t ret_value = FAIL; /* Return value */ FUNC_ENTER_PACKAGE /* Check args */ - if (NULL == (type = (H5T_t *)H5I_object(type_id))) + if (NULL == (type = (const H5T_t *)H5I_object(type_id))) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not an valid base datatype"); if (NULL == (space = (H5S_t *)H5I_object(space_id))) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid dataspace"); @@ -2828,7 +2828,7 @@ H5D__vlen_get_buf_size_gen(H5VL_object_t *vol_obj, hid_t type_id, hid_t space_id H5S_t *mspace = NULL; /* Memory dataspace */ char bogus; /* Bogus value to pass to H5Diterate() */ H5S_t *space; /* Dataspace for iteration */ - H5T_t *type; /* Datatype */ + const H5T_t *type; /* Datatype */ H5S_sel_iter_op_t dset_op; /* Operator for iteration */ H5VL_dataset_get_args_t vol_cb_args; /* Arguments to VOL callback */ herr_t ret_value = SUCCEED; /* Return value */ @@ -2836,7 +2836,7 @@ H5D__vlen_get_buf_size_gen(H5VL_object_t *vol_obj, hid_t type_id, hid_t space_id FUNC_ENTER_PACKAGE /* Check args */ - if (NULL == (type = (H5T_t *)H5I_object(type_id))) + if (NULL == (type = (const H5T_t *)H5I_object(type_id))) HGOTO_ERROR(H5E_DATASET, H5E_BADTYPE, FAIL, "not an valid datatype"); if (NULL == (space = (H5S_t *)H5I_object(space_id))) HGOTO_ERROR(H5E_DATASET, H5E_BADTYPE, FAIL, "invalid dataspace"); @@ -3560,8 +3560,8 @@ H5D_get_create_plist(const H5D_t *dset) H5O_layout_t copied_layout; /* Layout to tweak */ H5O_fill_t copied_fill = {0}; /* Fill value to tweak */ H5O_efl_t copied_efl; /* External file list to tweak */ - H5T_t *src_type = NULL; H5T_t *dst_type = NULL; + H5T_t *tmp_type = NULL; hid_t new_dcpl_id = FAIL; hid_t ret_value = H5I_INVALID_HID; /* Return value */ @@ -3650,10 +3650,13 @@ H5D_get_create_plist(const H5D_t *dset) uint8_t *bkg_buf = NULL; /* Background conversion buffer */ size_t bkg_size; /* Size of background buffer */ - if (NULL == (src_type = H5T_copy(dset->shared->type, H5T_COPY_ALL))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "unable to copy dataset's datatype"); - if (NULL == (dst_type = H5T_copy(copied_fill.type, H5T_COPY_TRANSIENT))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "unable to copy fill value datatype"); + dst_type = copied_fill.type; + if (H5T_detect_class(dst_type, H5T_VLEN, false) > 0 || + H5T_detect_class(dst_type, H5T_REFERENCE, false) > 0) { + if (NULL == (tmp_type = H5T_copy(dst_type, H5T_COPY_TRANSIENT))) + HGOTO_ERROR(H5E_DATASET, H5E_CANTCOPY, FAIL, "unable to copy fill value datatype"); + dst_type = tmp_type; + } /* Allocate a background buffer */ bkg_size = MAX(H5T_GET_SIZE(copied_fill.type), H5T_GET_SIZE(dset->shared->type)); @@ -3661,8 +3664,8 @@ H5D_get_create_plist(const H5D_t *dset) HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "memory allocation failed"); /* Convert fill value */ - if (H5T_convert(tpath, src_type, dst_type, (size_t)1, (size_t)0, (size_t)0, copied_fill.buf, - bkg_buf) < 0) { + if (H5T_convert(tpath, dset->shared->type, dst_type, (size_t)1, (size_t)0, (size_t)0, + copied_fill.buf, bkg_buf) < 0) { if (bkg_buf) bkg_buf = H5FL_BLK_FREE(type_conv, bkg_buf); HGOTO_ERROR(H5E_DATASET, H5E_CANTCONVERT, FAIL, "datatype conversion failed"); @@ -3699,9 +3702,7 @@ H5D_get_create_plist(const H5D_t *dset) ret_value = new_dcpl_id; done: - if (src_type && (H5T_close(src_type) < 0)) - HDONE_ERROR(H5E_DATASET, H5E_CANTCLOSEOBJ, FAIL, "unable to close temporary datatype"); - if (dst_type && (H5T_close(dst_type) < 0)) + if (tmp_type && (H5T_close(tmp_type) < 0)) HDONE_ERROR(H5E_DATASET, H5E_CANTCLOSEOBJ, FAIL, "unable to close temporary datatype"); if (ret_value < 0) { diff --git a/src/H5Dio.c b/src/H5Dio.c index 2652f6de6c3..0c9f9110305 100644 --- a/src/H5Dio.c +++ b/src/H5Dio.c @@ -46,7 +46,8 @@ static herr_t H5D__ioinfo_init(size_t count, H5D_io_op_type_t op_type, H5D_dset_io_info_t *dset_info, H5D_io_info_t *io_info); static herr_t H5D__dset_ioinfo_init(H5D_t *dset, H5D_dset_io_info_t *dset_info, H5D_storage_t *store); -static herr_t H5D__typeinfo_init(H5D_io_info_t *io_info, H5D_dset_io_info_t *dset_info, H5T_t *mem_type); +static herr_t H5D__typeinfo_init(H5D_io_info_t *io_info, H5D_dset_io_info_t *dset_info, + const H5T_t *mem_type); static herr_t H5D__typeinfo_init_phase2(H5D_io_info_t *io_info); static herr_t H5D__typeinfo_init_phase3(H5D_io_info_t *io_info); #ifdef H5_HAVE_PARALLEL @@ -1040,7 +1041,7 @@ H5D__dset_ioinfo_init(H5D_t *dset, H5D_dset_io_info_t *dset_info, H5D_storage_t *------------------------------------------------------------------------- */ static herr_t -H5D__typeinfo_init(H5D_io_info_t *io_info, H5D_dset_io_info_t *dset_info, H5T_t *mem_type) +H5D__typeinfo_init(H5D_io_info_t *io_info, H5D_dset_io_info_t *dset_info, const H5T_t *mem_type) { H5D_type_info_t *type_info; const H5D_t *dset; diff --git a/src/H5Dpkg.h b/src/H5Dpkg.h index a24249f05ca..684780e8e85 100644 --- a/src/H5Dpkg.h +++ b/src/H5Dpkg.h @@ -120,8 +120,8 @@ typedef struct H5D_type_info_t { /* Initial values */ const H5T_t *mem_type; /* Pointer to memory datatype */ const H5T_t *dset_type; /* Pointer to dataset datatype */ - H5T_t *src_type; /* Pointer to source datatype */ - H5T_t *dst_type; /* Pointer to destination datatype */ + const H5T_t *src_type; /* Pointer to source datatype */ + const H5T_t *dst_type; /* Pointer to destination datatype */ H5T_path_t *tpath; /* Datatype conversion path */ /* Computed/derived values */ @@ -278,7 +278,7 @@ typedef struct H5D_dset_io_info_t { H5D_piece_info_t *contig_piece_info; /* Piece info for contiguous dataset */ } layout_io_info; - H5T_t *mem_type; /* memory datatype */ + const H5T_t *mem_type; /* memory datatype */ H5D_type_info_t type_info; bool skip_io; /* Whether to skip I/O for this dataset */ } H5D_dset_io_info_t; @@ -602,7 +602,7 @@ typedef struct H5D_fill_buf_info_t { void *bkg_buf; /* Background conversion buffer */ size_t bkg_buf_size; /* Size of background buffer */ H5T_t *mem_type; /* Pointer to memory datatype */ - H5T_t *file_type; /* Pointer to file datatype */ + const H5T_t *file_type; /* Pointer to file datatype */ size_t mem_elmt_size, file_elmt_size; /* Size of element in memory and on disk */ size_t max_elmt_size; /* Max. size of memory or file datatype */ size_t elmts_per_buf; /* # of elements that fit into a buffer */ @@ -784,7 +784,7 @@ H5_DLL herr_t H5D__fill(const void *fill, const H5T_t *fill_type, void *buf, con H5S_t *space); 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, - H5T_t *dset_type, size_t nelmts, size_t min_buf_size); + const H5T_t *dset_type, size_t nelmts, size_t min_buf_size); H5_DLL herr_t H5D__fill_refill_vl(H5D_fill_buf_info_t *fb_info, size_t nelmts); H5_DLL herr_t H5D__fill_term(H5D_fill_buf_info_t *fb_info); diff --git a/src/H5Ocopy_ref.c b/src/H5Ocopy_ref.c index 62dc221dcdd..fa682cf1de3 100644 --- a/src/H5Ocopy_ref.c +++ b/src/H5Ocopy_ref.c @@ -64,7 +64,7 @@ static herr_t H5O__copy_expand_ref_object1(H5O_loc_t *src_oloc, const void *buf_ static herr_t H5O__copy_expand_ref_region1(H5O_loc_t *src_oloc, const void *buf_src, H5O_loc_t *dst_oloc, H5G_loc_t *dst_root_loc, void *buf_dst, size_t ref_count, H5O_copy_t *cpy_info); -static herr_t H5O__copy_expand_ref_object2(H5O_loc_t *src_oloc, H5T_t *dt_src, const void *buf_src, +static herr_t H5O__copy_expand_ref_object2(H5O_loc_t *src_oloc, const H5T_t *dt_src, const void *buf_src, size_t nbytes_src, H5O_loc_t *dst_oloc, H5G_loc_t *dst_root_loc, void *buf_dst, size_t ref_count, H5O_copy_t *cpy_info); @@ -284,7 +284,7 @@ H5O__copy_expand_ref_region1(H5O_loc_t *src_oloc, const void *buf_src, H5O_loc_t *------------------------------------------------------------------------- */ static herr_t -H5O__copy_expand_ref_object2(H5O_loc_t *src_oloc, H5T_t *dt_src, const void *buf_src, size_t nbytes_src, +H5O__copy_expand_ref_object2(H5O_loc_t *src_oloc, const H5T_t *dt_src, const void *buf_src, size_t nbytes_src, H5O_loc_t *dst_oloc, H5G_loc_t *dst_root_loc, void *buf_dst, size_t ref_count, H5O_copy_t *cpy_info) { @@ -411,7 +411,7 @@ H5O__copy_expand_ref_object2(H5O_loc_t *src_oloc, H5T_t *dt_src, const void *buf *------------------------------------------------------------------------- */ herr_t -H5O_copy_expand_ref(H5F_t *file_src, H5T_t *dt_src, void *buf_src, size_t nbytes_src, H5F_t *file_dst, +H5O_copy_expand_ref(H5F_t *file_src, const H5T_t *dt_src, void *buf_src, size_t nbytes_src, H5F_t *file_dst, void *buf_dst, H5O_copy_t *cpy_info) { H5O_loc_t dst_oloc; /* Copied object object location */ diff --git a/src/H5Ofill.c b/src/H5Ofill.c index 9eaeb800886..58c5bec8967 100644 --- a/src/H5Ofill.c +++ b/src/H5Ofill.c @@ -534,8 +534,8 @@ H5O__fill_copy(const void *_src, void *_dst) { const H5O_fill_t *src = (const H5O_fill_t *)_src; H5O_fill_t *dst = (H5O_fill_t *)_dst; - H5T_t *src_type = NULL; H5T_t *dst_type = NULL; + H5T_t *tmp_type = NULL; void *ret_value = NULL; /* Return value */ FUNC_ENTER_PACKAGE @@ -577,10 +577,13 @@ H5O__fill_copy(const void *_src, void *_dst) uint8_t *bkg_buf = NULL; /* Background conversion buffer */ size_t bkg_size; /* Size of background buffer */ - if (NULL == (src_type = H5T_copy(src->type, H5T_COPY_ALL))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, NULL, "unable to copy source datatype"); - if (NULL == (dst_type = H5T_copy(dst->type, H5T_COPY_TRANSIENT))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, NULL, "unable to copy destination datatype"); + dst_type = dst->type; + if (H5T_detect_class(dst_type, H5T_VLEN, false) > 0 || + H5T_detect_class(dst_type, H5T_REFERENCE, false) > 0) { + if (NULL == (tmp_type = H5T_copy(dst_type, H5T_COPY_TRANSIENT))) + HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, NULL, "unable to copy destination datatype"); + dst_type = tmp_type; + } /* Allocate a background buffer */ bkg_size = MAX(H5T_get_size(dst->type), H5T_get_size(src->type)); @@ -588,7 +591,7 @@ H5O__fill_copy(const void *_src, void *_dst) HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed"); /* Convert fill value */ - if (H5T_convert(tpath, src_type, dst_type, (size_t)1, (size_t)0, (size_t)0, dst->buf, + if (H5T_convert(tpath, src->type, dst_type, (size_t)1, (size_t)0, (size_t)0, dst->buf, bkg_buf) < 0) { if (bkg_buf) bkg_buf = H5FL_BLK_FREE(type_conv, bkg_buf); @@ -608,9 +611,7 @@ H5O__fill_copy(const void *_src, void *_dst) ret_value = dst; done: - if (src_type && (H5T_close(src_type) < 0)) - HDONE_ERROR(H5E_OHDR, H5E_CANTCLOSEOBJ, NULL, "unable to close temporary datatype"); - if (dst_type && (H5T_close(dst_type) < 0)) + if (tmp_type && (H5T_close(tmp_type) < 0)) HDONE_ERROR(H5E_OHDR, H5E_CANTCLOSEOBJ, NULL, "unable to close temporary datatype"); if (!ret_value && dst) { @@ -940,9 +941,7 @@ H5O_fill_convert(H5O_fill_t *fill, H5T_t *dset_type, bool *fill_changed) { H5T_path_t *tpath; /* Type conversion info */ void *buf = NULL, *bkg = NULL; /* Conversion buffers */ - H5T_t *src_type = NULL; - H5T_t *dst_type = NULL; - herr_t ret_value = SUCCEED; /* Return value */ + herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_NOAPI(FAIL) @@ -973,11 +972,6 @@ H5O_fill_convert(H5O_fill_t *fill, H5T_t *dset_type, bool *fill_changed) if (!H5T_path_noop(tpath)) { size_t fill_type_size; - if (NULL == (src_type = H5T_copy(fill->type, H5T_COPY_ALL))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, FAIL, "unable to copy fill value datatype"); - if (NULL == (dst_type = H5T_copy(dset_type, H5T_COPY_ALL))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, FAIL, "unable to copy dataset's datatype"); - /* * Datatype conversions are always done in place, so we need a buffer * that is large enough for both source and destination. @@ -994,7 +988,7 @@ H5O_fill_convert(H5O_fill_t *fill, H5T_t *dset_type, bool *fill_changed) HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for type conversion"); /* Do the conversion */ - if (H5T_convert(tpath, src_type, dst_type, (size_t)1, (size_t)0, (size_t)0, buf, bkg) < 0) + if (H5T_convert(tpath, fill->type, dset_type, (size_t)1, (size_t)0, (size_t)0, buf, bkg) < 0) HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, FAIL, "datatype conversion failed"); /* Update the fill message */ @@ -1011,10 +1005,6 @@ H5O_fill_convert(H5O_fill_t *fill, H5T_t *dset_type, bool *fill_changed) } /* end if */ done: - if (src_type && (H5T_close(src_type) < 0)) - HDONE_ERROR(H5E_OHDR, H5E_CANTCLOSEOBJ, FAIL, "unable to close temporary datatype"); - if (dst_type && (H5T_close(dst_type) < 0)) - HDONE_ERROR(H5E_OHDR, H5E_CANTCLOSEOBJ, FAIL, "unable to close temporary datatype"); if (bkg) H5MM_xfree(bkg); diff --git a/src/H5Oprivate.h b/src/H5Oprivate.h index f312a3c94b0..6f3d39d1e83 100644 --- a/src/H5Oprivate.h +++ b/src/H5Oprivate.h @@ -985,7 +985,7 @@ H5_DLL herr_t H5O_refresh_metadata_reopen(hid_t oid, hid_t apl_id, H5G_loc_t *ob /* Object copying routines */ H5_DLL herr_t H5O_copy_header_map(const H5O_loc_t *oloc_src, H5O_loc_t *oloc_dst /*out */, H5O_copy_t *cpy_info, bool inc_depth, H5O_type_t *obj_type, void **udata); -H5_DLL herr_t H5O_copy_expand_ref(H5F_t *file_src, H5T_t *dt_src, void *buf_src, size_t nbytes_src, +H5_DLL herr_t H5O_copy_expand_ref(H5F_t *file_src, const H5T_t *dt_src, void *buf_src, size_t nbytes_src, H5F_t *file_dst, void *buf_dst, H5O_copy_t *cpy_info); /* Debugging routines */ diff --git a/src/H5Pdcpl.c b/src/H5Pdcpl.c index da516db1a7a..1923aa69c5b 100644 --- a/src/H5Pdcpl.c +++ b/src/H5Pdcpl.c @@ -3085,7 +3085,7 @@ H5P_get_fill_value(H5P_genplist_t *plist, const H5T_t *type, void *value /*out*/ void *buf = NULL; /*conversion buffer */ void *bkg = NULL; /*conversion buffer */ H5T_t *src_type = NULL; /*source datatype */ - H5T_t *dst_type = NULL; /*destination datatype */ + H5T_t *tmp_type = NULL; /*temporary datatype */ herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_NOAPI(FAIL) @@ -3112,10 +3112,14 @@ H5P_get_fill_value(H5P_genplist_t *plist, const H5T_t *type, void *value /*out*/ */ if (NULL == (tpath = H5T_path_find(fill.type, type))) HGOTO_ERROR(H5E_PLIST, H5E_CANTINIT, FAIL, "unable to convert between src and dst datatypes"); - if (NULL == (src_type = H5T_copy(fill.type, H5T_COPY_TRANSIENT))) - HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "unable to copy fill value datatype"); - if (NULL == (dst_type = H5T_copy(type, H5T_COPY_ALL))) - HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "unable to copy memory datatype"); + + src_type = fill.type; + if (H5T_detect_class(src_type, H5T_VLEN, false) > 0 || + H5T_detect_class(src_type, H5T_REFERENCE, false) > 0) { + if (NULL == (tmp_type = H5T_copy(src_type, H5T_COPY_TRANSIENT))) + HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "unable to copy fill value datatype"); + src_type = tmp_type; + } /* * Data type conversions are always done in place, so we need a buffer @@ -3136,7 +3140,7 @@ H5P_get_fill_value(H5P_genplist_t *plist, const H5T_t *type, void *value /*out*/ H5MM_memcpy(buf, fill.buf, H5T_get_size(fill.type)); /* Do the conversion */ - if (H5T_convert(tpath, src_type, dst_type, (size_t)1, (size_t)0, (size_t)0, buf, bkg) < 0) + if (H5T_convert(tpath, src_type, type, (size_t)1, (size_t)0, (size_t)0, buf, bkg) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTINIT, FAIL, "datatype conversion failed"); if (buf != value) H5MM_memcpy(value, buf, H5T_get_size(type)); @@ -3146,9 +3150,7 @@ H5P_get_fill_value(H5P_genplist_t *plist, const H5T_t *type, void *value /*out*/ H5MM_xfree(buf); if (bkg != value) H5MM_xfree(bkg); - if (src_type && H5T_close(src_type) < 0) - HDONE_ERROR(H5E_PLIST, H5E_CANTCLOSEOBJ, FAIL, "unable to close temporary datatype"); - if (dst_type && H5T_close(dst_type) < 0) + if (tmp_type && H5T_close(tmp_type) < 0) HDONE_ERROR(H5E_PLIST, H5E_CANTCLOSEOBJ, FAIL, "unable to close temporary datatype"); FUNC_LEAVE_NOAPI(ret_value) diff --git a/src/H5Sprivate.h b/src/H5Sprivate.h index b8cd20c7f9e..8fd73f54740 100644 --- a/src/H5Sprivate.h +++ b/src/H5Sprivate.h @@ -106,7 +106,7 @@ typedef struct H5S_sel_iter_t { } H5S_sel_iter_t; /* Selection iteration operator for internal library callbacks */ -typedef herr_t (*H5S_sel_iter_lib_op_t)(void *elem, H5T_t *type, unsigned ndim, const hsize_t *point, +typedef herr_t (*H5S_sel_iter_lib_op_t)(void *elem, const H5T_t *type, unsigned ndim, const hsize_t *point, void *op_data); /* Describe kind of callback to make */ @@ -231,32 +231,32 @@ H5_DLL herr_t H5S_extent_copy(H5S_t *dst, const H5S_t *src); /* Operations on selections */ H5_DLL herr_t H5S_select_deserialize(H5S_t **space, const uint8_t **p, const size_t p_size); H5_DLL H5S_sel_type H5S_get_select_type(const H5S_t *space); -H5_DLL herr_t H5S_select_iterate(void *buf, H5T_t *type, H5S_t *space, const H5S_sel_iter_op_t *op, - void *op_data); -H5_DLL herr_t H5S_select_fill(const void *fill, size_t fill_size, H5S_t *space, void *buf); -H5_DLL htri_t H5S_select_valid(const H5S_t *space); -H5_DLL hsize_t H5S_get_select_npoints(const H5S_t *space); -H5_DLL herr_t H5S_get_select_bounds(const H5S_t *space, hsize_t *start, hsize_t *end); -H5_DLL herr_t H5S_get_select_offset(const H5S_t *space, hsize_t *offset); -H5_DLL int H5S_get_select_unlim_dim(const H5S_t *space); -H5_DLL herr_t H5S_get_select_num_elem_non_unlim(const H5S_t *space, hsize_t *num_elem_non_unlim); -H5_DLL herr_t H5S_select_offset(H5S_t *space, const hssize_t *offset); -H5_DLL herr_t H5S_select_copy(H5S_t *dst, const H5S_t *src, bool share_selection); -H5_DLL htri_t H5S_select_shape_same(H5S_t *space1, H5S_t *space2); -H5_DLL htri_t H5S_select_intersect_block(H5S_t *space, const hsize_t *start, const hsize_t *end); -H5_DLL herr_t H5S_select_construct_projection(H5S_t *base_space, H5S_t **new_space_ptr, - unsigned new_space_rank, hsize_t element_size, - ptrdiff_t *buf_adj); -H5_DLL herr_t H5S_select_release(H5S_t *ds); -H5_DLL hssize_t H5S_select_serial_size(H5S_t *space); -H5_DLL herr_t H5S_select_serialize(H5S_t *space, uint8_t **p); -H5_DLL htri_t H5S_select_is_contiguous(const H5S_t *space); -H5_DLL htri_t H5S_select_is_single(const H5S_t *space); -H5_DLL htri_t H5S_select_is_regular(H5S_t *space); -H5_DLL herr_t H5S_select_adjust_u(H5S_t *space, const hsize_t *offset); -H5_DLL herr_t H5S_select_adjust_s(H5S_t *space, const hssize_t *offset); -H5_DLL herr_t H5S_select_project_scalar(const H5S_t *space, hsize_t *offset); -H5_DLL herr_t H5S_select_project_simple(const H5S_t *space, H5S_t *new_space, hsize_t *offset); +H5_DLL herr_t H5S_select_iterate(void *buf, const H5T_t *type, H5S_t *space, const H5S_sel_iter_op_t *op, + void *op_data); +H5_DLL herr_t H5S_select_fill(const void *fill, size_t fill_size, H5S_t *space, void *buf); +H5_DLL htri_t H5S_select_valid(const H5S_t *space); +H5_DLL hsize_t H5S_get_select_npoints(const H5S_t *space); +H5_DLL herr_t H5S_get_select_bounds(const H5S_t *space, hsize_t *start, hsize_t *end); +H5_DLL herr_t H5S_get_select_offset(const H5S_t *space, hsize_t *offset); +H5_DLL int H5S_get_select_unlim_dim(const H5S_t *space); +H5_DLL herr_t H5S_get_select_num_elem_non_unlim(const H5S_t *space, hsize_t *num_elem_non_unlim); +H5_DLL herr_t H5S_select_offset(H5S_t *space, const hssize_t *offset); +H5_DLL herr_t H5S_select_copy(H5S_t *dst, const H5S_t *src, bool share_selection); +H5_DLL htri_t H5S_select_shape_same(H5S_t *space1, H5S_t *space2); +H5_DLL htri_t H5S_select_intersect_block(H5S_t *space, const hsize_t *start, const hsize_t *end); +H5_DLL herr_t H5S_select_construct_projection(H5S_t *base_space, H5S_t **new_space_ptr, + unsigned new_space_rank, hsize_t element_size, + ptrdiff_t *buf_adj); +H5_DLL herr_t H5S_select_release(H5S_t *ds); +H5_DLL hssize_t H5S_select_serial_size(H5S_t *space); +H5_DLL herr_t H5S_select_serialize(H5S_t *space, uint8_t **p); +H5_DLL htri_t H5S_select_is_contiguous(const H5S_t *space); +H5_DLL htri_t H5S_select_is_single(const H5S_t *space); +H5_DLL htri_t H5S_select_is_regular(H5S_t *space); +H5_DLL herr_t H5S_select_adjust_u(H5S_t *space, const hsize_t *offset); +H5_DLL herr_t H5S_select_adjust_s(H5S_t *space, const hssize_t *offset); +H5_DLL herr_t H5S_select_project_scalar(const H5S_t *space, hsize_t *offset); +H5_DLL herr_t H5S_select_project_simple(const H5S_t *space, H5S_t *new_space, hsize_t *offset); H5_DLL herr_t H5S_select_project_intersection(H5S_t *src_space, H5S_t *dst_space, H5S_t *src_intersect_space, H5S_t **new_space_ptr, bool share_space); H5_DLL herr_t H5S_select_subtract(H5S_t *space, H5S_t *subtract_space); diff --git a/src/H5Sselect.c b/src/H5Sselect.c index 477e0f840c1..7c1a8eb263f 100644 --- a/src/H5Sselect.c +++ b/src/H5Sselect.c @@ -1357,7 +1357,7 @@ H5S_select_iter_release(H5S_sel_iter_t *sel_iter) the selection is not modified. --------------------------------------------------------------------------*/ herr_t -H5S_select_iterate(void *buf, H5T_t *type, H5S_t *space, const H5S_sel_iter_op_t *op, void *op_data) +H5S_select_iterate(void *buf, const H5T_t *type, H5S_t *space, const H5S_sel_iter_op_t *op, void *op_data) { H5S_sel_iter_t *iter = NULL; /* Selection iteration info */ bool iter_init = false; /* Selection iteration info has been initialized */ diff --git a/src/H5T.c b/src/H5T.c index 7d3db702a84..f676dff1e8d 100644 --- a/src/H5T.c +++ b/src/H5T.c @@ -2442,12 +2442,12 @@ H5T__register_int(H5T_pers_t pers, const char *name, H5T_t *src, H5T_t *dst, H5T * * Purpose: Register a hard or soft conversion function for a data type * conversion path. The path is specified by the source and - * destination data types SRC_ID and DST_ID (for soft functions - * only the class of these types is important). If FUNC is a - * hard function then it replaces any previous path; if it's a - * soft function then it replaces all existing paths to which it - * applies and is used for any new path to which it applies as - * long as that path doesn't have a hard function. + * destination data types SRC and DST (for soft functions only the + * class of these types is important). If FUNC is a hard function + * then it replaces any previous path; if it's a soft function then + * it replaces all existing paths to which it applies and is used + * for any new path to which it applies as long as that path doesn't + * have a hard function. * * Return: Non-negative on success/Negative on failure * @@ -2537,14 +2537,14 @@ H5T__register(H5T_pers_t pers, const char *name, H5T_t *src, H5T_t *dst, H5T_con old_path->dst->shared->type != dst->shared->type) continue; - if (NULL == (tmp_stype = H5T_copy(old_path->src, H5T_COPY_ALL))) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCOPY, FAIL, "unable to copy src datatype"); - if (NULL == (tmp_dtype = H5T_copy(old_path->dst, H5T_COPY_ALL))) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCOPY, FAIL, "unable to copy dst datatype"); - memset(&cdata, 0, sizeof cdata); cdata.command = H5T_CONV_INIT; if (conv->is_app) { + if (NULL == (tmp_stype = H5T_copy(old_path->src, H5T_COPY_ALL))) + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCOPY, FAIL, "unable to copy src datatype"); + if (NULL == (tmp_dtype = H5T_copy(old_path->dst, H5T_COPY_ALL))) + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCOPY, FAIL, "unable to copy dst datatype"); + if ((tmp_sid = H5I_register(H5I_DATATYPE, tmp_stype, false)) < 0) HGOTO_ERROR(H5E_DATATYPE, H5E_CANTREGISTER, FAIL, "unable to register ID for source datatype"); @@ -2566,12 +2566,8 @@ H5T__register(H5T_pers_t pers, const char *name, H5T_t *src, H5T_t *dst, H5T_con continue; } /* end if */ } /* end if */ - else if ((conv->u.lib_func)(tmp_stype, tmp_dtype, &cdata, &tmp_ctx, 0, 0, 0, NULL, NULL) < 0) { - if (H5T_close(tmp_stype) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCLOSEOBJ, FAIL, "unable to close temporary datatype"); - if (H5T_close(tmp_dtype) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCLOSEOBJ, FAIL, "unable to close temporary datatype"); - tmp_stype = tmp_dtype = NULL; + else if ((conv->u.lib_func)(old_path->src, old_path->dst, &cdata, &tmp_ctx, 0, 0, 0, NULL, NULL) < + 0) { if (H5E_clear_stack(NULL) < 0) HGOTO_ERROR(H5E_DATATYPE, H5E_CANTRESET, FAIL, "unable to clear current error stack"); continue; @@ -2608,8 +2604,8 @@ H5T__register(H5T_pers_t pers, const char *name, H5T_t *src, H5T_t *dst, H5T_con #endif } /* end if */ } /* end if */ - else if ((old_path->conv.u.lib_func)(tmp_stype, tmp_dtype, &(old_path->cdata), NULL, 0, 0, 0, - NULL, NULL) < 0) { + else if ((old_path->conv.u.lib_func)(old_path->src, old_path->dst, &(old_path->cdata), NULL, 0, 0, + 0, NULL, NULL) < 0) { #ifdef H5T_DEBUG if (H5DEBUG(T)) fprintf(H5DEBUG(T), @@ -2633,22 +2629,12 @@ H5T__register(H5T_pers_t pers, const char *name, H5T_t *src, H5T_t *dst, H5T_con tmp_sid = H5I_INVALID_HID; tmp_stype = NULL; } - else if (tmp_stype) { - if (H5T_close(tmp_stype) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCLOSEOBJ, FAIL, "can't close temporary datatype"); - tmp_stype = NULL; - } if (tmp_did >= 0) { if (H5I_dec_ref(tmp_did) < 0) HGOTO_ERROR(H5E_DATATYPE, H5E_CANTDEC, FAIL, "can't decrement reference on temporary ID"); tmp_did = H5I_INVALID_HID; tmp_dtype = NULL; } - else if (tmp_dtype) { - if (H5T_close(tmp_dtype) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCLOSEOBJ, FAIL, "can't close temporary datatype"); - tmp_dtype = NULL; - } /* We don't care about any failures during the freeing process */ if (H5E_clear_stack(NULL) < 0) @@ -3039,9 +3025,9 @@ H5Tconvert(hid_t src_id, hid_t dst_id, size_t nelmts, void *buf, void *backgroun herr_t H5Treclaim(hid_t type_id, hid_t space_id, hid_t dxpl_id, void *buf) { - H5T_t *type; - H5S_t *space; /* Dataspace for iteration */ - herr_t ret_value; /* Return value */ + const H5T_t *type; + H5S_t *space; /* Dataspace for iteration */ + herr_t ret_value; /* Return value */ FUNC_ENTER_API(FAIL) H5TRACE4("e", "iii*x", type_id, space_id, dxpl_id, buf); @@ -3049,7 +3035,7 @@ H5Treclaim(hid_t type_id, hid_t space_id, hid_t dxpl_id, void *buf) /* Check args */ if (buf == NULL) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "'buf' pointer is NULL"); - if (NULL == (type = (H5T_t *)H5I_object_verify(type_id, H5I_DATATYPE))) + if (NULL == (type = (const H5T_t *)H5I_object_verify(type_id, H5I_DATATYPE))) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid datatype"); if (NULL == (space = (H5S_t *)H5I_object_verify(space_id, H5I_DATASPACE))) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid dataspace"); @@ -4881,11 +4867,11 @@ H5T_cmp(const H5T_t *dt1, const H5T_t *dt2, bool superset) /*------------------------------------------------------------------------- * Function: H5T_path_find * - * Purpose: Library-internal wrapper to find the path which converts type - * SRC_ID to type DST_ID. + * Purpose: Library-internal wrapper to find the path which converts + * type SRC to type DST. * - * If SRC and DST are both null pointers then the special no-op - * conversion path is used. + * If SRC and DST are both null pointers then the special no-op + * conversion path is used. * * Return: Success: Pointer to the path, valid until the path * database is modified. @@ -4924,17 +4910,17 @@ H5T_path_find(const H5T_t *src, const H5T_t *dst) /*------------------------------------------------------------------------- * Function: H5T__path_find_real * - * Purpose: Finds the path which converts type SRC_ID to type DST_ID, - * creating a new path if necessary. If FUNC is non-zero then - * it is set as the hard conversion function for that path - * regardless of whether the path previously existed. Changing - * the conversion function of a path causes statistics to be - * reset to zero after printing them. The NAME is used only - * when creating a new path and is just for debugging. + * Purpose: Finds the path which converts type SRC to type DST, creating + * a new path if necessary. If FUNC is non-zero then it is set + * as the hard conversion function for that path regardless of + * whether the path previously existed. Changing the conversion + * function of a path causes statistics to be reset to zero + * after printing them. The NAME is used only when creating a + * new path and is just for debugging. * - * If SRC and DST are both null pointers then the special no-op - * conversion path is used. This path is always stored as the - * first path in the path table. + * If SRC and DST are both null pointers then the special no-op + * conversion path is used. This path is always stored as the + * first path in the path table. * * Return: Success: Pointer to the path, valid until the path * database is modified. @@ -5078,13 +5064,18 @@ H5T__path_find_real(const H5T_t *src, const H5T_t *dst, const char *name, H5T_co (!table || (table && conv->is_app) || (table && !table->is_hard && !conv->is_app))) { assert(path != table); assert(NULL == path->conv.u.app_func); - if (path->src && (NULL == (tmp_stype = H5T_copy(path->src, H5T_COPY_ALL)))) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCOPY, NULL, "unable to copy source datatype"); - if (path->dst && (NULL == (tmp_dtype = H5T_copy(path->dst, H5T_COPY_ALL)))) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCOPY, NULL, "unable to copy destination datatype"); path->cdata.command = H5T_CONV_INIT; if (conv->is_app) { + /* Copy the conversion path's source and destination datatypes and + * register an ID for them so we can pass these to the application + * conversion function + */ + if (path->src && (NULL == (tmp_stype = H5T_copy(path->src, H5T_COPY_ALL)))) + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCOPY, NULL, "unable to copy source datatype"); + if (path->dst && (NULL == (tmp_dtype = H5T_copy(path->dst, H5T_COPY_ALL)))) + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCOPY, NULL, "unable to copy destination datatype"); + if (tmp_stype && ((src_id = H5I_register(H5I_DATATYPE, tmp_stype, false)) < 0)) HGOTO_ERROR(H5E_DATATYPE, H5E_CANTREGISTER, NULL, "unable to register ID for source datatype"); @@ -5095,7 +5086,7 @@ H5T__path_find_real(const H5T_t *src, const H5T_t *dst, const char *name, H5T_co if ((conv->u.app_func)(src_id, dst_id, &(path->cdata), 0, 0, 0, NULL, NULL, H5CX_get_dxpl()) < 0) HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, NULL, "unable to initialize conversion function"); } /* end if */ - else if ((conv->u.lib_func)(tmp_stype, tmp_dtype, &(path->cdata), &tmp_ctx, 0, 0, 0, NULL, NULL) < 0) + else if ((conv->u.lib_func)(path->src, path->dst, &(path->cdata), &tmp_ctx, 0, 0, 0, NULL, NULL) < 0) HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, NULL, "unable to initialize conversion function"); if (src_id >= 0) { @@ -5104,22 +5095,12 @@ H5T__path_find_real(const H5T_t *src, const H5T_t *dst, const char *name, H5T_co src_id = H5I_INVALID_HID; tmp_stype = NULL; } - else if (tmp_stype) { - if (H5T_close(tmp_stype) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCLOSEOBJ, NULL, "can't close temporary datatype"); - tmp_stype = NULL; - } if (dst_id >= 0) { if (H5I_dec_ref(dst_id) < 0) HGOTO_ERROR(H5E_DATATYPE, H5E_CANTDEC, NULL, "can't decrement reference on temporary ID"); dst_id = H5I_INVALID_HID; tmp_dtype = NULL; } - else if (tmp_dtype) { - if (H5T_close(tmp_dtype) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCLOSEOBJ, NULL, "can't close temporary datatype"); - tmp_dtype = NULL; - } path->conv = *conv; path->is_hard = true; @@ -5138,19 +5119,21 @@ H5T__path_find_real(const H5T_t *src, const H5T_t *dst, const char *name, H5T_co if (src->shared->type != H5T_g.soft[i].src || dst->shared->type != H5T_g.soft[i].dst) continue; - assert(tmp_stype == NULL); - assert(tmp_dtype == NULL); - - if (NULL == (tmp_stype = H5T_copy(path->src, H5T_COPY_ALL))) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCOPY, NULL, "unable to copy source datatype"); - if (NULL == (tmp_dtype = H5T_copy(path->dst, H5T_COPY_ALL))) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCOPY, NULL, "unable to copy destination datatype"); - path->cdata.command = H5T_CONV_INIT; if (H5T_g.soft[i].conv.is_app) { + /* Copy the conversion path's source and destination datatypes and + * register an ID for them so we can pass these to the application + * conversion function + */ + assert(tmp_stype == NULL); + assert(tmp_dtype == NULL); + if (NULL == (tmp_stype = H5T_copy(path->src, H5T_COPY_ALL))) + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCOPY, NULL, "unable to copy source datatype"); + if (NULL == (tmp_dtype = H5T_copy(path->dst, H5T_COPY_ALL))) + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCOPY, NULL, "unable to copy destination datatype"); + assert(src_id == H5I_INVALID_HID); assert(dst_id == H5I_INVALID_HID); - if ((src_id = H5I_register(H5I_DATATYPE, tmp_stype, false)) < 0) HGOTO_ERROR(H5E_DATATYPE, H5E_CANTREGISTER, NULL, "unable to register ID for source datatype"); @@ -5167,7 +5150,7 @@ H5T__path_find_real(const H5T_t *src, const H5T_t *dst, const char *name, H5T_co path_init_error = true; } /* end if */ } /* end if */ - else if ((H5T_g.soft[i].conv.u.lib_func)(tmp_stype, tmp_dtype, &(path->cdata), &tmp_ctx, 0, 0, 0, + else if ((H5T_g.soft[i].conv.u.lib_func)(path->src, path->dst, &(path->cdata), &tmp_ctx, 0, 0, 0, NULL, NULL) < 0) { memset(&(path->cdata), 0, sizeof(H5T_cdata_t)); /*ignore the error*/ @@ -5190,22 +5173,12 @@ H5T__path_find_real(const H5T_t *src, const H5T_t *dst, const char *name, H5T_co src_id = H5I_INVALID_HID; tmp_stype = NULL; } - else if (tmp_stype) { - if (H5T_close(tmp_stype) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCLOSEOBJ, NULL, "can't close temporary datatype"); - tmp_stype = NULL; - } if (dst_id >= 0) { if (H5I_dec_ref(dst_id) < 0) HGOTO_ERROR(H5E_DATATYPE, H5E_CANTDEC, NULL, "can't decrement reference on temporary ID"); dst_id = H5I_INVALID_HID; tmp_dtype = NULL; } - else if (tmp_dtype) { - if (H5T_close(tmp_dtype) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCLOSEOBJ, NULL, "can't close temporary datatype"); - tmp_dtype = NULL; - } } /* end for */ if (!path->conv.u.app_func) HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, NULL, "no appropriate function for conversion path"); @@ -5288,14 +5261,6 @@ H5T__path_find_real(const H5T_t *src, const H5T_t *dst, const char *name, H5T_co table = path; } /* end else-if */ - /* Set the flag to indicate both source and destination types are compound types - * for the optimization of data reading (in H5Dio.c). - * Make sure that path->are_compounds is only true for compound types. - */ - path->are_compounds = false; - if (H5T_COMPOUND == H5T_get_class(src, true) && H5T_COMPOUND == H5T_get_class(dst, true)) - path->are_compounds = true; - /* Set return value */ ret_value = path; @@ -5563,7 +5528,7 @@ H5T__compiler_conv(H5T_t *src, H5T_t *dst) *------------------------------------------------------------------------- */ herr_t -H5T_convert(H5T_path_t *tpath, H5T_t *src_type, H5T_t *dst_type, size_t nelmts, size_t buf_stride, +H5T_convert(H5T_path_t *tpath, const H5T_t *src_type, const H5T_t *dst_type, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg) { H5T_conv_ctx_t conv_ctx = {0}; @@ -5656,8 +5621,9 @@ H5T_convert(H5T_path_t *tpath, H5T_t *src_type, H5T_t *dst_type, size_t nelmts, *------------------------------------------------------------------------- */ herr_t -H5T_convert_with_ctx(H5T_path_t *tpath, H5T_t *src_type, H5T_t *dst_type, const H5T_conv_ctx_t *conv_ctx, - size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg) +H5T_convert_with_ctx(H5T_path_t *tpath, const H5T_t *src_type, const H5T_t *dst_type, + const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t bkg_stride, + void *buf, void *bkg) { herr_t ret_value = SUCCEED; diff --git a/src/H5Tconv.c b/src/H5Tconv.c index 607b5efe37b..43b642c20ce 100644 --- a/src/H5Tconv.c +++ b/src/H5Tconv.c @@ -1075,11 +1075,13 @@ typedef struct H5T_conv_struct_t { } H5T_conv_struct_t; /* Conversion data for H5T__conv_enum() */ -typedef struct H5T_enum_struct_t { - int base; /*lowest `in' value */ - unsigned length; /*num elements in arrays */ - int *src2dst; /*map from src to dst index */ -} H5T_enum_struct_t; +typedef struct H5T_conv_enum_t { + H5T_t *src_copy; /* cached copy of source datatype */ + H5T_t *dst_copy; /* cached copy of destination datatype */ + int base; /*lowest `in' value */ + unsigned length; /*num elements in arrays */ + int *src2dst; /*map from src to dst index */ +} H5T_conv_enum_t; /* Conversion data for the hardware conversion functions */ typedef struct H5T_conv_hw_t { @@ -1133,7 +1135,7 @@ H5FL_BLK_DEFINE_STATIC(ref_seq); *------------------------------------------------------------------------- */ herr_t -H5T__conv_noop(H5T_t H5_ATTR_UNUSED *src, H5T_t H5_ATTR_UNUSED *dst, H5T_cdata_t *cdata, +H5T__conv_noop(const H5T_t H5_ATTR_UNUSED *src, const H5T_t H5_ATTR_UNUSED *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t H5_ATTR_UNUSED *conv_ctx, size_t H5_ATTR_UNUSED nelmts, size_t H5_ATTR_UNUSED buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void H5_ATTR_UNUSED *buf, void H5_ATTR_UNUSED *background) @@ -1176,9 +1178,9 @@ H5T__conv_noop(H5T_t H5_ATTR_UNUSED *src, H5T_t H5_ATTR_UNUSED *dst, H5T_cdata_t *------------------------------------------------------------------------- */ herr_t -H5T__conv_order_opt(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t H5_ATTR_UNUSED *conv_ctx, - size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *_buf, - void H5_ATTR_UNUSED *background) +H5T__conv_order_opt(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, + const H5T_conv_ctx_t H5_ATTR_UNUSED *conv_ctx, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *_buf, void H5_ATTR_UNUSED *background) { uint8_t *buf = (uint8_t *)_buf; size_t i; @@ -1581,9 +1583,9 @@ H5T__conv_order_opt(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_c *------------------------------------------------------------------------- */ herr_t -H5T__conv_order(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t H5_ATTR_UNUSED *conv_ctx, - size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *_buf, - void H5_ATTR_UNUSED *background) +H5T__conv_order(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, + const H5T_conv_ctx_t H5_ATTR_UNUSED *conv_ctx, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *_buf, void H5_ATTR_UNUSED *background) { uint8_t *buf = (uint8_t *)_buf; size_t i; @@ -1673,8 +1675,8 @@ H5T__conv_order(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *------------------------------------------------------------------------- */ herr_t -H5T__conv_b_b(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, - size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *_buf, +H5T__conv_b_b(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, + size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *_buf, void H5_ATTR_UNUSED *background) { uint8_t *buf = (uint8_t *)_buf; @@ -1998,7 +2000,7 @@ H5T__conv_struct_free(H5T_conv_struct_t *priv) *------------------------------------------------------------------------- */ static herr_t -H5T__conv_struct_init(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx) +H5T__conv_struct_init(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx) { H5T_conv_struct_t *priv = (H5T_conv_struct_t *)(cdata->priv); int *src2dst = NULL; @@ -2244,8 +2246,8 @@ H5T__conv_struct_subset(const H5T_cdata_t *cdata) *------------------------------------------------------------------------- */ herr_t -H5T__conv_struct(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, - size_t buf_stride, size_t bkg_stride, void *_buf, void *_bkg) +H5T__conv_struct(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, + size_t nelmts, size_t buf_stride, size_t bkg_stride, void *_buf, void *_bkg) { uint8_t *buf = (uint8_t *)_buf; /*cast for pointer arithmetic */ uint8_t *bkg = (uint8_t *)_bkg; /*background pointer arithmetic */ @@ -2353,6 +2355,7 @@ H5T__conv_struct(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_ * data point as small as possible with all the free space on the * right side. */ + tmp_conv_ctx.u.conv.recursive = true; for (u = 0, offset = 0; u < src->shared->u.compnd.nmembs; u++) { if (src2dst[u] < 0) continue; /*subsetting*/ @@ -2381,6 +2384,7 @@ H5T__conv_struct(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_ offset += src_memb->size; } /* end else */ } /* end for */ + tmp_conv_ctx.u.conv.recursive = false; /* * For each source member which will be present in the @@ -2389,6 +2393,7 @@ H5T__conv_struct(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_ * yet). Then copy the member to the destination offset in the * background buffer. */ + tmp_conv_ctx.u.conv.recursive = true; H5_CHECK_OVERFLOW(src->shared->u.compnd.nmembs, size_t, int); for (int i = (int)src->shared->u.compnd.nmembs - 1; i >= 0; --i) { if (src2dst[i] < 0) @@ -2415,6 +2420,8 @@ H5T__conv_struct(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_ offset -= dst_memb->size; memmove(xbkg + dst_memb->offset, xbuf + offset, dst_memb->size); } /* end for */ + tmp_conv_ctx.u.conv.recursive = false; + assert(0 == offset); /* @@ -2489,7 +2496,7 @@ H5T__conv_struct(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_ *------------------------------------------------------------------------- */ herr_t -H5T__conv_struct_opt(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, +H5T__conv_struct_opt(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *_buf, void *_bkg) { uint8_t *buf = (uint8_t *)_buf; /*cast for pointer arithmetic */ @@ -2648,6 +2655,7 @@ H5T__conv_struct_opt(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ * destination in the bkg buffer. Otherwise move the element as far * left as possible in the buffer. */ + tmp_conv_ctx.u.conv.recursive = true; for (u = 0, offset = 0; u < src->shared->u.compnd.nmembs; u++) { if (src2dst[u] < 0) continue; /*subsetting*/ @@ -2683,6 +2691,7 @@ H5T__conv_struct_opt(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ offset += src_memb->size; } /* end else */ } /* end else */ + tmp_conv_ctx.u.conv.recursive = false; /* * Work from right to left, converting those members that weren't @@ -2690,6 +2699,7 @@ H5T__conv_struct_opt(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ * is larger than the source) and them to their final position in the * bkg buffer. */ + tmp_conv_ctx.u.conv.recursive = true; H5_CHECK_OVERFLOW(src->shared->u.compnd.nmembs, size_t, int); for (int i = (int)src->shared->u.compnd.nmembs - 1; i >= 0; --i) { if (src2dst[i] < 0) @@ -2719,7 +2729,8 @@ H5T__conv_struct_opt(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ } /* end for */ } /* end if */ } /* end for */ - } /* end else */ + tmp_conv_ctx.u.conv.recursive = false; + } /* end else */ if (no_stride) buf_stride = dst->shared->size; @@ -2741,6 +2752,37 @@ H5T__conv_struct_opt(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ FUNC_LEAVE_NOAPI(ret_value) } /* end H5T__conv_struct_opt() */ +/*------------------------------------------------------------------------- + * Function: H5T__conv_enum_free + * + * Purpose: Free the private data structure used by the enum conversion + * functions. + * + * Return: Non-negative on success/Negative on failure + * + *------------------------------------------------------------------------- + */ +static herr_t +H5T__conv_enum_free(H5T_conv_enum_t *priv) +{ + herr_t ret_value = SUCCEED; + + FUNC_ENTER_PACKAGE + + if (priv) { + free(priv->src2dst); + + if (priv->dst_copy && H5T_close(priv->dst_copy) < 0) + HDONE_ERROR(H5E_DATATYPE, H5E_CANTCLOSEOBJ, FAIL, "unable to close copied source datatype"); + if (priv->src_copy && H5T_close(priv->src_copy) < 0) + HDONE_ERROR(H5E_DATATYPE, H5E_CANTCLOSEOBJ, FAIL, "unable to close copied destination datatype"); + + free(priv); + } + + FUNC_LEAVE_NOAPI(ret_value) +} /* end H5T__conv_enum_free() */ + /*------------------------------------------------------------------------- * Function: H5T__conv_enum_init * @@ -2753,131 +2795,205 @@ H5T__conv_struct_opt(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ *------------------------------------------------------------------------- */ static herr_t -H5T__conv_enum_init(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata) -{ - H5T_enum_struct_t *priv = NULL; /*private conversion data */ - int n; /*src value cast as native int */ - int domain[2] = {0, 0}; /*min and max source values */ - int *map = NULL; /*map from src value to dst idx */ - unsigned length; /*nelmts in map array */ - unsigned i, j; /*counters */ - herr_t ret_value = SUCCEED; /* Return value */ +H5T__conv_enum_init(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx) +{ + H5T_conv_enum_t *priv = NULL; /* Private conversion data */ + int *map = NULL; /* Map from src value to dst idx */ + bool rebuild_cache = false; + herr_t ret_value = SUCCEED; FUNC_ENTER_PACKAGE cdata->need_bkg = H5T_BKG_NO; - if (NULL == (priv = (H5T_enum_struct_t *)(cdata->priv = H5MM_calloc(sizeof(*priv))))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed"); - if (0 == src->shared->u.enumer.nmembs) - HGOTO_DONE(SUCCEED); - /* - * Check that the source symbol names are a subset of the destination - * symbol names and build a map from source member index to destination - * member index. - */ - H5T__sort_name(src, NULL); - H5T__sort_name(dst, NULL); - if (NULL == (priv->src2dst = (int *)H5MM_malloc(src->shared->u.enumer.nmembs * sizeof(int)))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed"); - for (i = 0, j = 0; i < src->shared->u.enumer.nmembs && j < dst->shared->u.enumer.nmembs; i++, j++) { - while (j < dst->shared->u.enumer.nmembs && - strcmp(src->shared->u.enumer.name[i], dst->shared->u.enumer.name[j]) != 0) - j++; - if (j >= dst->shared->u.enumer.nmembs) - HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, - "source type is not a subset of destination type"); - priv->src2dst[i] = (int)j; - } /* end for */ + priv = (H5T_conv_enum_t *)(cdata->priv); + if (!priv) { + if (NULL == (priv = (H5T_conv_enum_t *)(cdata->priv = calloc(1, sizeof(*priv))))) + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed"); + if (0 == src->shared->u.enumer.nmembs) + HGOTO_DONE(SUCCEED); - /* - * The conversion function will use an O(log N) lookup method for each - * value converted. However, if all of the following constraints are met - * then we can build a perfect hash table and use an O(1) lookup method. - * - * A: The source datatype size matches one of our native datatype - * sizes. - * - * B: After casting the source value bit pattern to a native type - * the size of the range of values is less than 20% larger than - * the number of values. - * - * If this special case is met then we use the source bit pattern cast as - * a native integer type as an index into the `val2dst'. The values of - * that array are the index numbers in the destination type or negative - * if the entry is unused. - * - * (This optimized algorithm doesn't work when the byte orders are different. - * The code such as "n = *((int*)(src->shared->u.enumer.value+i*src->shared->size));" - * can change the value significantly. i.g. if the source value is big-endian 0x0000000f, - * executing the casting on little-endian machine will get a big number 0x0f000000. - * Then it can't meet the condition - * "if(src->shared->u.enumer.nmembs<2 || (double)length/src->shared->u.enumer.nmembs<1.2)" - * Because this is the optimized code, we won't fix it. It should still work in some - * situations. SLU - 2011/5/24) - */ - if (1 == src->shared->size || sizeof(short) == src->shared->size || sizeof(int) == src->shared->size) { - for (i = 0; i < src->shared->u.enumer.nmembs; i++) { - if (1 == src->shared->size) - n = *((signed char *)((uint8_t *)src->shared->u.enumer.value + i)); - else if (sizeof(short) == src->shared->size) - n = *((short *)((void *)((uint8_t *)src->shared->u.enumer.value + (i * src->shared->size)))); - else - n = *((int *)((void *)((uint8_t *)src->shared->u.enumer.value + (i * src->shared->size)))); - if (0 == i) { - domain[0] = domain[1] = n; - } - else { - domain[0] = MIN(domain[0], n); - domain[1] = MAX(domain[1], n); - } - } /* end for */ + rebuild_cache = true; + } + else { + /* Check if we need to rebuild our cache. For now, treat + * enums as different even if one is just a subset of the + * other + */ + if (cdata->command == H5T_CONV_CONV && conv_ctx->u.conv.recursive) + /* Recursive conversion; we can reuse the cache */ + rebuild_cache = false; + else { + if (0 != H5T_cmp(src, priv->src_copy, false) || 0 != H5T_cmp(dst, priv->dst_copy, false)) + rebuild_cache = true; + } + } - assert(domain[1] >= domain[0]); - length = (unsigned)(domain[1] - domain[0]) + 1; - if (src->shared->u.enumer.nmembs < 2 || - (double)length / src->shared->u.enumer.nmembs < (double)(1.2F)) { - priv->base = domain[0]; - priv->length = length; - if (NULL == (map = (int *)H5MM_malloc(length * sizeof(int)))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed"); - for (i = 0; i < length; i++) - map[i] = -1; /*entry unused*/ - for (i = 0; i < src->shared->u.enumer.nmembs; i++) { - if (1 == src->shared->size) - n = *((signed char *)((uint8_t *)src->shared->u.enumer.value + i)); - else if (sizeof(short) == src->shared->size) - n = *(( - short *)((void *)((uint8_t *)src->shared->u.enumer.value + (i * src->shared->size)))); - else - n = *( - (int *)((void *)((uint8_t *)src->shared->u.enumer.value + (i * src->shared->size)))); - n -= priv->base; - assert(n >= 0 && (unsigned)n < priv->length); - assert(map[n] < 0); - map[n] = priv->src2dst[i]; - } /* end for */ + if (rebuild_cache) { + H5T_shared_t *src_sh; + H5T_shared_t *dst_sh; + size_t src_nmembs; + size_t dst_nmembs; + void *tmp_realloc; - /* - * Replace original src2dst array with our new one. The original - * was indexed by source member number while the new one is - * indexed by source values. - */ - H5MM_xfree(priv->src2dst); - priv->src2dst = map; + if (0 == src->shared->u.enumer.nmembs) HGOTO_DONE(SUCCEED); + + /* Allocate everything we need to cache */ + if (priv->src_copy && H5T_close(priv->src_copy) < 0) + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCLOSEOBJ, FAIL, "unable to close copied source datatype"); + if (priv->dst_copy && H5T_close(priv->dst_copy) < 0) + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCLOSEOBJ, FAIL, "unable to close copied destination datatype"); + + if (NULL == (priv->src_copy = H5T_copy(src, H5T_COPY_ALL))) + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCOPY, FAIL, "unable to copy source datatype"); + if (NULL == (priv->dst_copy = H5T_copy(dst, H5T_COPY_ALL))) + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCOPY, FAIL, "unable to copy destination datatype"); + + src_sh = priv->src_copy->shared; + dst_sh = priv->src_copy->shared; + src_nmembs = src_sh->u.enumer.nmembs; + dst_nmembs = dst_sh->u.enumer.nmembs; + + if (NULL == (tmp_realloc = realloc(priv->src2dst, src_nmembs * sizeof(int)))) { + free(priv->src2dst); + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, + "unable to allocate space for source to destination enum mapping"); } + priv->src2dst = tmp_realloc; + + /* + * Check that the source symbol names are a subset of the destination + * symbol names and build a map from source member index to destination + * member index. + */ + H5T__sort_name(priv->src_copy, NULL); + H5T__sort_name(priv->dst_copy, NULL); + for (size_t i = 0, j = 0; i < src_nmembs && j < dst_nmembs; i++, j++) { + char *src_name = src_sh->u.enumer.name[i]; + char *dst_name = dst_sh->u.enumer.name[j]; + + while (j < dst_nmembs && strcmp(src_name, dst_name) != 0) + j++; + + if (j >= dst_nmembs) + HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, + "source enum type is not a subset of destination enum type"); + + H5_CHECKED_ASSIGN(priv->src2dst[i], int, j, size_t); + } + + /* + * The conversion function will use an O(log N) lookup method for each + * value converted. However, if all of the following constraints are met + * then we can build a perfect hash table and use an O(1) lookup method. + * + * A: The source datatype size matches one of our native datatype + * sizes. + * + * B: After casting the source value bit pattern to a native type + * the size of the range of values is less than 20% larger than + * the number of values. + * + * If this special case is met then we use the source bit pattern cast as + * a native integer type as an index into the `val2dst'. The values of + * that array are the index numbers in the destination type or negative + * if the entry is unused. + * + * (This optimized algorithm doesn't work when the byte orders are different. + * The code such as "n = *((int*)(src->shared->u.enumer.value+i*src->shared->size));" + * can change the value significantly. i.g. if the source value is big-endian 0x0000000f, + * executing the casting on little-endian machine will get a big number 0x0f000000. + * Then it can't meet the condition + * "if(src->shared->u.enumer.nmembs<2 || (double)length/src->shared->u.enumer.nmembs<1.2)" + * Because this is the optimized code, we won't fix it. It should still work in some + * situations. SLU - 2011/5/24) + */ + if (1 == src_sh->size || sizeof(short) == src_sh->size || sizeof(int) == src_sh->size) { + unsigned length; + int domain[2] = {0, 0}; /* Min and max source values */ + + for (size_t i = 0; i < src_nmembs; i++) { + int n; + + if (1 == src_sh->size) + n = *((signed char *)((uint8_t *)src_sh->u.enumer.value + i)); + else if (sizeof(short) == src_sh->size) + n = *((short *)((void *)((uint8_t *)src_sh->u.enumer.value + (i * src_sh->size)))); + else + n = *((int *)((void *)((uint8_t *)src_sh->u.enumer.value + (i * src_sh->size)))); + if (0 == i) { + domain[0] = domain[1] = n; + } + else { + domain[0] = MIN(domain[0], n); + domain[1] = MAX(domain[1], n); + } + } + assert(domain[1] >= domain[0]); + + length = (unsigned)(domain[1] - domain[0]) + 1; + if (src_nmembs < 2 || ((double)length / (double)src_nmembs < (double)(1.2F))) { + priv->base = domain[0]; + priv->length = length; + + if (NULL == (map = malloc(length * sizeof(int)))) + HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "memory allocation failed"); + + for (size_t i = 0; i < length; i++) + map[i] = -1; /*entry unused*/ + + for (size_t i = 0; i < src_nmembs; i++) { + int n; + + if (1 == src_sh->size) + n = *((signed char *)((uint8_t *)src_sh->u.enumer.value + i)); + else if (sizeof(short) == src_sh->size) + n = *((short *)((void *)((uint8_t *)src_sh->u.enumer.value + (i * src_sh->size)))); + else + n = *((int *)((void *)((uint8_t *)src_sh->u.enumer.value + (i * src_sh->size)))); + n -= priv->base; + assert(n >= 0 && (unsigned)n < priv->length); + assert(map[n] < 0); + map[n] = priv->src2dst[i]; + } + + /* + * Replace original src2dst array with our new one. The original + * was indexed by source member number while the new one is + * indexed by source values. + */ + free(priv->src2dst); + priv->src2dst = map; + + HGOTO_DONE(SUCCEED); + } + } + + /* Sort source type by value and adjust src2dst[] appropriately */ + H5T__sort_value(priv->src_copy, priv->src2dst); } - /* Sort source type by value and adjust src2dst[] appropriately */ - H5T__sort_value(src, priv->src2dst); +#ifdef H5T_DEBUG + if (H5DEBUG(T)) { + fprintf(H5DEBUG(T), " Using %s mapping function%s\n", priv->length ? "O(1)" : "O(log N)", + priv->length ? "" : ", where N is the number of enum members"); + } +#endif done: if (ret_value < 0 && priv) { - H5MM_xfree(priv->src2dst); - H5MM_xfree(priv); + if (map) { + free(map); + priv->src2dst = NULL; + } + + if (H5T__conv_enum_free(priv) < 0) + HDONE_ERROR(H5E_DATATYPE, H5E_CANTFREE, FAIL, "can't free enum conversion data"); + cdata->priv = NULL; } + FUNC_LEAVE_NOAPI(ret_value) } @@ -2893,17 +3009,20 @@ H5T__conv_enum_init(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata) *------------------------------------------------------------------------- */ herr_t -H5T__conv_enum(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, - size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *_buf, void H5_ATTR_UNUSED *bkg) +H5T__conv_enum(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, + size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *_buf, + void H5_ATTR_UNUSED *bkg) { - uint8_t *buf = (uint8_t *)_buf; /*cast for pointer arithmetic */ - uint8_t *s = NULL, *d = NULL; /*src and dst BUF pointers */ - ssize_t src_delta, dst_delta; /*conversion strides */ - int n; /*src value cast as native int */ - H5T_enum_struct_t *priv = (H5T_enum_struct_t *)(cdata->priv); - H5T_conv_ret_t except_ret; /*return of callback function */ - size_t i; /*counters */ - herr_t ret_value = SUCCEED; /* Return value */ + H5T_conv_enum_t *priv = (H5T_conv_enum_t *)(cdata->priv); + H5T_shared_t *src_sh = NULL; + H5T_shared_t *dst_sh = NULL; + uint8_t *buf = (uint8_t *)_buf; /*cast for pointer arithmetic */ + uint8_t *s = NULL, *d = NULL; /*src and dst BUF pointers */ + ssize_t src_delta, dst_delta; /*conversion strides */ + int n; /*src value cast as native int */ + H5T_conv_ret_t except_ret; /*return of callback function */ + size_t i; /*counters */ + herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_PACKAGE @@ -2922,23 +3041,18 @@ H5T__conv_enum(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t if (H5T_ENUM != dst->shared->type) HGOTO_ERROR(H5E_DATATYPE, H5E_BADTYPE, FAIL, "not a H5T_ENUM datatype"); - if (H5T__conv_enum_init(src, dst, cdata) < 0) + if (H5T__conv_enum_init(src, dst, cdata, conv_ctx) < 0) HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to initialize private data"); break; - case H5T_CONV_FREE: -#ifdef H5T_DEBUG - if (H5DEBUG(T)) { - fprintf(H5DEBUG(T), " Using %s mapping function%s\n", priv->length ? "O(1)" : "O(log N)", - priv->length ? "" : ", where N is the number of enum members"); - } -#endif - if (priv) { - H5MM_xfree(priv->src2dst); - H5MM_xfree(priv); - } - cdata->priv = NULL; + case H5T_CONV_FREE: { + herr_t status = H5T__conv_enum_free(priv); + cdata->priv = NULL; + if (status < 0) + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTFREE, FAIL, "unable to free private conversion data"); + break; + } case H5T_CONV_CONV: if (NULL == src || NULL == dst) @@ -2950,13 +3064,12 @@ H5T__conv_enum(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t if (H5T_ENUM != dst->shared->type) HGOTO_ERROR(H5E_DATATYPE, H5E_BADTYPE, FAIL, "not a H5T_ENUM datatype"); - /* priv->src2dst map was computed for certain sort keys. Make sure those same - * sort keys are used here during conversion. See H5T__conv_enum_init(). But - * we actually don't care about the source type's order when doing the O(1) - * conversion algorithm, which is turned on by non-zero priv->length */ - H5T__sort_name(dst, NULL); - if (!priv->length) - H5T__sort_value(src, NULL); + /* Reuse cache if possible, rebuild otherwise */ + if (H5T__conv_enum_init(src, dst, cdata, conv_ctx) < 0) + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to initialize private data"); + + src_sh = priv->src_copy->shared; + dst_sh = priv->dst_copy->shared; /* * Direction of conversion. @@ -2966,18 +3079,18 @@ H5T__conv_enum(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t src_delta = dst_delta = (ssize_t)buf_stride; s = d = buf; } - else if (dst->shared->size <= src->shared->size) { - H5_CHECKED_ASSIGN(src_delta, ssize_t, src->shared->size, size_t); - H5_CHECKED_ASSIGN(dst_delta, ssize_t, dst->shared->size, size_t); + else if (dst_sh->size <= src_sh->size) { + H5_CHECKED_ASSIGN(src_delta, ssize_t, src_sh->size, size_t); + H5_CHECKED_ASSIGN(dst_delta, ssize_t, dst_sh->size, size_t); s = d = buf; } else { - H5_CHECK_OVERFLOW(src->shared->size, size_t, ssize_t); - H5_CHECK_OVERFLOW(dst->shared->size, size_t, ssize_t); - src_delta = -(ssize_t)src->shared->size; - dst_delta = -(ssize_t)dst->shared->size; - s = buf + (nelmts - 1) * src->shared->size; - d = buf + (nelmts - 1) * dst->shared->size; + H5_CHECK_OVERFLOW(src_sh->size, size_t, ssize_t); + H5_CHECK_OVERFLOW(dst_sh->size, size_t, ssize_t); + src_delta = -(ssize_t)src_sh->size; + dst_delta = -(ssize_t)dst_sh->size; + s = buf + (nelmts - 1) * src_sh->size; + d = buf + (nelmts - 1) * dst_sh->size; } for (i = 0; i < nelmts; i++, s += src_delta, d += dst_delta) { @@ -2989,9 +3102,9 @@ H5T__conv_enum(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t * optimization code. Please also see the comment in the H5T__conv_enum_init() function. * SLU - 2011/5/24) */ - if (1 == src->shared->size) + if (1 == src_sh->size) n = *((signed char *)s); - else if (sizeof(short) == src->shared->size) + else if (sizeof(short) == src_sh->size) n = *((short *)((void *)s)); else n = *((int *)((void *)s)); @@ -3006,28 +3119,28 @@ H5T__conv_enum(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t conv_ctx->u.conv.dst_type_id, s, d, conv_ctx->u.conv.cb_struct.user_data); if (except_ret == H5T_CONV_UNHANDLED) - memset(d, 0xff, dst->shared->size); + memset(d, 0xff, dst_sh->size); else if (except_ret == H5T_CONV_ABORT) HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL, "can't handle conversion exception"); } else H5MM_memcpy(d, - (uint8_t *)dst->shared->u.enumer.value + - ((unsigned)priv->src2dst[n] * dst->shared->size), - dst->shared->size); + (uint8_t *)dst_sh->u.enumer.value + + ((unsigned)priv->src2dst[n] * dst_sh->size), + dst_sh->size); } /* end if */ else { /* Use O(log N) lookup */ unsigned lt = 0; - unsigned rt = src->shared->u.enumer.nmembs; + unsigned rt = src_sh->u.enumer.nmembs; unsigned md = 0; int cmp; while (lt < rt) { - md = (lt + rt) / 2; - cmp = memcmp(s, (uint8_t *)src->shared->u.enumer.value + (md * src->shared->size), - src->shared->size); + md = (lt + rt) / 2; + cmp = + memcmp(s, (uint8_t *)src_sh->u.enumer.value + (md * src_sh->size), src_sh->size); if (cmp < 0) rt = md; else if (cmp > 0) @@ -3044,7 +3157,7 @@ H5T__conv_enum(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t conv_ctx->u.conv.dst_type_id, s, d, conv_ctx->u.conv.cb_struct.user_data); if (except_ret == H5T_CONV_UNHANDLED) - memset(d, 0xff, dst->shared->size); + memset(d, 0xff, dst_sh->size); else if (except_ret == H5T_CONV_ABORT) HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL, "can't handle conversion exception"); @@ -3052,9 +3165,9 @@ H5T__conv_enum(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t else { assert(priv->src2dst[md] >= 0); H5MM_memcpy(d, - (uint8_t *)dst->shared->u.enumer.value + - ((unsigned)priv->src2dst[md] * dst->shared->size), - dst->shared->size); + (uint8_t *)dst_sh->u.enumer.value + + ((unsigned)priv->src2dst[md] * dst_sh->size), + dst_sh->size); } /* end else */ } /* end else */ } @@ -3085,13 +3198,12 @@ H5T__conv_enum(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *------------------------------------------------------------------------- */ herr_t -H5T__conv_enum_numeric(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, +H5T__conv_enum_numeric(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t H5_ATTR_UNUSED *conv_ctx, size_t nelmts, size_t H5_ATTR_UNUSED buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *_buf, void H5_ATTR_UNUSED *bkg) { H5T_t *src_parent; /*parent type for src */ - H5T_t *tmp_type = NULL; /*temporary datatype for parent type */ H5T_path_t *tpath; /* Conversion information */ herr_t ret_value = SUCCEED; /* Return value */ @@ -3127,11 +3239,8 @@ H5T__conv_enum_numeric(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, "unable to convert between src and dest datatype"); } else if (!H5T_path_noop(tpath)) { - if (NULL == (tmp_type = H5T_copy(src_parent, H5T_COPY_ALL))) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCOPY, FAIL, "can't copy parent datatype"); - /* Convert the data */ - if (H5T_convert(tpath, tmp_type, dst, nelmts, buf_stride, bkg_stride, _buf, bkg) < 0) + if (H5T_convert(tpath, src_parent, dst, nelmts, buf_stride, bkg_stride, _buf, bkg) < 0) HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "datatype conversion failed"); } break; @@ -3142,10 +3251,6 @@ H5T__conv_enum_numeric(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, } /* end switch */ done: - /* Release the temporary datatype used */ - if (tmp_type && (H5T_close(tmp_type) < 0)) - HDONE_ERROR(H5E_DATATYPE, H5E_CANTCLOSEOBJ, FAIL, "can't close temporary datatype"); - FUNC_LEAVE_NOAPI(ret_value) } /* end H5T__conv_enum_numeric() */ @@ -3171,8 +3276,8 @@ H5T__conv_enum_numeric(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, *------------------------------------------------------------------------- */ herr_t -H5T__conv_vlen(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, - size_t buf_stride, size_t bkg_stride, void *buf, void *bkg) +H5T__conv_vlen(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, + size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg) { H5T_vlen_alloc_info_t vl_alloc_info; /* VL allocation info */ H5T_conv_ctx_t tmp_conv_ctx = {0}; /* Temporary conversion context */ @@ -3484,10 +3589,12 @@ H5T__conv_vlen(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t } /* end if */ /* Convert VL sequence */ + tmp_conv_ctx.u.conv.recursive = true; if (H5T_convert_with_ctx(tpath, tsrc_cpy, tdst_cpy, &tmp_conv_ctx, seq_len, (size_t)0, (size_t)0, conv_buf, tmp_buf) < 0) HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCONVERT, FAIL, "datatype conversion failed"); + tmp_conv_ctx.u.conv.recursive = false; } /* end if */ /* Write sequence to destination location */ @@ -3576,8 +3683,9 @@ H5T__conv_vlen(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *------------------------------------------------------------------------- */ herr_t -H5T__conv_array(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t H5_ATTR_UNUSED *conv_ctx, - size_t nelmts, size_t buf_stride, size_t bkg_stride, void *_buf, void H5_ATTR_UNUSED *_bkg) +H5T__conv_array(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, + const H5T_conv_ctx_t H5_ATTR_UNUSED *conv_ctx, size_t nelmts, size_t buf_stride, + size_t bkg_stride, void *_buf, void H5_ATTR_UNUSED *_bkg) { H5T_conv_ctx_t tmp_conv_ctx = {0}; /* Temporary conversion context */ H5T_path_t *tpath; /* Type conversion path */ @@ -3704,6 +3812,7 @@ H5T__conv_array(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t } /* end if */ /* Perform the actual conversion */ + tmp_conv_ctx.u.conv.recursive = true; for (size_t elmtno = 0; elmtno < nelmts; elmtno++) { /* Copy the source array into the correct location for the destination */ memmove(dp, sp, src->shared->size); @@ -3717,6 +3826,7 @@ H5T__conv_array(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t sp += src_delta; dp += dst_delta; } /* end for */ + tmp_conv_ctx.u.conv.recursive = false; break; @@ -3760,8 +3870,9 @@ H5T__conv_array(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *------------------------------------------------------------------------- */ herr_t -H5T__conv_ref(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t H5_ATTR_UNUSED *conv_ctx, - size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg) +H5T__conv_ref(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, + const H5T_conv_ctx_t H5_ATTR_UNUSED *conv_ctx, size_t nelmts, size_t buf_stride, + size_t bkg_stride, void *buf, void *bkg) { uint8_t *s = NULL; /* source buffer */ uint8_t *d = NULL; /* destination buffer */ @@ -3970,8 +4081,9 @@ H5T__conv_ref(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t H *------------------------------------------------------------------------- */ herr_t -H5T__conv_i_i(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, - size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +H5T__conv_i_i(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, + size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, + void H5_ATTR_UNUSED *bkg) { ssize_t src_delta, dst_delta; /*source & destination stride */ int direction; /*direction of traversal */ @@ -4417,8 +4529,9 @@ H5T__conv_i_i(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t * *------------------------------------------------------------------------- */ herr_t -H5T__conv_f_f(H5T_t *src_p, H5T_t *dst_p, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, - size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +H5T__conv_f_f(const H5T_t *src_p, const H5T_t *dst_p, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, + size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, + void H5_ATTR_UNUSED *bkg) { /* Traversal-related variables */ H5T_atomic_t src; /*atomic source info */ @@ -5007,9 +5120,9 @@ H5T__conv_f_f(H5T_t *src_p, H5T_t *dst_p, H5T_cdata_t *cdata, const H5T_conv_ctx *------------------------------------------------------------------------- */ herr_t -H5T__conv_s_s(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t H5_ATTR_UNUSED *conv_ctx, - size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, - void H5_ATTR_UNUSED *bkg) +H5T__conv_s_s(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, + const H5T_conv_ctx_t H5_ATTR_UNUSED *conv_ctx, size_t nelmts, size_t buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) { ssize_t src_delta, dst_delta; /*source & destination stride */ int direction; /*direction of traversal */ @@ -5249,8 +5362,8 @@ H5T__conv_s_s(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t H *------------------------------------------------------------------------- */ herr_t -H5T__conv_schar_uchar(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, - size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, +H5T__conv_schar_uchar(const H5T_t *st, const H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, + size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) { H5T_CONV_su(SCHAR, UCHAR, signed char, unsigned char, -, -); @@ -5268,8 +5381,8 @@ H5T__conv_schar_uchar(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_c *------------------------------------------------------------------------- */ herr_t -H5T__conv_uchar_schar(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, - size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, +H5T__conv_uchar_schar(const H5T_t *st, const H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, + size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) { H5T_CONV_us(UCHAR, SCHAR, unsigned char, signed char, -, SCHAR_MAX); @@ -5287,8 +5400,8 @@ H5T__conv_uchar_schar(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_c *------------------------------------------------------------------------- */ herr_t -H5T__conv_schar_short(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, - size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, +H5T__conv_schar_short(const H5T_t *st, const H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, + size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) { H5T_CONV_sS(SCHAR, SHORT, signed char, short, -, -); @@ -5306,7 +5419,7 @@ H5T__conv_schar_short(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_c *------------------------------------------------------------------------- */ herr_t -H5T__conv_schar_ushort(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, +H5T__conv_schar_ushort(const H5T_t *st, const H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) { @@ -5325,8 +5438,8 @@ H5T__conv_schar_ushort(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ *------------------------------------------------------------------------- */ herr_t -H5T__conv_uchar_short(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, - size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, +H5T__conv_uchar_short(const H5T_t *st, const H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, + size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) { H5T_CONV_uS(UCHAR, SHORT, unsigned char, short, -, SHRT_MAX); @@ -5344,7 +5457,7 @@ H5T__conv_uchar_short(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_c *------------------------------------------------------------------------- */ herr_t -H5T__conv_uchar_ushort(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, +H5T__conv_uchar_ushort(const H5T_t *st, const H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) { @@ -5363,8 +5476,9 @@ H5T__conv_uchar_ushort(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ *------------------------------------------------------------------------- */ herr_t -H5T__conv_schar_int(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, - size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +H5T__conv_schar_int(const H5T_t *st, const H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, + size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, + void H5_ATTR_UNUSED *bkg) { H5T_CONV_sS(SCHAR, INT, signed char, int, -, -); } @@ -5381,8 +5495,9 @@ H5T__conv_schar_int(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx *------------------------------------------------------------------------- */ herr_t -H5T__conv_schar_uint(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, - size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +H5T__conv_schar_uint(const H5T_t *st, const H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, + size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, + void H5_ATTR_UNUSED *bkg) { H5T_CONV_sU(SCHAR, UINT, signed char, unsigned, -, -); } @@ -5399,8 +5514,9 @@ H5T__conv_schar_uint(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ct *------------------------------------------------------------------------- */ herr_t -H5T__conv_uchar_int(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, - size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +H5T__conv_uchar_int(const H5T_t *st, const H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, + size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, + void H5_ATTR_UNUSED *bkg) { H5T_CONV_uS(UCHAR, INT, unsigned char, int, -, INT_MAX); } @@ -5417,8 +5533,9 @@ H5T__conv_uchar_int(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx *------------------------------------------------------------------------- */ herr_t -H5T__conv_uchar_uint(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, - size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +H5T__conv_uchar_uint(const H5T_t *st, const H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, + size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, + void H5_ATTR_UNUSED *bkg) { H5T_CONV_uU(UCHAR, UINT, unsigned char, unsigned, -, -); } @@ -5435,8 +5552,9 @@ H5T__conv_uchar_uint(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ct *------------------------------------------------------------------------- */ herr_t -H5T__conv_schar_long(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, - size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +H5T__conv_schar_long(const H5T_t *st, const H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, + size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, + void H5_ATTR_UNUSED *bkg) { H5T_CONV_sS(SCHAR, LONG, signed char, long, -, -); } @@ -5453,8 +5571,8 @@ H5T__conv_schar_long(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ct *------------------------------------------------------------------------- */ herr_t -H5T__conv_schar_ulong(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, - size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, +H5T__conv_schar_ulong(const H5T_t *st, const H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, + size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) { H5T_CONV_sU(SCHAR, ULONG, signed char, unsigned long, -, -); @@ -5472,8 +5590,9 @@ H5T__conv_schar_ulong(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_c *------------------------------------------------------------------------- */ herr_t -H5T__conv_uchar_long(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, - size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +H5T__conv_uchar_long(const H5T_t *st, const H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, + size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, + void H5_ATTR_UNUSED *bkg) { H5T_CONV_uS(UCHAR, LONG, unsigned char, long, -, LONG_MAX); } @@ -5490,8 +5609,8 @@ H5T__conv_uchar_long(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ct *------------------------------------------------------------------------- */ herr_t -H5T__conv_uchar_ulong(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, - size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, +H5T__conv_uchar_ulong(const H5T_t *st, const H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, + size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) { H5T_CONV_uU(UCHAR, ULONG, unsigned char, unsigned long, -, -); @@ -5509,8 +5628,8 @@ H5T__conv_uchar_ulong(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_c *------------------------------------------------------------------------- */ herr_t -H5T__conv_schar_llong(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, - size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, +H5T__conv_schar_llong(const H5T_t *st, const H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, + size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) { H5T_CONV_sS(SCHAR, LLONG, signed char, long long, -, -); @@ -5528,7 +5647,7 @@ H5T__conv_schar_llong(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_c *------------------------------------------------------------------------- */ herr_t -H5T__conv_schar_ullong(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, +H5T__conv_schar_ullong(const H5T_t *st, const H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) { @@ -5547,8 +5666,8 @@ H5T__conv_schar_ullong(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ *------------------------------------------------------------------------- */ herr_t -H5T__conv_uchar_llong(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, - size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, +H5T__conv_uchar_llong(const H5T_t *st, const H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, + size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) { H5T_CONV_uS(UCHAR, LLONG, unsigned char, long long, -, LLONG_MAX); @@ -5566,7 +5685,7 @@ H5T__conv_uchar_llong(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_c *------------------------------------------------------------------------- */ herr_t -H5T__conv_uchar_ullong(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, +H5T__conv_uchar_ullong(const H5T_t *st, const H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) { @@ -5585,8 +5704,8 @@ H5T__conv_uchar_ullong(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ *------------------------------------------------------------------------- */ herr_t -H5T__conv_short_schar(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, - size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, +H5T__conv_short_schar(const H5T_t *st, const H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, + size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) { H5T_CONV_Ss(SHORT, SCHAR, short, signed char, SCHAR_MIN, SCHAR_MAX); @@ -5604,8 +5723,8 @@ H5T__conv_short_schar(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_c *------------------------------------------------------------------------- */ herr_t -H5T__conv_short_uchar(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, - size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, +H5T__conv_short_uchar(const H5T_t *st, const H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, + size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) { H5T_CONV_Su(SHORT, UCHAR, short, unsigned char, -, UCHAR_MAX); @@ -5623,7 +5742,7 @@ H5T__conv_short_uchar(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_c *------------------------------------------------------------------------- */ herr_t -H5T__conv_ushort_schar(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, +H5T__conv_ushort_schar(const H5T_t *st, const H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) { @@ -5642,7 +5761,7 @@ H5T__conv_ushort_schar(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ *------------------------------------------------------------------------- */ herr_t -H5T__conv_ushort_uchar(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, +H5T__conv_ushort_uchar(const H5T_t *st, const H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) { @@ -5661,7 +5780,7 @@ H5T__conv_ushort_uchar(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ *------------------------------------------------------------------------- */ herr_t -H5T__conv_short_ushort(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, +H5T__conv_short_ushort(const H5T_t *st, const H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) { @@ -5680,7 +5799,7 @@ H5T__conv_short_ushort(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ *------------------------------------------------------------------------- */ herr_t -H5T__conv_ushort_short(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, +H5T__conv_ushort_short(const H5T_t *st, const H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) { @@ -5699,8 +5818,9 @@ H5T__conv_ushort_short(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ *------------------------------------------------------------------------- */ herr_t -H5T__conv_short_int(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, - size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +H5T__conv_short_int(const H5T_t *st, const H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, + size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, + void H5_ATTR_UNUSED *bkg) { H5T_CONV_sS(SHORT, INT, short, int, -, -); } @@ -5717,8 +5837,9 @@ H5T__conv_short_int(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx *------------------------------------------------------------------------- */ herr_t -H5T__conv_short_uint(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, - size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +H5T__conv_short_uint(const H5T_t *st, const H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, + size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, + void H5_ATTR_UNUSED *bkg) { H5T_CONV_sU(SHORT, UINT, short, unsigned, -, -); } @@ -5735,8 +5856,9 @@ H5T__conv_short_uint(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ct *------------------------------------------------------------------------- */ herr_t -H5T__conv_ushort_int(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, - size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +H5T__conv_ushort_int(const H5T_t *st, const H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, + size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, + void H5_ATTR_UNUSED *bkg) { H5T_CONV_uS(USHORT, INT, unsigned short, int, -, INT_MAX); } @@ -5753,8 +5875,8 @@ H5T__conv_ushort_int(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ct *------------------------------------------------------------------------- */ herr_t -H5T__conv_ushort_uint(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, - size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, +H5T__conv_ushort_uint(const H5T_t *st, const H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, + size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) { H5T_CONV_uU(USHORT, UINT, unsigned short, unsigned, -, -); @@ -5772,8 +5894,9 @@ H5T__conv_ushort_uint(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_c *------------------------------------------------------------------------- */ herr_t -H5T__conv_short_long(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, - size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +H5T__conv_short_long(const H5T_t *st, const H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, + size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, + void H5_ATTR_UNUSED *bkg) { H5T_CONV_sS(SHORT, LONG, short, long, -, -); } @@ -5790,8 +5913,8 @@ H5T__conv_short_long(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ct *------------------------------------------------------------------------- */ herr_t -H5T__conv_short_ulong(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, - size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, +H5T__conv_short_ulong(const H5T_t *st, const H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, + size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) { H5T_CONV_sU(SHORT, ULONG, short, unsigned long, -, -); @@ -5809,8 +5932,8 @@ H5T__conv_short_ulong(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_c *------------------------------------------------------------------------- */ herr_t -H5T__conv_ushort_long(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, - size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, +H5T__conv_ushort_long(const H5T_t *st, const H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, + size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) { H5T_CONV_uS(USHORT, LONG, unsigned short, long, -, LONG_MAX); @@ -5828,7 +5951,7 @@ H5T__conv_ushort_long(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_c *------------------------------------------------------------------------- */ herr_t -H5T__conv_ushort_ulong(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, +H5T__conv_ushort_ulong(const H5T_t *st, const H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) { @@ -5847,8 +5970,8 @@ H5T__conv_ushort_ulong(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ *------------------------------------------------------------------------- */ herr_t -H5T__conv_short_llong(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, - size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, +H5T__conv_short_llong(const H5T_t *st, const H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, + size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) { H5T_CONV_sS(SHORT, LLONG, short, long long, -, -); @@ -5866,7 +5989,7 @@ H5T__conv_short_llong(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_c *------------------------------------------------------------------------- */ herr_t -H5T__conv_short_ullong(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, +H5T__conv_short_ullong(const H5T_t *st, const H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) { @@ -5885,7 +6008,7 @@ H5T__conv_short_ullong(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ *------------------------------------------------------------------------- */ herr_t -H5T__conv_ushort_llong(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, +H5T__conv_ushort_llong(const H5T_t *st, const H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) { @@ -5904,7 +6027,7 @@ H5T__conv_ushort_llong(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ *------------------------------------------------------------------------- */ herr_t -H5T__conv_ushort_ullong(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, +H5T__conv_ushort_ullong(const H5T_t *st, const H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) { @@ -5923,8 +6046,9 @@ H5T__conv_ushort_ullong(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv *------------------------------------------------------------------------- */ herr_t -H5T__conv_int_schar(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, - size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +H5T__conv_int_schar(const H5T_t *st, const H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, + size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, + void H5_ATTR_UNUSED *bkg) { H5T_CONV_Ss(INT, SCHAR, int, signed char, SCHAR_MIN, SCHAR_MAX); } @@ -5941,8 +6065,9 @@ H5T__conv_int_schar(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx *------------------------------------------------------------------------- */ herr_t -H5T__conv_int_uchar(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, - size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +H5T__conv_int_uchar(const H5T_t *st, const H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, + size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, + void H5_ATTR_UNUSED *bkg) { H5T_CONV_Su(INT, UCHAR, int, unsigned char, -, UCHAR_MAX); } @@ -5959,8 +6084,9 @@ H5T__conv_int_uchar(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx *------------------------------------------------------------------------- */ herr_t -H5T__conv_uint_schar(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, - size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +H5T__conv_uint_schar(const H5T_t *st, const H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, + size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, + void H5_ATTR_UNUSED *bkg) { H5T_CONV_Us(UINT, SCHAR, unsigned, signed char, -, SCHAR_MAX); } @@ -5977,8 +6103,9 @@ H5T__conv_uint_schar(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ct *------------------------------------------------------------------------- */ herr_t -H5T__conv_uint_uchar(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, - size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +H5T__conv_uint_uchar(const H5T_t *st, const H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, + size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, + void H5_ATTR_UNUSED *bkg) { H5T_CONV_Uu(UINT, UCHAR, unsigned, unsigned char, -, UCHAR_MAX); } @@ -5995,8 +6122,9 @@ H5T__conv_uint_uchar(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ct *------------------------------------------------------------------------- */ herr_t -H5T__conv_int_short(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, - size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +H5T__conv_int_short(const H5T_t *st, const H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, + size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, + void H5_ATTR_UNUSED *bkg) { H5T_CONV_Ss(INT, SHORT, int, short, SHRT_MIN, SHRT_MAX); } @@ -6013,8 +6141,9 @@ H5T__conv_int_short(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx *------------------------------------------------------------------------- */ herr_t -H5T__conv_int_ushort(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, - size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +H5T__conv_int_ushort(const H5T_t *st, const H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, + size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, + void H5_ATTR_UNUSED *bkg) { H5T_CONV_Su(INT, USHORT, int, unsigned short, -, USHRT_MAX); } @@ -6031,8 +6160,9 @@ H5T__conv_int_ushort(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ct *------------------------------------------------------------------------- */ herr_t -H5T__conv_uint_short(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, - size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +H5T__conv_uint_short(const H5T_t *st, const H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, + size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, + void H5_ATTR_UNUSED *bkg) { H5T_CONV_Us(UINT, SHORT, unsigned, short, -, SHRT_MAX); } @@ -6049,8 +6179,8 @@ H5T__conv_uint_short(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ct *------------------------------------------------------------------------- */ herr_t -H5T__conv_uint_ushort(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, - size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, +H5T__conv_uint_ushort(const H5T_t *st, const H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, + size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) { H5T_CONV_Uu(UINT, USHORT, unsigned, unsigned short, -, USHRT_MAX); @@ -6068,8 +6198,9 @@ H5T__conv_uint_ushort(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_c *------------------------------------------------------------------------- */ herr_t -H5T__conv_int_uint(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, - size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +H5T__conv_int_uint(const H5T_t *st, const H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, + size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, + void H5_ATTR_UNUSED *bkg) { H5T_CONV_su(INT, UINT, int, unsigned, -, -); } @@ -6086,8 +6217,9 @@ H5T__conv_int_uint(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_ *------------------------------------------------------------------------- */ herr_t -H5T__conv_uint_int(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, - size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +H5T__conv_uint_int(const H5T_t *st, const H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, + size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, + void H5_ATTR_UNUSED *bkg) { H5T_CONV_us(UINT, INT, unsigned, int, -, INT_MAX); } @@ -6104,8 +6236,9 @@ H5T__conv_uint_int(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_ *------------------------------------------------------------------------- */ herr_t -H5T__conv_int_long(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, - size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +H5T__conv_int_long(const H5T_t *st, const H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, + size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, + void H5_ATTR_UNUSED *bkg) { H5T_CONV_sS(INT, LONG, int, long, -, -); } @@ -6122,8 +6255,9 @@ H5T__conv_int_long(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_ *------------------------------------------------------------------------- */ herr_t -H5T__conv_int_ulong(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, - size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +H5T__conv_int_ulong(const H5T_t *st, const H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, + size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, + void H5_ATTR_UNUSED *bkg) { H5T_CONV_sU(INT, LONG, int, unsigned long, -, -); } @@ -6140,8 +6274,9 @@ H5T__conv_int_ulong(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx *------------------------------------------------------------------------- */ herr_t -H5T__conv_uint_long(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, - size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +H5T__conv_uint_long(const H5T_t *st, const H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, + size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, + void H5_ATTR_UNUSED *bkg) { H5T_CONV_uS(UINT, LONG, unsigned, long, -, LONG_MAX); } @@ -6158,8 +6293,9 @@ H5T__conv_uint_long(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx *------------------------------------------------------------------------- */ herr_t -H5T__conv_uint_ulong(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, - size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +H5T__conv_uint_ulong(const H5T_t *st, const H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, + size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, + void H5_ATTR_UNUSED *bkg) { H5T_CONV_uU(UINT, ULONG, unsigned, unsigned long, -, -); } @@ -6176,8 +6312,9 @@ H5T__conv_uint_ulong(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ct *------------------------------------------------------------------------- */ herr_t -H5T__conv_int_llong(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, - size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +H5T__conv_int_llong(const H5T_t *st, const H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, + size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, + void H5_ATTR_UNUSED *bkg) { H5T_CONV_sS(INT, LLONG, int, long long, -, -); } @@ -6194,8 +6331,9 @@ H5T__conv_int_llong(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx *------------------------------------------------------------------------- */ herr_t -H5T__conv_int_ullong(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, - size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +H5T__conv_int_ullong(const H5T_t *st, const H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, + size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, + void H5_ATTR_UNUSED *bkg) { H5T_CONV_sU(INT, ULLONG, int, unsigned long long, -, -); } @@ -6212,8 +6350,9 @@ H5T__conv_int_ullong(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ct *------------------------------------------------------------------------- */ herr_t -H5T__conv_uint_llong(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, - size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +H5T__conv_uint_llong(const H5T_t *st, const H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, + size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, + void H5_ATTR_UNUSED *bkg) { H5T_CONV_uS(UINT, LLONG, unsigned, long long, -, LLONG_MAX); } @@ -6230,8 +6369,8 @@ H5T__conv_uint_llong(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ct *------------------------------------------------------------------------- */ herr_t -H5T__conv_uint_ullong(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, - size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, +H5T__conv_uint_ullong(const H5T_t *st, const H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, + size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) { H5T_CONV_uU(UINT, ULLONG, unsigned, unsigned long long, -, -); @@ -6249,8 +6388,9 @@ H5T__conv_uint_ullong(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_c *------------------------------------------------------------------------- */ herr_t -H5T__conv_long_schar(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, - size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +H5T__conv_long_schar(const H5T_t *st, const H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, + size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, + void H5_ATTR_UNUSED *bkg) { H5T_CONV_Ss(LONG, SCHAR, long, signed char, SCHAR_MIN, SCHAR_MAX); } @@ -6267,8 +6407,9 @@ H5T__conv_long_schar(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ct *------------------------------------------------------------------------- */ herr_t -H5T__conv_long_uchar(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, - size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +H5T__conv_long_uchar(const H5T_t *st, const H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, + size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, + void H5_ATTR_UNUSED *bkg) { H5T_CONV_Su(LONG, UCHAR, long, unsigned char, -, UCHAR_MAX); } @@ -6285,8 +6426,8 @@ H5T__conv_long_uchar(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ct *------------------------------------------------------------------------- */ herr_t -H5T__conv_ulong_schar(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, - size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, +H5T__conv_ulong_schar(const H5T_t *st, const H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, + size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) { H5T_CONV_Us(ULONG, SCHAR, unsigned long, signed char, -, SCHAR_MAX); @@ -6304,8 +6445,8 @@ H5T__conv_ulong_schar(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_c *------------------------------------------------------------------------- */ herr_t -H5T__conv_ulong_uchar(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, - size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, +H5T__conv_ulong_uchar(const H5T_t *st, const H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, + size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) { H5T_CONV_Uu(ULONG, UCHAR, unsigned long, unsigned char, -, UCHAR_MAX); @@ -6323,8 +6464,9 @@ H5T__conv_ulong_uchar(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_c *------------------------------------------------------------------------- */ herr_t -H5T__conv_long_short(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, - size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +H5T__conv_long_short(const H5T_t *st, const H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, + size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, + void H5_ATTR_UNUSED *bkg) { H5T_CONV_Ss(LONG, SHORT, long, short, SHRT_MIN, SHRT_MAX); } @@ -6341,8 +6483,8 @@ H5T__conv_long_short(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ct *------------------------------------------------------------------------- */ herr_t -H5T__conv_long_ushort(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, - size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, +H5T__conv_long_ushort(const H5T_t *st, const H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, + size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) { H5T_CONV_Su(LONG, USHORT, long, unsigned short, -, USHRT_MAX); @@ -6360,8 +6502,8 @@ H5T__conv_long_ushort(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_c *------------------------------------------------------------------------- */ herr_t -H5T__conv_ulong_short(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, - size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, +H5T__conv_ulong_short(const H5T_t *st, const H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, + size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) { H5T_CONV_Us(ULONG, SHORT, unsigned long, short, -, SHRT_MAX); @@ -6379,7 +6521,7 @@ H5T__conv_ulong_short(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_c *------------------------------------------------------------------------- */ herr_t -H5T__conv_ulong_ushort(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, +H5T__conv_ulong_ushort(const H5T_t *st, const H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) { @@ -6398,8 +6540,9 @@ H5T__conv_ulong_ushort(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ *------------------------------------------------------------------------- */ herr_t -H5T__conv_long_int(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, - size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +H5T__conv_long_int(const H5T_t *st, const H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, + size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, + void H5_ATTR_UNUSED *bkg) { H5T_CONV_Ss(LONG, INT, long, int, INT_MIN, INT_MAX); } @@ -6416,8 +6559,9 @@ H5T__conv_long_int(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_ *------------------------------------------------------------------------- */ herr_t -H5T__conv_long_uint(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, - size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +H5T__conv_long_uint(const H5T_t *st, const H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, + size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, + void H5_ATTR_UNUSED *bkg) { H5T_CONV_Su(LONG, UINT, long, unsigned, -, UINT_MAX); } @@ -6434,8 +6578,9 @@ H5T__conv_long_uint(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx *------------------------------------------------------------------------- */ herr_t -H5T__conv_ulong_int(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, - size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +H5T__conv_ulong_int(const H5T_t *st, const H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, + size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, + void H5_ATTR_UNUSED *bkg) { H5T_CONV_Us(ULONG, INT, unsigned long, int, -, INT_MAX); } @@ -6452,8 +6597,9 @@ H5T__conv_ulong_int(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx *------------------------------------------------------------------------- */ herr_t -H5T__conv_ulong_uint(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, - size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +H5T__conv_ulong_uint(const H5T_t *st, const H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, + size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, + void H5_ATTR_UNUSED *bkg) { H5T_CONV_Uu(ULONG, UINT, unsigned long, unsigned, -, UINT_MAX); } @@ -6470,8 +6616,9 @@ H5T__conv_ulong_uint(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ct *------------------------------------------------------------------------- */ herr_t -H5T__conv_long_ulong(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, - size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +H5T__conv_long_ulong(const H5T_t *st, const H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, + size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, + void H5_ATTR_UNUSED *bkg) { H5T_CONV_su(LONG, ULONG, long, unsigned long, -, -); } @@ -6488,8 +6635,9 @@ H5T__conv_long_ulong(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ct *------------------------------------------------------------------------- */ herr_t -H5T__conv_ulong_long(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, - size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +H5T__conv_ulong_long(const H5T_t *st, const H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, + size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, + void H5_ATTR_UNUSED *bkg) { H5T_CONV_us(ULONG, LONG, unsigned long, long, -, LONG_MAX); } @@ -6506,8 +6654,9 @@ H5T__conv_ulong_long(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ct *------------------------------------------------------------------------- */ herr_t -H5T__conv_long_llong(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, - size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +H5T__conv_long_llong(const H5T_t *st, const H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, + size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, + void H5_ATTR_UNUSED *bkg) { H5T_CONV_sS(LONG, LLONG, long, long long, -, -); } @@ -6524,8 +6673,8 @@ H5T__conv_long_llong(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ct *------------------------------------------------------------------------- */ herr_t -H5T__conv_long_ullong(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, - size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, +H5T__conv_long_ullong(const H5T_t *st, const H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, + size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) { H5T_CONV_sU(LONG, ULLONG, long, unsigned long long, -, -); @@ -6543,8 +6692,8 @@ H5T__conv_long_ullong(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_c *------------------------------------------------------------------------- */ herr_t -H5T__conv_ulong_llong(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, - size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, +H5T__conv_ulong_llong(const H5T_t *st, const H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, + size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) { H5T_CONV_uS(ULONG, LLONG, unsigned long, long long, -, LLONG_MAX); @@ -6562,7 +6711,7 @@ H5T__conv_ulong_llong(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_c *------------------------------------------------------------------------- */ herr_t -H5T__conv_ulong_ullong(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, +H5T__conv_ulong_ullong(const H5T_t *st, const H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) { @@ -6581,8 +6730,8 @@ H5T__conv_ulong_ullong(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ *------------------------------------------------------------------------- */ herr_t -H5T__conv_llong_schar(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, - size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, +H5T__conv_llong_schar(const H5T_t *st, const H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, + size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) { H5T_CONV_Ss(LLONG, SCHAR, long long, signed char, SCHAR_MIN, SCHAR_MAX); @@ -6600,8 +6749,8 @@ H5T__conv_llong_schar(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_c *------------------------------------------------------------------------- */ herr_t -H5T__conv_llong_uchar(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, - size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, +H5T__conv_llong_uchar(const H5T_t *st, const H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, + size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) { H5T_CONV_Su(LLONG, UCHAR, long long, unsigned char, -, UCHAR_MAX); @@ -6619,7 +6768,7 @@ H5T__conv_llong_uchar(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_c *------------------------------------------------------------------------- */ herr_t -H5T__conv_ullong_schar(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, +H5T__conv_ullong_schar(const H5T_t *st, const H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) { @@ -6638,7 +6787,7 @@ H5T__conv_ullong_schar(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ *------------------------------------------------------------------------- */ herr_t -H5T__conv_ullong_uchar(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, +H5T__conv_ullong_uchar(const H5T_t *st, const H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) { @@ -6657,8 +6806,8 @@ H5T__conv_ullong_uchar(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ *------------------------------------------------------------------------- */ herr_t -H5T__conv_llong_short(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, - size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, +H5T__conv_llong_short(const H5T_t *st, const H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, + size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) { H5T_CONV_Ss(LLONG, SHORT, long long, short, SHRT_MIN, SHRT_MAX); @@ -6676,7 +6825,7 @@ H5T__conv_llong_short(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_c *------------------------------------------------------------------------- */ herr_t -H5T__conv_llong_ushort(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, +H5T__conv_llong_ushort(const H5T_t *st, const H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) { @@ -6695,7 +6844,7 @@ H5T__conv_llong_ushort(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ *------------------------------------------------------------------------- */ herr_t -H5T__conv_ullong_short(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, +H5T__conv_ullong_short(const H5T_t *st, const H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) { @@ -6714,7 +6863,7 @@ H5T__conv_ullong_short(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ *------------------------------------------------------------------------- */ herr_t -H5T__conv_ullong_ushort(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, +H5T__conv_ullong_ushort(const H5T_t *st, const H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) { @@ -6733,8 +6882,9 @@ H5T__conv_ullong_ushort(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv *------------------------------------------------------------------------- */ herr_t -H5T__conv_llong_int(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, - size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +H5T__conv_llong_int(const H5T_t *st, const H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, + size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, + void H5_ATTR_UNUSED *bkg) { H5T_CONV_Ss(LLONG, INT, long long, int, INT_MIN, INT_MAX); } @@ -6751,8 +6901,9 @@ H5T__conv_llong_int(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx *------------------------------------------------------------------------- */ herr_t -H5T__conv_llong_uint(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, - size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +H5T__conv_llong_uint(const H5T_t *st, const H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, + size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, + void H5_ATTR_UNUSED *bkg) { H5T_CONV_Su(LLONG, UINT, long long, unsigned, -, UINT_MAX); } @@ -6769,8 +6920,9 @@ H5T__conv_llong_uint(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ct *------------------------------------------------------------------------- */ herr_t -H5T__conv_ullong_int(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, - size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +H5T__conv_ullong_int(const H5T_t *st, const H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, + size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, + void H5_ATTR_UNUSED *bkg) { H5T_CONV_Us(ULLONG, INT, unsigned long long, int, -, INT_MAX); } @@ -6787,8 +6939,8 @@ H5T__conv_ullong_int(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ct *------------------------------------------------------------------------- */ herr_t -H5T__conv_ullong_uint(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, - size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, +H5T__conv_ullong_uint(const H5T_t *st, const H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, + size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) { H5T_CONV_Uu(ULLONG, UINT, unsigned long long, unsigned, -, UINT_MAX); @@ -6806,8 +6958,9 @@ H5T__conv_ullong_uint(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_c *------------------------------------------------------------------------- */ herr_t -H5T__conv_llong_long(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, - size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +H5T__conv_llong_long(const H5T_t *st, const H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, + size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, + void H5_ATTR_UNUSED *bkg) { H5T_CONV_Ss(LLONG, LONG, long long, long, LONG_MIN, LONG_MAX); } @@ -6824,8 +6977,8 @@ H5T__conv_llong_long(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ct *------------------------------------------------------------------------- */ herr_t -H5T__conv_llong_ulong(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, - size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, +H5T__conv_llong_ulong(const H5T_t *st, const H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, + size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) { H5T_CONV_Su(LLONG, ULONG, long long, unsigned long, -, ULONG_MAX); @@ -6843,8 +6996,8 @@ H5T__conv_llong_ulong(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_c *------------------------------------------------------------------------- */ herr_t -H5T__conv_ullong_long(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, - size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, +H5T__conv_ullong_long(const H5T_t *st, const H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, + size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) { H5T_CONV_Us(ULLONG, LONG, unsigned long long, long, -, LONG_MAX); @@ -6862,7 +7015,7 @@ H5T__conv_ullong_long(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_c *------------------------------------------------------------------------- */ herr_t -H5T__conv_ullong_ulong(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, +H5T__conv_ullong_ulong(const H5T_t *st, const H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) { @@ -6881,7 +7034,7 @@ H5T__conv_ullong_ulong(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ *------------------------------------------------------------------------- */ herr_t -H5T__conv_llong_ullong(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, +H5T__conv_llong_ullong(const H5T_t *st, const H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) { @@ -6900,7 +7053,7 @@ H5T__conv_llong_ullong(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ *------------------------------------------------------------------------- */ herr_t -H5T__conv_ullong_llong(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, +H5T__conv_ullong_llong(const H5T_t *st, const H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) { @@ -6918,7 +7071,7 @@ H5T__conv_ullong_llong(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ *------------------------------------------------------------------------- */ herr_t -H5T__conv_float_double(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, +H5T__conv_float_double(const H5T_t *st, const H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) { @@ -6936,7 +7089,7 @@ H5T__conv_float_double(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ *------------------------------------------------------------------------- */ herr_t -H5T__conv_float_ldouble(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, +H5T__conv_float_ldouble(const H5T_t *st, const H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) { @@ -6954,7 +7107,7 @@ H5T__conv_float_ldouble(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv *------------------------------------------------------------------------- */ herr_t -H5T__conv_double_float(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, +H5T__conv_double_float(const H5T_t *st, const H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) { @@ -6972,7 +7125,7 @@ H5T__conv_double_float(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ *------------------------------------------------------------------------- */ herr_t -H5T__conv_double_ldouble(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, +H5T__conv_double_ldouble(const H5T_t *st, const H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) { @@ -6990,7 +7143,7 @@ H5T__conv_double_ldouble(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_con *------------------------------------------------------------------------- */ herr_t -H5T__conv_ldouble_float(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, +H5T__conv_ldouble_float(const H5T_t *st, const H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) { @@ -7008,7 +7161,7 @@ H5T__conv_ldouble_float(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv *------------------------------------------------------------------------- */ herr_t -H5T__conv_ldouble_double(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, +H5T__conv_ldouble_double(const H5T_t *st, const H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) { @@ -7026,8 +7179,8 @@ H5T__conv_ldouble_double(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_con *------------------------------------------------------------------------- */ herr_t -H5T__conv_schar_float(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, - size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, +H5T__conv_schar_float(const H5T_t *st, const H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, + size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) { H5T_CONV_xF(SCHAR, FLOAT, signed char, float, -, -); @@ -7044,7 +7197,7 @@ H5T__conv_schar_float(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_c *------------------------------------------------------------------------- */ herr_t -H5T__conv_schar_double(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, +H5T__conv_schar_double(const H5T_t *st, const H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) { @@ -7062,7 +7215,7 @@ H5T__conv_schar_double(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ *------------------------------------------------------------------------- */ herr_t -H5T__conv_schar_ldouble(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, +H5T__conv_schar_ldouble(const H5T_t *st, const H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) { @@ -7080,8 +7233,8 @@ H5T__conv_schar_ldouble(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv *------------------------------------------------------------------------- */ herr_t -H5T__conv_uchar_float(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, - size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, +H5T__conv_uchar_float(const H5T_t *st, const H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, + size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) { H5T_CONV_xF(UCHAR, FLOAT, unsigned char, float, -, -); @@ -7098,7 +7251,7 @@ H5T__conv_uchar_float(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_c *------------------------------------------------------------------------- */ herr_t -H5T__conv_uchar_double(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, +H5T__conv_uchar_double(const H5T_t *st, const H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) { @@ -7116,7 +7269,7 @@ H5T__conv_uchar_double(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ *------------------------------------------------------------------------- */ herr_t -H5T__conv_uchar_ldouble(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, +H5T__conv_uchar_ldouble(const H5T_t *st, const H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) { @@ -7134,8 +7287,8 @@ H5T__conv_uchar_ldouble(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv *------------------------------------------------------------------------- */ herr_t -H5T__conv_short_float(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, - size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, +H5T__conv_short_float(const H5T_t *st, const H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, + size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) { H5T_CONV_xF(SHORT, FLOAT, short, float, -, -); @@ -7152,7 +7305,7 @@ H5T__conv_short_float(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_c *------------------------------------------------------------------------- */ herr_t -H5T__conv_short_double(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, +H5T__conv_short_double(const H5T_t *st, const H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) { @@ -7170,7 +7323,7 @@ H5T__conv_short_double(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ *------------------------------------------------------------------------- */ herr_t -H5T__conv_short_ldouble(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, +H5T__conv_short_ldouble(const H5T_t *st, const H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) { @@ -7188,7 +7341,7 @@ H5T__conv_short_ldouble(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv *------------------------------------------------------------------------- */ herr_t -H5T__conv_ushort_float(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, +H5T__conv_ushort_float(const H5T_t *st, const H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) { @@ -7206,7 +7359,7 @@ H5T__conv_ushort_float(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ *------------------------------------------------------------------------- */ herr_t -H5T__conv_ushort_double(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, +H5T__conv_ushort_double(const H5T_t *st, const H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) { @@ -7224,7 +7377,7 @@ H5T__conv_ushort_double(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv *------------------------------------------------------------------------- */ herr_t -H5T__conv_ushort_ldouble(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, +H5T__conv_ushort_ldouble(const H5T_t *st, const H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) { @@ -7242,8 +7395,9 @@ H5T__conv_ushort_ldouble(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_con *------------------------------------------------------------------------- */ herr_t -H5T__conv_int_float(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, - size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +H5T__conv_int_float(const H5T_t *st, const H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, + size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, + void H5_ATTR_UNUSED *bkg) { H5T_CONV_xF(INT, FLOAT, int, float, -, -); } @@ -7259,8 +7413,9 @@ H5T__conv_int_float(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx *------------------------------------------------------------------------- */ herr_t -H5T__conv_int_double(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, - size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +H5T__conv_int_double(const H5T_t *st, const H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, + size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, + void H5_ATTR_UNUSED *bkg) { H5T_CONV_xF(INT, DOUBLE, int, double, -, -); } @@ -7276,8 +7431,8 @@ H5T__conv_int_double(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ct *------------------------------------------------------------------------- */ herr_t -H5T__conv_int_ldouble(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, - size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, +H5T__conv_int_ldouble(const H5T_t *st, const H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, + size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) { H5T_CONV_xF(INT, LDOUBLE, int, long double, -, -); @@ -7294,8 +7449,9 @@ H5T__conv_int_ldouble(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_c *------------------------------------------------------------------------- */ herr_t -H5T__conv_uint_float(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, - size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +H5T__conv_uint_float(const H5T_t *st, const H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, + size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, + void H5_ATTR_UNUSED *bkg) { H5T_CONV_xF(UINT, FLOAT, unsigned int, float, -, -); } @@ -7311,8 +7467,8 @@ H5T__conv_uint_float(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ct *------------------------------------------------------------------------- */ herr_t -H5T__conv_uint_double(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, - size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, +H5T__conv_uint_double(const H5T_t *st, const H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, + size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) { H5T_CONV_xF(UINT, DOUBLE, unsigned int, double, -, -); @@ -7329,7 +7485,7 @@ H5T__conv_uint_double(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_c *------------------------------------------------------------------------- */ herr_t -H5T__conv_uint_ldouble(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, +H5T__conv_uint_ldouble(const H5T_t *st, const H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) { @@ -7347,8 +7503,9 @@ H5T__conv_uint_ldouble(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ *------------------------------------------------------------------------- */ herr_t -H5T__conv_long_float(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, - size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +H5T__conv_long_float(const H5T_t *st, const H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, + size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, + void H5_ATTR_UNUSED *bkg) { H5T_CONV_xF(LONG, FLOAT, long, float, -, -); } @@ -7364,8 +7521,8 @@ H5T__conv_long_float(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ct *------------------------------------------------------------------------- */ herr_t -H5T__conv_long_double(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, - size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, +H5T__conv_long_double(const H5T_t *st, const H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, + size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) { H5T_CONV_xF(LONG, DOUBLE, long, double, -, -); @@ -7382,7 +7539,7 @@ H5T__conv_long_double(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_c *------------------------------------------------------------------------- */ herr_t -H5T__conv_long_ldouble(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, +H5T__conv_long_ldouble(const H5T_t *st, const H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) { @@ -7400,8 +7557,8 @@ H5T__conv_long_ldouble(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ *------------------------------------------------------------------------- */ herr_t -H5T__conv_ulong_float(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, - size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, +H5T__conv_ulong_float(const H5T_t *st, const H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, + size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) { H5T_CONV_xF(ULONG, FLOAT, unsigned long, float, -, -); @@ -7418,7 +7575,7 @@ H5T__conv_ulong_float(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_c *------------------------------------------------------------------------- */ herr_t -H5T__conv_ulong_double(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, +H5T__conv_ulong_double(const H5T_t *st, const H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) { @@ -7436,7 +7593,7 @@ H5T__conv_ulong_double(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ *------------------------------------------------------------------------- */ herr_t -H5T__conv_ulong_ldouble(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, +H5T__conv_ulong_ldouble(const H5T_t *st, const H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) { @@ -7454,8 +7611,8 @@ H5T__conv_ulong_ldouble(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv *------------------------------------------------------------------------- */ herr_t -H5T__conv_llong_float(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, - size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, +H5T__conv_llong_float(const H5T_t *st, const H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, + size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) { H5T_CONV_xF(LLONG, FLOAT, long long, float, -, -); @@ -7472,7 +7629,7 @@ H5T__conv_llong_float(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_c *------------------------------------------------------------------------- */ herr_t -H5T__conv_llong_double(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, +H5T__conv_llong_double(const H5T_t *st, const H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) { @@ -7491,7 +7648,7 @@ H5T__conv_llong_double(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ */ #ifdef H5T_CONV_INTERNAL_LLONG_LDOUBLE herr_t -H5T__conv_llong_ldouble(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, +H5T__conv_llong_ldouble(const H5T_t *st, const H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) { @@ -7510,7 +7667,7 @@ H5T__conv_llong_ldouble(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv *------------------------------------------------------------------------- */ herr_t -H5T__conv_ullong_float(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, +H5T__conv_ullong_float(const H5T_t *st, const H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) { @@ -7528,7 +7685,7 @@ H5T__conv_ullong_float(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ *------------------------------------------------------------------------- */ herr_t -H5T__conv_ullong_double(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, +H5T__conv_ullong_double(const H5T_t *st, const H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) { @@ -7547,7 +7704,7 @@ H5T__conv_ullong_double(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv */ #ifdef H5T_CONV_INTERNAL_ULLONG_LDOUBLE herr_t -H5T__conv_ullong_ldouble(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, +H5T__conv_ullong_ldouble(const H5T_t *st, const H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) { @@ -7566,8 +7723,8 @@ H5T__conv_ullong_ldouble(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_con *------------------------------------------------------------------------- */ herr_t -H5T__conv_float_schar(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, - size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, +H5T__conv_float_schar(const H5T_t *st, const H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, + size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) { H5_GCC_CLANG_DIAG_OFF("float-equal") @@ -7586,8 +7743,8 @@ H5T__conv_float_schar(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_c *------------------------------------------------------------------------- */ herr_t -H5T__conv_float_uchar(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, - size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, +H5T__conv_float_uchar(const H5T_t *st, const H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, + size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) { H5_GCC_CLANG_DIAG_OFF("float-equal") @@ -7606,7 +7763,7 @@ H5T__conv_float_uchar(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_c *------------------------------------------------------------------------- */ herr_t -H5T__conv_double_schar(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, +H5T__conv_double_schar(const H5T_t *st, const H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) { @@ -7626,7 +7783,7 @@ H5T__conv_double_schar(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ *------------------------------------------------------------------------- */ herr_t -H5T__conv_double_uchar(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, +H5T__conv_double_uchar(const H5T_t *st, const H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) { @@ -7646,7 +7803,7 @@ H5T__conv_double_uchar(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ *------------------------------------------------------------------------- */ herr_t -H5T__conv_ldouble_schar(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, +H5T__conv_ldouble_schar(const H5T_t *st, const H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) { @@ -7666,7 +7823,7 @@ H5T__conv_ldouble_schar(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv *------------------------------------------------------------------------- */ herr_t -H5T__conv_ldouble_uchar(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, +H5T__conv_ldouble_uchar(const H5T_t *st, const H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) { @@ -7686,8 +7843,8 @@ H5T__conv_ldouble_uchar(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv *------------------------------------------------------------------------- */ herr_t -H5T__conv_float_short(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, - size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, +H5T__conv_float_short(const H5T_t *st, const H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, + size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) { H5_GCC_CLANG_DIAG_OFF("float-equal") @@ -7706,7 +7863,7 @@ H5T__conv_float_short(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_c *------------------------------------------------------------------------- */ herr_t -H5T__conv_float_ushort(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, +H5T__conv_float_ushort(const H5T_t *st, const H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) { @@ -7726,7 +7883,7 @@ H5T__conv_float_ushort(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ *------------------------------------------------------------------------- */ herr_t -H5T__conv_double_short(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, +H5T__conv_double_short(const H5T_t *st, const H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) { @@ -7746,7 +7903,7 @@ H5T__conv_double_short(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ *------------------------------------------------------------------------- */ herr_t -H5T__conv_double_ushort(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, +H5T__conv_double_ushort(const H5T_t *st, const H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) { @@ -7766,7 +7923,7 @@ H5T__conv_double_ushort(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv *------------------------------------------------------------------------- */ herr_t -H5T__conv_ldouble_short(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, +H5T__conv_ldouble_short(const H5T_t *st, const H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) { @@ -7786,7 +7943,7 @@ H5T__conv_ldouble_short(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv *------------------------------------------------------------------------- */ herr_t -H5T__conv_ldouble_ushort(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, +H5T__conv_ldouble_ushort(const H5T_t *st, const H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) { @@ -7806,8 +7963,9 @@ H5T__conv_ldouble_ushort(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_con *------------------------------------------------------------------------- */ herr_t -H5T__conv_float_int(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, - size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +H5T__conv_float_int(const H5T_t *st, const H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, + size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, + void H5_ATTR_UNUSED *bkg) { H5_GCC_CLANG_DIAG_OFF("float-equal") H5T_CONV_Fx(FLOAT, INT, float, int, INT_MIN, INT_MAX); @@ -7825,8 +7983,9 @@ H5T__conv_float_int(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx *------------------------------------------------------------------------- */ herr_t -H5T__conv_float_uint(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, - size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +H5T__conv_float_uint(const H5T_t *st, const H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, + size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, + void H5_ATTR_UNUSED *bkg) { H5_GCC_CLANG_DIAG_OFF("float-equal") H5T_CONV_Fx(FLOAT, UINT, float, unsigned int, 0, UINT_MAX); @@ -7844,8 +8003,9 @@ H5T__conv_float_uint(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ct *------------------------------------------------------------------------- */ herr_t -H5T__conv_double_int(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, - size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +H5T__conv_double_int(const H5T_t *st, const H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, + size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, + void H5_ATTR_UNUSED *bkg) { H5_GCC_CLANG_DIAG_OFF("float-equal") H5T_CONV_Fx(DOUBLE, INT, double, int, INT_MIN, INT_MAX); @@ -7863,8 +8023,8 @@ H5T__conv_double_int(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ct *------------------------------------------------------------------------- */ herr_t -H5T__conv_double_uint(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, - size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, +H5T__conv_double_uint(const H5T_t *st, const H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, + size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) { H5_GCC_CLANG_DIAG_OFF("float-equal") @@ -7883,8 +8043,8 @@ H5T__conv_double_uint(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_c *------------------------------------------------------------------------- */ herr_t -H5T__conv_ldouble_int(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, - size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, +H5T__conv_ldouble_int(const H5T_t *st, const H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, + size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) { H5_GCC_CLANG_DIAG_OFF("float-equal") @@ -7903,7 +8063,7 @@ H5T__conv_ldouble_int(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_c *------------------------------------------------------------------------- */ herr_t -H5T__conv_ldouble_uint(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, +H5T__conv_ldouble_uint(const H5T_t *st, const H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) { @@ -7923,8 +8083,9 @@ H5T__conv_ldouble_uint(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ *------------------------------------------------------------------------- */ herr_t -H5T__conv_float_long(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, - size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +H5T__conv_float_long(const H5T_t *st, const H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, + size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, + void H5_ATTR_UNUSED *bkg) { H5_GCC_CLANG_DIAG_OFF("float-equal") H5T_CONV_Fx(FLOAT, LONG, float, long, LONG_MIN, LONG_MAX); @@ -7942,8 +8103,8 @@ H5T__conv_float_long(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ct *------------------------------------------------------------------------- */ herr_t -H5T__conv_float_ulong(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, - size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, +H5T__conv_float_ulong(const H5T_t *st, const H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, + size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) { H5_GCC_CLANG_DIAG_OFF("float-equal") @@ -7962,8 +8123,8 @@ H5T__conv_float_ulong(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_c *------------------------------------------------------------------------- */ herr_t -H5T__conv_double_long(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, - size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, +H5T__conv_double_long(const H5T_t *st, const H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, + size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) { H5_GCC_CLANG_DIAG_OFF("float-equal") @@ -7982,7 +8143,7 @@ H5T__conv_double_long(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_c *------------------------------------------------------------------------- */ herr_t -H5T__conv_double_ulong(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, +H5T__conv_double_ulong(const H5T_t *st, const H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) { @@ -8002,7 +8163,7 @@ H5T__conv_double_ulong(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ *------------------------------------------------------------------------- */ herr_t -H5T__conv_ldouble_long(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, +H5T__conv_ldouble_long(const H5T_t *st, const H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) { @@ -8022,7 +8183,7 @@ H5T__conv_ldouble_long(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ *------------------------------------------------------------------------- */ herr_t -H5T__conv_ldouble_ulong(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, +H5T__conv_ldouble_ulong(const H5T_t *st, const H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) { @@ -8042,8 +8203,8 @@ H5T__conv_ldouble_ulong(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv *------------------------------------------------------------------------- */ herr_t -H5T__conv_float_llong(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, - size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, +H5T__conv_float_llong(const H5T_t *st, const H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, + size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) { H5_GCC_CLANG_DIAG_OFF("float-equal") @@ -8062,7 +8223,7 @@ H5T__conv_float_llong(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_c *------------------------------------------------------------------------- */ herr_t -H5T__conv_float_ullong(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, +H5T__conv_float_ullong(const H5T_t *st, const H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) { @@ -8082,7 +8243,7 @@ H5T__conv_float_ullong(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ *------------------------------------------------------------------------- */ herr_t -H5T__conv_double_llong(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, +H5T__conv_double_llong(const H5T_t *st, const H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) { @@ -8102,7 +8263,7 @@ H5T__conv_double_llong(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ *------------------------------------------------------------------------- */ herr_t -H5T__conv_double_ullong(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, +H5T__conv_double_ullong(const H5T_t *st, const H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) { @@ -8123,7 +8284,7 @@ H5T__conv_double_ullong(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv */ #ifdef H5T_CONV_INTERNAL_LDOUBLE_LLONG herr_t -H5T__conv_ldouble_llong(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, +H5T__conv_ldouble_llong(const H5T_t *st, const H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) { @@ -8145,7 +8306,7 @@ H5T__conv_ldouble_llong(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv */ #ifdef H5T_CONV_INTERNAL_LDOUBLE_ULLONG herr_t -H5T__conv_ldouble_ullong(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, +H5T__conv_ldouble_ullong(const H5T_t *st, const H5T_t *dt, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) { @@ -8167,8 +8328,9 @@ H5T__conv_ldouble_ullong(H5T_t *st, H5T_t *dt, H5T_cdata_t *cdata, const H5T_con *------------------------------------------------------------------------- */ herr_t -H5T__conv_f_i(H5T_t *src_p, H5T_t *dst_p, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, - size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +H5T__conv_f_i(const H5T_t *src_p, const H5T_t *dst_p, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, + size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, + void H5_ATTR_UNUSED *bkg) { /* Traversal-related variables */ H5T_atomic_t src; /*atomic source info */ @@ -8814,8 +8976,9 @@ H5T__conv_f_i(H5T_t *src_p, H5T_t *dst_p, H5T_cdata_t *cdata, const H5T_conv_ctx *------------------------------------------------------------------------- */ herr_t -H5T__conv_i_f(H5T_t *src_p, H5T_t *dst_p, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, - size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, void H5_ATTR_UNUSED *bkg) +H5T__conv_i_f(const H5T_t *src_p, const H5T_t *dst_p, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, + size_t nelmts, size_t buf_stride, size_t H5_ATTR_UNUSED bkg_stride, void *buf, + void H5_ATTR_UNUSED *bkg) { /* Traversal-related variables */ H5T_atomic_t src; /*atomic source info */ @@ -9274,7 +9437,7 @@ H5T__reverse_order(uint8_t *rev, uint8_t *s, size_t size, H5T_order_t order) *------------------------------------------------------------------------- */ herr_t -H5T_reclaim(H5T_t *type, H5S_t *space, void *buf) +H5T_reclaim(const H5T_t *type, H5S_t *space, void *buf) { H5S_sel_iter_op_t dset_op; /* Operator for iteration */ H5T_vlen_alloc_info_t vl_alloc_info; /* VL allocation info */ @@ -9312,7 +9475,7 @@ H5T_reclaim(H5T_t *type, H5S_t *space, void *buf) *------------------------------------------------------------------------- */ herr_t -H5T_reclaim_cb(void *elem, H5T_t *dt, unsigned H5_ATTR_UNUSED ndim, const hsize_t H5_ATTR_UNUSED *point, +H5T_reclaim_cb(void *elem, const H5T_t *dt, unsigned H5_ATTR_UNUSED ndim, const hsize_t H5_ATTR_UNUSED *point, void *op_data) { herr_t ret_value = SUCCEED; /* Return value */ diff --git a/src/H5Tenum.c b/src/H5Tenum.c index 94db1553dc8..15a5522173b 100644 --- a/src/H5Tenum.c +++ b/src/H5Tenum.c @@ -67,15 +67,14 @@ H5Tenum_create(hid_t parent_id) } /* end H5Tenum_create() */ /*------------------------------------------------------------------------- - * Function: H5T__enum_create + * Function: H5T__enum_create * - * Purpose: Private function for H5Tenum_create. Create a new + * Purpose: Private function for H5Tenum_create. Create a new * enumeration data type based on the specified - * TYPE, which must be an integer type. - * - * Return: Success: new enumeration data type + * TYPE, which must be an integer type. * - * Failure: NULL + * Return: Success: new enumeration data type + * Failure: NULL * *------------------------------------------------------------------------- */ @@ -91,9 +90,11 @@ H5T__enum_create(const H5T_t *parent) /* Build new type */ 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); - assert(ret_value->shared->parent); + ret_value->shared->type = H5T_ENUM; + + if (NULL == (ret_value->shared->parent = H5T_copy(parent, H5T_COPY_ALL))) + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCOPY, NULL, "unable to copy base datatype for enum"); + ret_value->shared->size = ret_value->shared->parent->shared->size; done: diff --git a/src/H5Tpkg.h b/src/H5Tpkg.h index ddca0b35d16..bd029aa0eb7 100644 --- a/src/H5Tpkg.h +++ b/src/H5Tpkg.h @@ -170,6 +170,13 @@ typedef struct H5T_conv_ctx_t { hid_t dxpl_id; hid_t src_type_id; hid_t dst_type_id; + + /* Is conversion currently being done on a member of + * a container type, like a compound datatype? If so, + * cached information can be reused rather than creating + * and tearing it down for every compound element. + */ + bool recursive; } conv; /* No fields currently defined for H5T_cmd_t H5T_CONV_FREE */ @@ -177,8 +184,9 @@ typedef struct H5T_conv_ctx_t { } H5T_conv_ctx_t; /* Library internal datatype conversion functions are... */ -typedef herr_t (*H5T_lib_conv_t)(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, - size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); +typedef herr_t (*H5T_lib_conv_t)(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, + const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, + size_t bkg_stride, void *buf, void *bkg); /* Conversion callbacks */ typedef struct H5T_conv_func_t { @@ -197,9 +205,11 @@ struct H5T_path_t { H5T_conv_func_t conv; /* Conversion function */ bool is_hard; /*is it a hard function? */ bool is_noop; /*is it the noop conversion? */ - bool are_compounds; /*are source and dest both compounds?*/ - H5T_stats_t stats; /*statistics for the conversion */ H5T_cdata_t cdata; /*data for this function */ + +#ifdef H5T_DEBUG + H5T_stats_t stats; /*statistics for the conversion */ +#endif }; /* Reference function pointers */ @@ -506,469 +516,531 @@ H5_DLL H5T_t *H5T__open_name(const H5G_loc_t *loc, const char *name); H5_DLL hid_t H5T__get_create_plist(const H5T_t *type); /* Helper function for H5T_convert that accepts a pointer to a H5T_conv_ctx_t structure */ -H5_DLL herr_t H5T_convert_with_ctx(H5T_path_t *tpath, H5T_t *src_type, H5T_t *dst_type, +H5_DLL herr_t H5T_convert_with_ctx(H5T_path_t *tpath, const H5T_t *src_type, const H5T_t *dst_type, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); /* Conversion functions */ -H5_DLL herr_t H5T__conv_noop(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, - size_t nelmts, size_t buf_stride, size_t bkg_stride, void *_buf, void *bkg); - -H5_DLL herr_t H5T__conv_order(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, - size_t nelmts, size_t buf_stride, size_t bkg_stride, void *_buf, void *bkg); -H5_DLL herr_t H5T__conv_order_opt(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, - size_t nelmts, size_t buf_stride, size_t bkg_stride, void *_buf, void *bkg); -H5_DLL herr_t H5T__conv_struct(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, - size_t nelmts, size_t buf_stride, size_t bkg_stride, void *_buf, void *bkg); -H5_DLL herr_t H5T__conv_struct_opt(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, - size_t nelmts, size_t buf_stride, size_t bkg_stride, void *_buf, - void *bkg); -H5_DLL herr_t H5T__conv_enum(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, - size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); -H5_DLL herr_t H5T__conv_enum_numeric(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, +H5_DLL herr_t H5T__conv_noop(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, + const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, + size_t bkg_stride, void *_buf, void *bkg); + +H5_DLL herr_t H5T__conv_order(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, + const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, + size_t bkg_stride, void *_buf, void *bkg); +H5_DLL herr_t H5T__conv_order_opt(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, + const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, + size_t bkg_stride, void *_buf, void *bkg); +H5_DLL herr_t H5T__conv_struct(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, + const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, + size_t bkg_stride, void *_buf, void *bkg); +H5_DLL herr_t H5T__conv_struct_opt(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, + const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, + size_t bkg_stride, void *_buf, void *bkg); +H5_DLL herr_t H5T__conv_enum(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, + const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, + size_t bkg_stride, void *buf, void *bkg); +H5_DLL herr_t H5T__conv_enum_numeric(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); -H5_DLL herr_t H5T__conv_vlen(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, - size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); -H5_DLL herr_t H5T__conv_array(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, - size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); -H5_DLL herr_t H5T__conv_ref(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, - size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); -H5_DLL herr_t H5T__conv_i_i(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, - size_t nelmts, size_t buf_stride, size_t bkg_stride, void *_buf, void *bkg); -H5_DLL herr_t H5T__conv_f_f(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, - size_t nelmts, size_t buf_stride, size_t bkg_stride, void *_buf, void *bkg); -H5_DLL herr_t H5T__conv_f_i(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, - size_t nelmts, size_t buf_stride, size_t bkg_stride, void *_buf, void *bkg); -H5_DLL herr_t H5T__conv_i_f(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, - size_t nelmts, size_t buf_stride, size_t bkg_stride, void *_buf, void *bkg); -H5_DLL herr_t H5T__conv_s_s(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, - size_t nelmts, size_t buf_stride, size_t bkg_stride, void *_buf, void *bkg); -H5_DLL herr_t H5T__conv_b_b(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, - size_t nelmts, size_t buf_stride, size_t bkg_stride, void *_buf, void *bkg); - -H5_DLL herr_t H5T__conv_schar_uchar(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, +H5_DLL herr_t H5T__conv_vlen(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, + const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, + size_t bkg_stride, void *buf, void *bkg); +H5_DLL herr_t H5T__conv_array(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, + const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, + size_t bkg_stride, void *buf, void *bkg); +H5_DLL herr_t H5T__conv_ref(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, + const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, + size_t bkg_stride, void *buf, void *bkg); +H5_DLL herr_t H5T__conv_i_i(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, + const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, + size_t bkg_stride, void *_buf, void *bkg); +H5_DLL herr_t H5T__conv_f_f(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, + const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, + size_t bkg_stride, void *_buf, void *bkg); +H5_DLL herr_t H5T__conv_f_i(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, + const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, + size_t bkg_stride, void *_buf, void *bkg); +H5_DLL herr_t H5T__conv_i_f(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, + const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, + size_t bkg_stride, void *_buf, void *bkg); +H5_DLL herr_t H5T__conv_s_s(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, + const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, + size_t bkg_stride, void *_buf, void *bkg); +H5_DLL herr_t H5T__conv_b_b(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, + const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, + size_t bkg_stride, void *_buf, void *bkg); + +H5_DLL herr_t H5T__conv_schar_uchar(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); -H5_DLL herr_t H5T__conv_uchar_schar(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, +H5_DLL herr_t H5T__conv_uchar_schar(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); -H5_DLL herr_t H5T__conv_schar_short(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, +H5_DLL herr_t H5T__conv_schar_short(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); -H5_DLL herr_t H5T__conv_schar_ushort(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, +H5_DLL herr_t H5T__conv_schar_ushort(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); -H5_DLL herr_t H5T__conv_uchar_short(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, +H5_DLL herr_t H5T__conv_uchar_short(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); -H5_DLL herr_t H5T__conv_uchar_ushort(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, +H5_DLL herr_t H5T__conv_uchar_ushort(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); -H5_DLL herr_t H5T__conv_schar_int(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, - size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); -H5_DLL herr_t H5T__conv_schar_uint(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, - size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); -H5_DLL herr_t H5T__conv_uchar_int(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, - size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); -H5_DLL herr_t H5T__conv_uchar_uint(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, - size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); -H5_DLL herr_t H5T__conv_schar_long(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, - size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); -H5_DLL herr_t H5T__conv_schar_ulong(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, +H5_DLL herr_t H5T__conv_schar_int(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, + const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, + size_t bkg_stride, void *buf, void *bkg); +H5_DLL herr_t H5T__conv_schar_uint(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, + const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, + size_t bkg_stride, void *buf, void *bkg); +H5_DLL herr_t H5T__conv_uchar_int(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, + const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, + size_t bkg_stride, void *buf, void *bkg); +H5_DLL herr_t H5T__conv_uchar_uint(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, + const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, + size_t bkg_stride, void *buf, void *bkg); +H5_DLL herr_t H5T__conv_schar_long(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, + const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, + size_t bkg_stride, void *buf, void *bkg); +H5_DLL herr_t H5T__conv_schar_ulong(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); -H5_DLL herr_t H5T__conv_uchar_long(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, - size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); -H5_DLL herr_t H5T__conv_uchar_ulong(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, +H5_DLL herr_t H5T__conv_uchar_long(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, + const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, + size_t bkg_stride, void *buf, void *bkg); +H5_DLL herr_t H5T__conv_uchar_ulong(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); -H5_DLL herr_t H5T__conv_schar_llong(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, +H5_DLL herr_t H5T__conv_schar_llong(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); -H5_DLL herr_t H5T__conv_schar_ullong(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, +H5_DLL herr_t H5T__conv_schar_ullong(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); -H5_DLL herr_t H5T__conv_uchar_llong(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, +H5_DLL herr_t H5T__conv_uchar_llong(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); -H5_DLL herr_t H5T__conv_uchar_ullong(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, +H5_DLL herr_t H5T__conv_uchar_ullong(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); -H5_DLL herr_t H5T__conv_short_schar(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, +H5_DLL herr_t H5T__conv_short_schar(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); -H5_DLL herr_t H5T__conv_short_uchar(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, +H5_DLL herr_t H5T__conv_short_uchar(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); -H5_DLL herr_t H5T__conv_ushort_schar(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, +H5_DLL herr_t H5T__conv_ushort_schar(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); -H5_DLL herr_t H5T__conv_ushort_uchar(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, +H5_DLL herr_t H5T__conv_ushort_uchar(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); -H5_DLL herr_t H5T__conv_short_ushort(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, +H5_DLL herr_t H5T__conv_short_ushort(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); -H5_DLL herr_t H5T__conv_ushort_short(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, +H5_DLL herr_t H5T__conv_ushort_short(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); -H5_DLL herr_t H5T__conv_short_int(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, - size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); -H5_DLL herr_t H5T__conv_short_uint(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, - size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); -H5_DLL herr_t H5T__conv_ushort_int(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, - size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); -H5_DLL herr_t H5T__conv_ushort_uint(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, +H5_DLL herr_t H5T__conv_short_int(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, + const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, + size_t bkg_stride, void *buf, void *bkg); +H5_DLL herr_t H5T__conv_short_uint(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, + const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, + size_t bkg_stride, void *buf, void *bkg); +H5_DLL herr_t H5T__conv_ushort_int(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, + const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, + size_t bkg_stride, void *buf, void *bkg); +H5_DLL herr_t H5T__conv_ushort_uint(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); -H5_DLL herr_t H5T__conv_short_long(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, - size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); -H5_DLL herr_t H5T__conv_short_ulong(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, +H5_DLL herr_t H5T__conv_short_long(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, + const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, + size_t bkg_stride, void *buf, void *bkg); +H5_DLL herr_t H5T__conv_short_ulong(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); -H5_DLL herr_t H5T__conv_ushort_long(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, +H5_DLL herr_t H5T__conv_ushort_long(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); -H5_DLL herr_t H5T__conv_ushort_ulong(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, +H5_DLL herr_t H5T__conv_ushort_ulong(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); -H5_DLL herr_t H5T__conv_short_llong(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, +H5_DLL herr_t H5T__conv_short_llong(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); -H5_DLL herr_t H5T__conv_short_ullong(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, +H5_DLL herr_t H5T__conv_short_ullong(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); -H5_DLL herr_t H5T__conv_ushort_llong(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, +H5_DLL herr_t H5T__conv_ushort_llong(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); -H5_DLL herr_t H5T__conv_ushort_ullong(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, +H5_DLL herr_t H5T__conv_ushort_ullong(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); -H5_DLL herr_t H5T__conv_int_schar(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, - size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); -H5_DLL herr_t H5T__conv_int_uchar(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, - size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); -H5_DLL herr_t H5T__conv_uint_schar(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, - size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); -H5_DLL herr_t H5T__conv_uint_uchar(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, - size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); -H5_DLL herr_t H5T__conv_int_short(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, - size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); -H5_DLL herr_t H5T__conv_int_ushort(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, - size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); -H5_DLL herr_t H5T__conv_uint_short(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, - size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); -H5_DLL herr_t H5T__conv_uint_ushort(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, +H5_DLL herr_t H5T__conv_int_schar(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, + const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, + size_t bkg_stride, void *buf, void *bkg); +H5_DLL herr_t H5T__conv_int_uchar(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, + const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, + size_t bkg_stride, void *buf, void *bkg); +H5_DLL herr_t H5T__conv_uint_schar(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, + const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, + size_t bkg_stride, void *buf, void *bkg); +H5_DLL herr_t H5T__conv_uint_uchar(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, + const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, + size_t bkg_stride, void *buf, void *bkg); +H5_DLL herr_t H5T__conv_int_short(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, + const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, + size_t bkg_stride, void *buf, void *bkg); +H5_DLL herr_t H5T__conv_int_ushort(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, + const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, + size_t bkg_stride, void *buf, void *bkg); +H5_DLL herr_t H5T__conv_uint_short(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, + const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, + size_t bkg_stride, void *buf, void *bkg); +H5_DLL herr_t H5T__conv_uint_ushort(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); -H5_DLL herr_t H5T__conv_int_uint(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, - size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); -H5_DLL herr_t H5T__conv_uint_int(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, - size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); -H5_DLL herr_t H5T__conv_int_long(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, - size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); -H5_DLL herr_t H5T__conv_int_ulong(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, - size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); -H5_DLL herr_t H5T__conv_uint_long(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, - size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); -H5_DLL herr_t H5T__conv_uint_ulong(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, - size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); -H5_DLL herr_t H5T__conv_int_llong(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, - size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); -H5_DLL herr_t H5T__conv_int_ullong(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, - size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); -H5_DLL herr_t H5T__conv_uint_llong(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, - size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); -H5_DLL herr_t H5T__conv_uint_ullong(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, +H5_DLL herr_t H5T__conv_int_uint(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, + const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, + size_t bkg_stride, void *buf, void *bkg); +H5_DLL herr_t H5T__conv_uint_int(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, + const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, + size_t bkg_stride, void *buf, void *bkg); +H5_DLL herr_t H5T__conv_int_long(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, + const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, + size_t bkg_stride, void *buf, void *bkg); +H5_DLL herr_t H5T__conv_int_ulong(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, + const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, + size_t bkg_stride, void *buf, void *bkg); +H5_DLL herr_t H5T__conv_uint_long(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, + const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, + size_t bkg_stride, void *buf, void *bkg); +H5_DLL herr_t H5T__conv_uint_ulong(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, + const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, + size_t bkg_stride, void *buf, void *bkg); +H5_DLL herr_t H5T__conv_int_llong(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, + const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, + size_t bkg_stride, void *buf, void *bkg); +H5_DLL herr_t H5T__conv_int_ullong(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, + const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, + size_t bkg_stride, void *buf, void *bkg); +H5_DLL herr_t H5T__conv_uint_llong(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, + const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, + size_t bkg_stride, void *buf, void *bkg); +H5_DLL herr_t H5T__conv_uint_ullong(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); -H5_DLL herr_t H5T__conv_long_schar(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, - size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); -H5_DLL herr_t H5T__conv_long_uchar(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, - size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); -H5_DLL herr_t H5T__conv_ulong_schar(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, +H5_DLL herr_t H5T__conv_long_schar(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, + const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, + size_t bkg_stride, void *buf, void *bkg); +H5_DLL herr_t H5T__conv_long_uchar(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, + const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, + size_t bkg_stride, void *buf, void *bkg); +H5_DLL herr_t H5T__conv_ulong_schar(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); -H5_DLL herr_t H5T__conv_ulong_uchar(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, +H5_DLL herr_t H5T__conv_ulong_uchar(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); -H5_DLL herr_t H5T__conv_long_short(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, - size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); -H5_DLL herr_t H5T__conv_long_ushort(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, +H5_DLL herr_t H5T__conv_long_short(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, + const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, + size_t bkg_stride, void *buf, void *bkg); +H5_DLL herr_t H5T__conv_long_ushort(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); -H5_DLL herr_t H5T__conv_ulong_short(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, +H5_DLL herr_t H5T__conv_ulong_short(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); -H5_DLL herr_t H5T__conv_ulong_ushort(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, +H5_DLL herr_t H5T__conv_ulong_ushort(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); -H5_DLL herr_t H5T__conv_long_int(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, - size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); -H5_DLL herr_t H5T__conv_long_uint(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, - size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); -H5_DLL herr_t H5T__conv_ulong_int(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, - size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); -H5_DLL herr_t H5T__conv_ulong_uint(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, - size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); -H5_DLL herr_t H5T__conv_long_ulong(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, - size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); -H5_DLL herr_t H5T__conv_ulong_long(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, - size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); -H5_DLL herr_t H5T__conv_long_llong(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, - size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); -H5_DLL herr_t H5T__conv_long_ullong(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, +H5_DLL herr_t H5T__conv_long_int(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, + const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, + size_t bkg_stride, void *buf, void *bkg); +H5_DLL herr_t H5T__conv_long_uint(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, + const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, + size_t bkg_stride, void *buf, void *bkg); +H5_DLL herr_t H5T__conv_ulong_int(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, + const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, + size_t bkg_stride, void *buf, void *bkg); +H5_DLL herr_t H5T__conv_ulong_uint(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, + const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, + size_t bkg_stride, void *buf, void *bkg); +H5_DLL herr_t H5T__conv_long_ulong(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, + const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, + size_t bkg_stride, void *buf, void *bkg); +H5_DLL herr_t H5T__conv_ulong_long(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, + const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, + size_t bkg_stride, void *buf, void *bkg); +H5_DLL herr_t H5T__conv_long_llong(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, + const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, + size_t bkg_stride, void *buf, void *bkg); +H5_DLL herr_t H5T__conv_long_ullong(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); -H5_DLL herr_t H5T__conv_ulong_llong(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, +H5_DLL herr_t H5T__conv_ulong_llong(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); -H5_DLL herr_t H5T__conv_ulong_ullong(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, +H5_DLL herr_t H5T__conv_ulong_ullong(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); -H5_DLL herr_t H5T__conv_llong_schar(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, +H5_DLL herr_t H5T__conv_llong_schar(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); -H5_DLL herr_t H5T__conv_llong_uchar(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, +H5_DLL herr_t H5T__conv_llong_uchar(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); -H5_DLL herr_t H5T__conv_ullong_schar(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, +H5_DLL herr_t H5T__conv_ullong_schar(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); -H5_DLL herr_t H5T__conv_ullong_uchar(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, +H5_DLL herr_t H5T__conv_ullong_uchar(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); -H5_DLL herr_t H5T__conv_llong_short(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, +H5_DLL herr_t H5T__conv_llong_short(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); -H5_DLL herr_t H5T__conv_llong_ushort(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, +H5_DLL herr_t H5T__conv_llong_ushort(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); -H5_DLL herr_t H5T__conv_ullong_short(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, +H5_DLL herr_t H5T__conv_ullong_short(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); -H5_DLL herr_t H5T__conv_ullong_ushort(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, +H5_DLL herr_t H5T__conv_ullong_ushort(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); -H5_DLL herr_t H5T__conv_llong_int(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, - size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); -H5_DLL herr_t H5T__conv_llong_uint(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, - size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); -H5_DLL herr_t H5T__conv_ullong_int(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, - size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); -H5_DLL herr_t H5T__conv_ullong_uint(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, +H5_DLL herr_t H5T__conv_llong_int(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, + const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, + size_t bkg_stride, void *buf, void *bkg); +H5_DLL herr_t H5T__conv_llong_uint(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, + const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, + size_t bkg_stride, void *buf, void *bkg); +H5_DLL herr_t H5T__conv_ullong_int(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, + const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, + size_t bkg_stride, void *buf, void *bkg); +H5_DLL herr_t H5T__conv_ullong_uint(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); -H5_DLL herr_t H5T__conv_llong_long(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, - size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); -H5_DLL herr_t H5T__conv_llong_ulong(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, +H5_DLL herr_t H5T__conv_llong_long(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, + const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, + size_t bkg_stride, void *buf, void *bkg); +H5_DLL herr_t H5T__conv_llong_ulong(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); -H5_DLL herr_t H5T__conv_ullong_long(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, +H5_DLL herr_t H5T__conv_ullong_long(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); -H5_DLL herr_t H5T__conv_ullong_ulong(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, +H5_DLL herr_t H5T__conv_ullong_ulong(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); -H5_DLL herr_t H5T__conv_llong_ullong(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, +H5_DLL herr_t H5T__conv_llong_ullong(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); -H5_DLL herr_t H5T__conv_ullong_llong(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, +H5_DLL herr_t H5T__conv_ullong_llong(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); -H5_DLL herr_t H5T__conv_float_double(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, +H5_DLL herr_t H5T__conv_float_double(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); -H5_DLL herr_t H5T__conv_float_ldouble(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, +H5_DLL herr_t H5T__conv_float_ldouble(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); -H5_DLL herr_t H5T__conv_double_float(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, +H5_DLL herr_t H5T__conv_double_float(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); -H5_DLL herr_t H5T__conv_double_ldouble(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, +H5_DLL herr_t H5T__conv_double_ldouble(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); -H5_DLL herr_t H5T__conv_ldouble_float(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, +H5_DLL herr_t H5T__conv_ldouble_float(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); -H5_DLL herr_t H5T__conv_ldouble_double(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, +H5_DLL herr_t H5T__conv_ldouble_double(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); -H5_DLL herr_t H5T__conv_schar_float(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, +H5_DLL herr_t H5T__conv_schar_float(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); -H5_DLL herr_t H5T__conv_schar_double(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, +H5_DLL herr_t H5T__conv_schar_double(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); -H5_DLL herr_t H5T__conv_schar_ldouble(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, +H5_DLL herr_t H5T__conv_schar_ldouble(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); -H5_DLL herr_t H5T__conv_uchar_float(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, +H5_DLL herr_t H5T__conv_uchar_float(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); -H5_DLL herr_t H5T__conv_uchar_double(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, +H5_DLL herr_t H5T__conv_uchar_double(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); -H5_DLL herr_t H5T__conv_uchar_ldouble(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, +H5_DLL herr_t H5T__conv_uchar_ldouble(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); -H5_DLL herr_t H5T__conv_short_float(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, +H5_DLL herr_t H5T__conv_short_float(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); -H5_DLL herr_t H5T__conv_short_double(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, +H5_DLL herr_t H5T__conv_short_double(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); -H5_DLL herr_t H5T__conv_short_ldouble(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, +H5_DLL herr_t H5T__conv_short_ldouble(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); -H5_DLL herr_t H5T__conv_ushort_float(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, +H5_DLL herr_t H5T__conv_ushort_float(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); -H5_DLL herr_t H5T__conv_ushort_double(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, +H5_DLL herr_t H5T__conv_ushort_double(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); -H5_DLL herr_t H5T__conv_ushort_ldouble(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, +H5_DLL herr_t H5T__conv_ushort_ldouble(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); -H5_DLL herr_t H5T__conv_int_float(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, - size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); -H5_DLL herr_t H5T__conv_int_double(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, - size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); -H5_DLL herr_t H5T__conv_int_ldouble(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, +H5_DLL herr_t H5T__conv_int_float(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, + const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, + size_t bkg_stride, void *buf, void *bkg); +H5_DLL herr_t H5T__conv_int_double(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, + const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, + size_t bkg_stride, void *buf, void *bkg); +H5_DLL herr_t H5T__conv_int_ldouble(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); -H5_DLL herr_t H5T__conv_uint_float(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, - size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); -H5_DLL herr_t H5T__conv_uint_double(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, +H5_DLL herr_t H5T__conv_uint_float(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, + const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, + size_t bkg_stride, void *buf, void *bkg); +H5_DLL herr_t H5T__conv_uint_double(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); -H5_DLL herr_t H5T__conv_uint_ldouble(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, +H5_DLL herr_t H5T__conv_uint_ldouble(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); -H5_DLL herr_t H5T__conv_long_float(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, - size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); -H5_DLL herr_t H5T__conv_long_double(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, +H5_DLL herr_t H5T__conv_long_float(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, + const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, + size_t bkg_stride, void *buf, void *bkg); +H5_DLL herr_t H5T__conv_long_double(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); -H5_DLL herr_t H5T__conv_long_ldouble(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, +H5_DLL herr_t H5T__conv_long_ldouble(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); -H5_DLL herr_t H5T__conv_ulong_float(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, +H5_DLL herr_t H5T__conv_ulong_float(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); -H5_DLL herr_t H5T__conv_ulong_double(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, +H5_DLL herr_t H5T__conv_ulong_double(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); -H5_DLL herr_t H5T__conv_ulong_ldouble(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, +H5_DLL herr_t H5T__conv_ulong_ldouble(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); -H5_DLL herr_t H5T__conv_llong_float(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, +H5_DLL herr_t H5T__conv_llong_float(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); -H5_DLL herr_t H5T__conv_llong_double(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, +H5_DLL herr_t H5T__conv_llong_double(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); -H5_DLL herr_t H5T__conv_llong_ldouble(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, +H5_DLL herr_t H5T__conv_llong_ldouble(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); -H5_DLL herr_t H5T__conv_ullong_float(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, +H5_DLL herr_t H5T__conv_ullong_float(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); -H5_DLL herr_t H5T__conv_ullong_double(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, +H5_DLL herr_t H5T__conv_ullong_double(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); -H5_DLL herr_t H5T__conv_ullong_ldouble(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, +H5_DLL herr_t H5T__conv_ullong_ldouble(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); -H5_DLL herr_t H5T__conv_float_schar(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, +H5_DLL herr_t H5T__conv_float_schar(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); -H5_DLL herr_t H5T__conv_float_uchar(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, +H5_DLL herr_t H5T__conv_float_uchar(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); -H5_DLL herr_t H5T__conv_float_short(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, +H5_DLL herr_t H5T__conv_float_short(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); -H5_DLL herr_t H5T__conv_float_ushort(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, +H5_DLL herr_t H5T__conv_float_ushort(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); -H5_DLL herr_t H5T__conv_float_int(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, - size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); -H5_DLL herr_t H5T__conv_float_uint(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, - size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); -H5_DLL herr_t H5T__conv_float_long(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, - size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); -H5_DLL herr_t H5T__conv_float_ulong(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, +H5_DLL herr_t H5T__conv_float_int(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, + const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, + size_t bkg_stride, void *buf, void *bkg); +H5_DLL herr_t H5T__conv_float_uint(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, + const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, + size_t bkg_stride, void *buf, void *bkg); +H5_DLL herr_t H5T__conv_float_long(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, + const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, + size_t bkg_stride, void *buf, void *bkg); +H5_DLL herr_t H5T__conv_float_ulong(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); -H5_DLL herr_t H5T__conv_float_llong(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, +H5_DLL herr_t H5T__conv_float_llong(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); -H5_DLL herr_t H5T__conv_float_ullong(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, +H5_DLL herr_t H5T__conv_float_ullong(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); -H5_DLL herr_t H5T__conv_double_schar(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, +H5_DLL herr_t H5T__conv_double_schar(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); -H5_DLL herr_t H5T__conv_double_uchar(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, +H5_DLL herr_t H5T__conv_double_uchar(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); -H5_DLL herr_t H5T__conv_double_short(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, +H5_DLL herr_t H5T__conv_double_short(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); -H5_DLL herr_t H5T__conv_double_ushort(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, +H5_DLL herr_t H5T__conv_double_ushort(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); -H5_DLL herr_t H5T__conv_double_int(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, - size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); -H5_DLL herr_t H5T__conv_double_uint(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, +H5_DLL herr_t H5T__conv_double_int(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, + const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, + size_t bkg_stride, void *buf, void *bkg); +H5_DLL herr_t H5T__conv_double_uint(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); -H5_DLL herr_t H5T__conv_double_long(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, +H5_DLL herr_t H5T__conv_double_long(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); -H5_DLL herr_t H5T__conv_double_ulong(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, +H5_DLL herr_t H5T__conv_double_ulong(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); -H5_DLL herr_t H5T__conv_double_llong(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, +H5_DLL herr_t H5T__conv_double_llong(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); -H5_DLL herr_t H5T__conv_double_ullong(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, +H5_DLL herr_t H5T__conv_double_ullong(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); -H5_DLL herr_t H5T__conv_ldouble_schar(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, +H5_DLL herr_t H5T__conv_ldouble_schar(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); -H5_DLL herr_t H5T__conv_ldouble_uchar(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, +H5_DLL herr_t H5T__conv_ldouble_uchar(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); -H5_DLL herr_t H5T__conv_ldouble_short(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, +H5_DLL herr_t H5T__conv_ldouble_short(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); -H5_DLL herr_t H5T__conv_ldouble_ushort(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, +H5_DLL herr_t H5T__conv_ldouble_ushort(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); -H5_DLL herr_t H5T__conv_ldouble_int(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, +H5_DLL herr_t H5T__conv_ldouble_int(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); -H5_DLL herr_t H5T__conv_ldouble_uint(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, +H5_DLL herr_t H5T__conv_ldouble_uint(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); -H5_DLL herr_t H5T__conv_ldouble_long(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, +H5_DLL herr_t H5T__conv_ldouble_long(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); -H5_DLL herr_t H5T__conv_ldouble_ulong(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, +H5_DLL herr_t H5T__conv_ldouble_ulong(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); -H5_DLL herr_t H5T__conv_ldouble_llong(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, +H5_DLL herr_t H5T__conv_ldouble_llong(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); -H5_DLL herr_t H5T__conv_ldouble_ullong(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, +H5_DLL herr_t H5T__conv_ldouble_ullong(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, const H5T_conv_ctx_t *conv_ctx, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); diff --git a/src/H5Tprivate.h b/src/H5Tprivate.h index 633b0b787d8..7d8f27615a0 100644 --- a/src/H5Tprivate.h +++ b/src/H5Tprivate.h @@ -135,20 +135,20 @@ H5_DLL H5T_bkg_t H5T_path_bkg(const H5T_path_t *p); H5_DLL H5T_subset_info_t *H5T_path_compound_subset(const H5T_path_t *p); H5_DLL herr_t H5T_unregister(H5T_pers_t pers, const char *name, H5T_t *src, H5T_t *dst, H5VL_object_t *owned_vol_obj, H5T_conv_t func); -H5_DLL herr_t H5T_convert(H5T_path_t *tpath, H5T_t *src_type, H5T_t *dst_type, size_t nelmts, - size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); -H5_DLL herr_t H5T_reclaim(H5T_t *type, struct H5S_t *space, void *buf); -H5_DLL herr_t H5T_reclaim_cb(void *elem, H5T_t *dt, unsigned ndim, const hsize_t *point, void *op_data); -H5_DLL herr_t H5T_vlen_reclaim_elmt(void *elem, H5T_t *dt); -H5_DLL htri_t H5T_set_loc(H5T_t *dt, H5VL_object_t *file, H5T_loc_t loc); -H5_DLL htri_t H5T_is_sensible(const H5T_t *dt); -H5_DLL uint32_t H5T_hash(H5F_t *file, const H5T_t *dt); -H5_DLL herr_t H5T_set_version(H5F_t *f, H5T_t *dt); -H5_DLL herr_t H5T_patch_file(H5T_t *dt, H5F_t *f); -H5_DLL herr_t H5T_patch_vlen_file(H5T_t *dt, H5VL_object_t *file); -H5_DLL herr_t H5T_own_vol_obj(H5T_t *dt, H5VL_object_t *vol_obj); -H5_DLL htri_t H5T_is_variable_str(const H5T_t *dt); -H5_DLL H5T_t *H5T_construct_datatype(H5VL_object_t *dt_obj); +H5_DLL herr_t H5T_convert(H5T_path_t *tpath, const H5T_t *src_type, const H5T_t *dst_type, size_t nelmts, + size_t buf_stride, size_t bkg_stride, void *buf, void *bkg); +H5_DLL herr_t H5T_reclaim(const H5T_t *type, struct H5S_t *space, void *buf); +H5_DLL herr_t H5T_reclaim_cb(void *elem, const H5T_t *dt, unsigned ndim, const hsize_t *point, void *op_data); +H5_DLL herr_t H5T_vlen_reclaim_elmt(void *elem, H5T_t *dt); +H5_DLL htri_t H5T_set_loc(H5T_t *dt, H5VL_object_t *file, H5T_loc_t loc); +H5_DLL htri_t H5T_is_sensible(const H5T_t *dt); +H5_DLL uint32_t H5T_hash(H5F_t *file, const H5T_t *dt); +H5_DLL herr_t H5T_set_version(H5F_t *f, H5T_t *dt); +H5_DLL herr_t H5T_patch_file(H5T_t *dt, H5F_t *f); +H5_DLL herr_t H5T_patch_vlen_file(H5T_t *dt, H5VL_object_t *file); +H5_DLL herr_t H5T_own_vol_obj(H5T_t *dt, H5VL_object_t *vol_obj); +H5_DLL htri_t H5T_is_variable_str(const H5T_t *dt); +H5_DLL H5T_t *H5T_construct_datatype(H5VL_object_t *dt_obj); H5_DLL H5VL_object_t *H5T_get_named_type(const H5T_t *dt); H5_DLL H5T_t *H5T_get_actual_type(H5T_t *dt); H5_DLL herr_t H5T_save_refresh_state(hid_t tid, struct H5O_shared_t *cached_H5O_shared); diff --git a/src/H5VLnative_dataset.c b/src/H5VLnative_dataset.c index a4f7caec3b7..ced4569d8d1 100644 --- a/src/H5VLnative_dataset.c +++ b/src/H5VLnative_dataset.c @@ -119,7 +119,7 @@ H5VL__native_dataset_io_setup(size_t count, void *obj[], hid_t mem_type_id[], hi "different files detected in multi dataset I/O request"); /* Set up memory type */ - if (NULL == (dinfo[i].mem_type = (H5T_t *)H5I_object_verify(mem_type_id[i], H5I_DATATYPE))) + if (NULL == (dinfo[i].mem_type = (const H5T_t *)H5I_object_verify(mem_type_id[i], H5I_DATATYPE))) HGOTO_ERROR(H5E_DATASET, H5E_BADTYPE, FAIL, "invalid datatype"); /* Set up file dataspace */ diff --git a/test/dtypes.c b/test/dtypes.c index 7aa3b17c726..110baeef459 100644 --- a/test/dtypes.c +++ b/test/dtypes.c @@ -7386,6 +7386,107 @@ test_set_order_compound(hid_t fapl) return 1; } /* end test_set_order_compound() */ +/*------------------------------------------------------------------------- + * Function: test_enum_member_order + * + * Purpose: Tests that datatype conversions don't perturb the ordering + * of members within an enum datatype due to the way they sort + * the members internally during conversion. + * + * Return: Success: 0 + * Failure: number of errors + * + *------------------------------------------------------------------------- + */ +#define NUM_MEMBERS 3 +static int +test_enum_member_order(void) +{ + typedef enum { SOLID, LIQUID, GAS, PLASMA } phase_t; + + const char *enum_names[4] = {"SOLID", "LIQUID", "GAS", "PLASMA"}; + phase_t enum_int_buf[NUM_MEMBERS] = {LIQUID, GAS, PLASMA}; + long enum_long_buf[NUM_MEMBERS] = {0, 0, 0}; + hid_t enum_type1 = H5I_INVALID_HID; + hid_t enum_type2 = H5I_INVALID_HID; + int val_int = -1; + long val_long = -1; + + TESTING("stability of enum member ordering after datatype conversion"); + + /* Test enum type */ + + if ((enum_type1 = H5Tenum_create(H5T_NATIVE_INT)) < 0) + TEST_ERROR; + if ((enum_type2 = H5Tenum_create(H5T_NATIVE_LONG)) < 0) + TEST_ERROR; + + for (size_t i = 0; i < sizeof(enum_names) / sizeof(enum_names[0]); i++) { + val_int = (int)i; + val_long = (long)i; + + /* Insert members into enums in order: SOLID, LIQUID, GAS, PLASMA */ + if (H5Tenum_insert(enum_type1, enum_names[i], &val_int) < 0) + TEST_ERROR; + if (H5Tenum_insert(enum_type2, enum_names[i], &val_long) < 0) + TEST_ERROR; + } + + memcpy(enum_long_buf, enum_int_buf, NUM_MEMBERS * sizeof(int)); + + /* Convert from int enum type to long enum type */ + if (H5Tconvert(enum_type1, enum_type2, NUM_MEMBERS, enum_long_buf, NULL, H5P_DEFAULT) < 0) + TEST_ERROR; + + /* Sanity check */ + for (size_t i = 0; i < NUM_MEMBERS; i++) { + if (enum_long_buf[i] != (long)enum_int_buf[i]) { + H5_FAILED(); + printf("long enum buf member %zu mismatch after conversion; expected %ld, got %ld\n", i, + (long)enum_int_buf[i], enum_long_buf[i]); + goto error; + } + } + + /* Check that each enum type's members are in the same order we inserted them in */ + for (size_t i = 0; i < sizeof(enum_names) / sizeof(enum_names[0]); i++) { + if (H5Tget_member_value(enum_type1, (unsigned)i, &val_int) < 0) + TEST_ERROR; + if (val_int != (int)i) { + H5_FAILED(); + printf("int enum member %zu was out of order; expected %d, got %d\n", i, (int)i, val_int); + goto error; + } + + if (H5Tget_member_value(enum_type2, (unsigned)i, &val_long) < 0) + TEST_ERROR; + if (val_long != (long)i) { + H5_FAILED(); + printf("long enum member %zu was out of order; expected %ld, got %ld\n", i, (long)i, val_long); + goto error; + } + } + + if (H5Tclose(enum_type1) < 0) + TEST_ERROR; + if (H5Tclose(enum_type2) < 0) + TEST_ERROR; + + PASSED(); + + return 0; + +error: + H5E_BEGIN_TRY + { + H5Tclose(enum_type1); + H5Tclose(enum_type2); + } + H5E_END_TRY + + return 1; +} + /*------------------------------------------------------------------------- * Function: test_named_indirect_reopen * @@ -9126,6 +9227,7 @@ main(void) nerrors += test_delete_obj_named(fapl); nerrors += test_delete_obj_named_fileid(fapl); nerrors += test_set_order_compound(fapl); + nerrors += test_enum_member_order(); nerrors += test_str_create(); #ifndef H5_NO_DEPRECATED_SYMBOLS nerrors += test_deprec(fapl); From a3c4995bcc97c1daedc4234354ae496678aaaf5d Mon Sep 17 00:00:00 2001 From: Jordan Henderson Date: Mon, 18 Mar 2024 17:11:21 -0500 Subject: [PATCH 2/2] Address some comments from review --- src/H5Tconv.c | 34 ++++++++++++++++------------------ 1 file changed, 16 insertions(+), 18 deletions(-) diff --git a/src/H5Tconv.c b/src/H5Tconv.c index 43b642c20ce..376e367cae2 100644 --- a/src/H5Tconv.c +++ b/src/H5Tconv.c @@ -2810,9 +2810,6 @@ H5T__conv_enum_init(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, cons if (!priv) { if (NULL == (priv = (H5T_conv_enum_t *)(cdata->priv = calloc(1, sizeof(*priv))))) HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed"); - if (0 == src->shared->u.enumer.nmembs) - HGOTO_DONE(SUCCEED); - rebuild_cache = true; } else { @@ -2901,12 +2898,11 @@ H5T__conv_enum_init(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, cons * if the entry is unused. * * (This optimized algorithm doesn't work when the byte orders are different. - * The code such as "n = *((int*)(src->shared->u.enumer.value+i*src->shared->size));" - * can change the value significantly. i.g. if the source value is big-endian 0x0000000f, - * executing the casting on little-endian machine will get a big number 0x0f000000. - * Then it can't meet the condition - * "if(src->shared->u.enumer.nmembs<2 || (double)length/src->shared->u.enumer.nmembs<1.2)" - * Because this is the optimized code, we won't fix it. It should still work in some + * The code such as "n = *((int *)((void *)((uint8_t *)src_sh->u.enumer.value + (i * + * src_sh->size))));" can change the value significantly. i.g. if the source value is big-endian + * 0x0000000f, executing the casting on little-endian machine will get a big number 0x0f000000. Then + * it can't meet the condition "if (src_nmembs < 2 || ((double)length / (double)src_nmembs < + * (double)(1.2F)))" Because this is the optimized code, we won't fix it. It should still work in some * situations. SLU - 2011/5/24) */ if (1 == src_sh->size || sizeof(short) == src_sh->size || sizeof(int) == src_sh->size) { @@ -3093,14 +3089,14 @@ H5T__conv_enum(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, const H5T d = buf + (nelmts - 1) * dst_sh->size; } - for (i = 0; i < nelmts; i++, s += src_delta, d += dst_delta) { - if (priv->length) { + if (priv->length) { + for (i = 0; i < nelmts; i++, s += src_delta, d += dst_delta) { /* Use O(1) lookup */ /* (The casting won't work when the byte orders are different. i.g. if the source value - * is big-endian 0x0000000f, the direct casting "n = *((int*)s);" will make it a big - * number 0x0f000000 on little-endian machine. But we won't fix it because it's an - * optimization code. Please also see the comment in the H5T__conv_enum_init() function. - * SLU - 2011/5/24) + * is big-endian 0x0000000f, the direct casting "n = *((int *)((void *)s));" will make + * it a big number 0x0f000000 on little-endian machine. But we won't fix it because it's + * an optimization code. Please also see the comment in the H5T__conv_enum_init() + * function. SLU - 2011/5/24) */ if (1 == src_sh->size) n = *((signed char *)s); @@ -3129,8 +3125,10 @@ H5T__conv_enum(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, const H5T (uint8_t *)dst_sh->u.enumer.value + ((unsigned)priv->src2dst[n] * dst_sh->size), dst_sh->size); - } /* end if */ - else { + } + } + else { + for (i = 0; i < nelmts; i++, s += src_delta, d += dst_delta) { /* Use O(log N) lookup */ unsigned lt = 0; unsigned rt = src_sh->u.enumer.nmembs; @@ -3169,7 +3167,7 @@ H5T__conv_enum(const H5T_t *src, const H5T_t *dst, H5T_cdata_t *cdata, const H5T ((unsigned)priv->src2dst[md] * dst_sh->size), dst_sh->size); } /* end else */ - } /* end else */ + } } break;