diff options
author | Robb Matzke <matzke@llnl.gov> | 2000-05-18 18:08:22 (GMT) |
---|---|---|
committer | Robb Matzke <matzke@llnl.gov> | 2000-05-18 18:08:22 (GMT) |
commit | fecde2d176315da8ba660c452f9efa812221ea8f (patch) | |
tree | ed7f2d20cfebf82d89b25f86cfbba71958bc365d | |
parent | ffd07d8f2d187583fe78e64375e7d7044044f69c (diff) | |
download | hdf5-fecde2d176315da8ba660c452f9efa812221ea8f.zip hdf5-fecde2d176315da8ba660c452f9efa812221ea8f.tar.gz hdf5-fecde2d176315da8ba660c452f9efa812221ea8f.tar.bz2 |
[svn-r2263] * 2000-05-18
** src/H5Tconv.c [1.2,1.3]
** src/H5Tpkg.h [1.2,1.3]
** src/H5Tpublic.h [1.2,1.3]
The H5T_conv_struct_opt() function had a design flaw -- it
didn't keep information about the stride to use to step
through the temporary/background-value buffer and thus nested
invocations would clobber each other's temp buffers. This was
fixed by splitting the `stride' argument into `buf_stride' and
`bkg_stride' arguments for all the conversion functions. THIS
IS AN API CHANGE, but users will get a compiler warning when
they pass their conversion function pointer to H5Tregister().
** src/H5T.c [1.2,1.3]
** src/H5Tprivate.h [1.2,1.3]
Added a bkg_stride argument to the H5T_convert() definition in
order to fix a bug related to the optimized compound datatype
conversion function.
** src/H5T.c [1.2,1.3]
** src/H5A.c [1.2,1.3]
** src/H5D.c [1.2,1.3]
** src/H5Ofill.c [1.2,1.3]
** src/H5P.c [1.2,1.3]
Added bkg_stride=0 argument to the H5T_convert() calls.
** test/dtypes.c [1.2,1.3]
Added a test for the H5T_conv_struct_opt() bug fixed above.
-rw-r--r-- | src/H5A.c | 6 | ||||
-rw-r--r-- | src/H5D.c | 4 | ||||
-rw-r--r-- | src/H5Ofill.c | 2 | ||||
-rw-r--r-- | src/H5P.c | 3 | ||||
-rw-r--r-- | src/H5T.c | 107 | ||||
-rw-r--r-- | src/H5Tconv.c | 964 | ||||
-rw-r--r-- | src/H5Tpkg.h | 421 | ||||
-rw-r--r-- | src/H5Tprivate.h | 4 | ||||
-rw-r--r-- | src/H5Tpublic.h | 5 | ||||
-rw-r--r-- | test/dtypes.c | 104 |
10 files changed, 1083 insertions, 537 deletions
@@ -665,7 +665,8 @@ H5A_write(H5A_t *attr, const H5T_t *mem_type, void *buf) } /* Perform data type conversion */ - if (H5T_convert(tpath, src_id, dst_id, nelmts, 0, tconv_buf, bkg_buf, H5P_DEFAULT)<0) { + if (H5T_convert(tpath, src_id, dst_id, nelmts, 0, 0, tconv_buf, bkg_buf, + H5P_DEFAULT)<0) { HGOTO_ERROR(H5E_ATTR, H5E_CANTENCODE, FAIL, "data type conversion failed"); } @@ -830,7 +831,8 @@ H5A_read(H5A_t *attr, const H5T_t *mem_type, void *buf) } /* Perform data type conversion. */ - if (H5T_convert(tpath, src_id, dst_id, nelmts, 0, tconv_buf, bkg_buf, H5P_DEFAULT)<0) { + if (H5T_convert(tpath, src_id, dst_id, nelmts, 0, 0, tconv_buf, bkg_buf, + H5P_DEFAULT)<0) { HGOTO_ERROR(H5E_ATTR, H5E_CANTENCODE, FAIL, "data type conversion failed"); } @@ -1762,7 +1762,7 @@ printf("%s: check 2.0, src_type_size=%d, dst_type_size=%d, target_size=%d, min_e /* * Perform data type conversion. */ - if (H5T_convert(tpath, src_id, dst_id, smine_nelmts, 0, tconv_buf, + if (H5T_convert(tpath, src_id, dst_id, smine_nelmts, 0, 0, tconv_buf, bkg_buf, dset_xfer_plid)<0) { HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "data type conversion failed"); @@ -2191,7 +2191,7 @@ H5D_write(H5D_t *dataset, const H5T_t *mem_type, const H5S_t *mem_space, /* * Perform data type conversion. */ - if (H5T_convert(tpath, src_id, dst_id, smine_nelmts, 0, tconv_buf, + if (H5T_convert(tpath, src_id, dst_id, smine_nelmts, 0, 0, tconv_buf, bkg_buf, dset_xfer_plid)<0) { HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "data type conversion failed"); diff --git a/src/H5Ofill.c b/src/H5Ofill.c index 2992606..7178575 100644 --- a/src/H5Ofill.c +++ b/src/H5Ofill.c @@ -361,7 +361,7 @@ H5O_fill_convert(H5O_fill_t *fill, H5T_t *dset_type) } /* Do the conversion */ - if (H5T_convert(tpath, src_id, dst_id, 1, 0, buf, bkg, H5P_DEFAULT)<0) { + if (H5T_convert(tpath, src_id, dst_id, 1, 0, 0, buf, bkg, H5P_DEFAULT)<0) { HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "data type conversion failed"); } @@ -2907,7 +2907,8 @@ H5Pget_fill_value(hid_t plist_id, hid_t type_id, void *value/*out*/) HDmemcpy(buf, plist->fill.buf, H5T_get_size(plist->fill.type)); /* Do the conversion */ - if (H5T_convert(tpath, src_id, type_id, 1, 0, buf, bkg, H5P_DEFAULT)<0) { + if (H5T_convert(tpath, src_id, type_id, 1, 0, 0, buf, bkg, + H5P_DEFAULT)<0) { HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "data type conversion failed"); } @@ -1364,7 +1364,7 @@ H5T_term_interface(void) H5T_print_stats(path, &nprint/*in,out*/); path->cdata.command = H5T_CONV_FREE; if ((path->func)(FAIL, FAIL, &(path->cdata), - 0, 0, NULL, NULL,H5P_DEFAULT)<0) { + 0, 0, 0, NULL, NULL,H5P_DEFAULT)<0) { #ifdef H5T_DEBUG if (H5DEBUG(T)) { fprintf (H5DEBUG(T), "H5T: conversion function " @@ -3905,17 +3905,25 @@ H5Tvlen_create(hid_t base_id) H5TRACE1("i","i",base_id); /* Check args */ - if (H5I_DATATYPE!=H5I_get_type(base_id) || NULL==(base=H5I_object(base_id))) { - HRETURN_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not an valid base datatype"); + if (H5I_DATATYPE!=H5I_get_type(base_id) || + NULL==(base=H5I_object(base_id))) { + HRETURN_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, + "not an valid base datatype"); } /* Build new type */ if (NULL==(dt = H5FL_ALLOC(H5T_t,1))) { - HRETURN_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed"); + HRETURN_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, + "memory allocation failed"); } H5F_addr_undef (&(dt->ent.header)); dt->type = H5T_VLEN; - dt->force_conv = TRUE; /* Force conversions (i.e. memory to memory conversions should duplicate data, not point to the same VL sequences */ + + /* + * Force conversions (i.e. memory to memory conversions should duplicate + * data, not point to the same VL sequences) + */ + dt->force_conv = TRUE; dt->parent = H5T_copy(base, H5T_COPY_ALL); /* Set up VL information */ @@ -3925,7 +3933,8 @@ H5Tvlen_create(hid_t base_id) /* Atomize the type */ if ((ret_value=H5I_register(H5I_DATATYPE, dt))<0) { - HRETURN_ERROR(H5E_DATATYPE, H5E_CANTREGISTER, FAIL, "unable to register datatype"); + HRETURN_ERROR(H5E_DATATYPE, H5E_CANTREGISTER, FAIL, + "unable to register datatype"); } FUNC_LEAVE(ret_value); @@ -4143,7 +4152,8 @@ H5Tregister(H5T_pers_t pers, const char *name, hid_t src_id, hid_t dst_id, } HDmemset(&cdata, 0, sizeof cdata); cdata.command = H5T_CONV_INIT; - if ((func)(tmp_sid, tmp_did, &cdata, 0, 0, NULL, NULL, H5P_DEFAULT)<0) { + if ((func)(tmp_sid, tmp_did, &cdata, 0, 0, 0, NULL, NULL, + H5P_DEFAULT)<0) { H5I_dec_ref(tmp_sid); H5I_dec_ref(tmp_did); tmp_sid = tmp_did = -1; @@ -4175,7 +4185,7 @@ H5Tregister(H5T_pers_t pers, const char *name, hid_t src_id, hid_t dst_id, H5T_print_stats(old_path, &nprint); old_path->cdata.command = H5T_CONV_FREE; if ((old_path->func)(tmp_sid, tmp_did, &(old_path->cdata), - 0, 0, NULL, NULL, H5P_DEFAULT)<0) { + 0, 0, 0, NULL, NULL, H5P_DEFAULT)<0) { #ifdef H5T_DEBUG if (H5DEBUG(T)) { fprintf (H5DEBUG(T), "H5T: conversion function 0x%08lx " @@ -4274,24 +4284,25 @@ H5Tunregister(H5T_pers_t pers, const char *name, hid_t src_id, hid_t dst_id, /* Remove matching conversion paths, except no-op path */ for (i=H5T_g.npaths-1; i>0; --i) { - path = H5T_g.path[i]; - assert(path); - if ((H5T_PERS_SOFT==pers && path->is_hard) || - (H5T_PERS_HARD==pers && !path->is_hard)) continue; - if (name && *name && HDstrcmp(name, path->name)) continue; - if (src && H5T_cmp(src, path->src)) continue; - if (dst && H5T_cmp(dst, path->dst)) continue; - if (func && func!=path->func) continue; - - /* Remove from table */ - HDmemmove(H5T_g.path+i, H5T_g.path+i+1, - (H5T_g.npaths-(i+1))*sizeof(H5T_path_t*)); - --H5T_g.npaths; - - /* Shut down path */ - H5T_print_stats(path, &nprint); - path->cdata.command = H5T_CONV_FREE; - if ((path->func)(FAIL, FAIL, &(path->cdata), 0, 0, NULL, NULL, H5P_DEFAULT)<0) { + path = H5T_g.path[i]; + assert(path); + if ((H5T_PERS_SOFT==pers && path->is_hard) || + (H5T_PERS_HARD==pers && !path->is_hard)) continue; + if (name && *name && HDstrcmp(name, path->name)) continue; + if (src && H5T_cmp(src, path->src)) continue; + if (dst && H5T_cmp(dst, path->dst)) continue; + if (func && func!=path->func) continue; + + /* Remove from table */ + HDmemmove(H5T_g.path+i, H5T_g.path+i+1, + (H5T_g.npaths-(i+1))*sizeof(H5T_path_t*)); + --H5T_g.npaths; + + /* Shut down path */ + H5T_print_stats(path, &nprint); + path->cdata.command = H5T_CONV_FREE; + if ((path->func)(FAIL, FAIL, &(path->cdata), 0, 0, 0, NULL, NULL, + H5P_DEFAULT)<0) { #ifdef H5T_DEBUG if (H5DEBUG(T)) { fprintf(H5DEBUG(T), "H5T: conversion function 0x%08lx failed " @@ -4413,8 +4424,9 @@ H5Tconvert(hid_t src_id, hid_t dst_id, size_t nelmts, void *buf, "unable to convert between src and dst data types"); } - if (H5T_convert(tpath, src_id, dst_id, nelmts, 0, buf, background, plist_id)<0) { - HRETURN_ERROR (H5E_DATATYPE, H5E_CANTINIT, FAIL, + if (H5T_convert(tpath, src_id, dst_id, nelmts, 0, 0, buf, background, + plist_id)<0) { + HRETURN_ERROR (H5E_DATATYPE, H5E_CANTINIT, FAIL, "data type conversion failed"); } @@ -6438,7 +6450,7 @@ H5T_path_find(const H5T_t *src, const H5T_t *dst, const char *name, HDstrcpy(H5T_g.path[0]->name, "no-op"); H5T_g.path[0]->func = H5T_conv_noop; H5T_g.path[0]->cdata.command = H5T_CONV_INIT; - if (H5T_conv_noop(FAIL, FAIL, &(H5T_g.path[0]->cdata), 0, 0, + if (H5T_conv_noop(FAIL, FAIL, &(H5T_g.path[0]->cdata), 0, 0, 0, NULL, NULL, H5P_DEFAULT)<0) { #ifdef H5T_DEBUG if (H5DEBUG(T)) { @@ -6530,7 +6542,8 @@ H5T_path_find(const H5T_t *src, const H5T_t *dst, const char *name, "query"); } path->cdata.command = H5T_CONV_INIT; - if ((func)(src_id, dst_id, &(path->cdata), 0, 0, NULL, NULL, H5P_DEFAULT)<0) { + if ((func)(src_id, dst_id, &(path->cdata), 0, 0, 0, NULL, NULL, + H5P_DEFAULT)<0) { HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, NULL, "unable to initialize conversion function"); } @@ -6562,7 +6575,7 @@ H5T_path_find(const H5T_t *src, const H5T_t *dst, const char *name, } path->cdata.command = H5T_CONV_INIT; if ((H5T_g.soft[i].func) (src_id, dst_id, &(path->cdata), - 0, 0, NULL, NULL, H5P_DEFAULT)<0) { + 0, 0, 0, NULL, NULL, H5P_DEFAULT)<0) { HDmemset (&(path->cdata), 0, sizeof(H5T_cdata_t)); H5E_clear(); /*ignore the error*/ } else { @@ -6584,7 +6597,8 @@ H5T_path_find(const H5T_t *src, const H5T_t *dst, const char *name, assert(table==H5T_g.path[md]); H5T_print_stats(table, &nprint/*in,out*/); table->cdata.command = H5T_CONV_FREE; - if ((table->func)(FAIL, FAIL, &(table->cdata), 0, 0, NULL, NULL, H5P_DEFAULT)<0) { + if ((table->func)(FAIL, FAIL, &(table->cdata), 0, 0, 0, NULL, NULL, + H5P_DEFAULT)<0) { #ifdef H5T_DEBUG if (H5DEBUG(T)) { fprintf(H5DEBUG(T), "H5T: conversion function 0x%08lx free " @@ -6653,19 +6667,32 @@ H5T_path_find(const H5T_t *src, const H5T_t *dst, const char *name, * runtime in addition to compile time. * * Robb Matzke, 1999-06-16 - * Added support for non-zero strides. If STRIDE is non-zero + * Added support for non-zero strides. If BUF_STRIDE is non-zero * then convert one value at each memory location advancing - * STRIDE bytes each time; otherwise assume both source and + * BUF_STRIDE bytes each time; otherwise assume both source and * destination values are packed. * - * Quincey Koziol, 1999-07-01 - * Added dataset transfer properties, to allow custom VL datatype - * allocation function to be passed down to VL conversion routine. + * Quincey Koziol, 1999-07-01 + * Added dataset transfer properties, to allow custom VL + * datatype allocation function to be passed down to VL + * conversion routine. + * + * Robb Matzke, 2000-05-17 + * Added the BKG_STRIDE argument which gets passed to all the + * conversion functions. If BUF_STRIDE is non-zero then each + * data element is at a multiple of BUF_STRIDE bytes in BUF + * (on both input and output). If BKG_STRIDE is also set then + * the BKG buffer is used in such a way that temporary space + * for each element is aligned on a BKG_STRIDE byte boundary. + * If either BUF_STRIDE or BKG_STRIDE are zero then the BKG + * buffer will be accessed as though it were a packed array + * of destination datatype. *------------------------------------------------------------------------- */ herr_t H5T_convert(H5T_path_t *tpath, hid_t src_id, hid_t dst_id, size_t nelmts, - size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist) + size_t buf_stride, size_t bkg_stride, void *buf, void *bkg, + hid_t dset_xfer_plist) { #ifdef H5T_DEBUG H5_timer_t timer; @@ -6677,8 +6704,8 @@ H5T_convert(H5T_path_t *tpath, hid_t src_id, hid_t dst_id, size_t nelmts, if (H5DEBUG(T)) H5_timer_begin(&timer); #endif tpath->cdata.command = H5T_CONV_CONV; - if ((tpath->func)(src_id, dst_id, &(tpath->cdata), nelmts, stride, buf, - bkg, dset_xfer_plist)<0) { + if ((tpath->func)(src_id, dst_id, &(tpath->cdata), nelmts, buf_stride, + bkg_stride, buf, bkg, dset_xfer_plist)<0) { HRETURN_ERROR(H5E_ATTR, H5E_CANTENCODE, FAIL, "data type conversion failed"); } diff --git a/src/H5Tconv.c b/src/H5Tconv.c index dcc8a65..4780ca5 100644 --- a/src/H5Tconv.c +++ b/src/H5Tconv.c @@ -305,8 +305,8 @@ H5FL_BLK_DEFINE_STATIC(vlen_seq); \ case H5T_CONV_CONV: \ /* Initialize pointers */ \ - if (stride) { \ - s_stride = d_stride = stride; \ + if (buf_stride) { \ + s_stride = d_stride = buf_stride; \ src = dst = buf; \ direction = 1; \ } else if (STRT) { \ @@ -351,8 +351,8 @@ H5FL_BLK_DEFINE_STATIC(vlen_seq); if (d_mv) HDmemcpy(dst, &aligned, dt_size); \ \ /* Advance pointers */ \ - src = (char *)src + direction * s_stride; \ - dst = (char *)dst + direction * d_stride; \ + src = (char *)src + direction * s_stride; \ + dst = (char *)dst + direction * d_stride; \ } \ break; \ \ @@ -399,7 +399,8 @@ H5FL_BLK_DEFINE_STATIC(vlen_seq); */ herr_t H5T_conv_noop(hid_t UNUSED src_id, hid_t UNUSED dst_id, H5T_cdata_t *cdata, - size_t UNUSED nelmts, size_t UNUSED stride, void UNUSED *buf, + size_t UNUSED nelmts, size_t UNUSED buf_stride, + size_t UNUSED bkg_stride, void UNUSED *buf, void UNUSED *background, hid_t UNUSED dset_xfer_plist) { FUNC_ENTER(H5T_conv_noop, FAIL); @@ -449,7 +450,8 @@ H5T_conv_noop(hid_t UNUSED src_id, hid_t UNUSED dst_id, H5T_cdata_t *cdata, */ herr_t H5T_conv_order(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, - size_t stride, void *_buf, void UNUSED *background, hid_t UNUSED dset_xfer_plist) + size_t buf_stride, size_t UNUSED bkg_stride, void *_buf, + void UNUSED *background, hid_t UNUSED dset_xfer_plist) { uint8_t *buf = (uint8_t*)_buf; uint8_t tmp; @@ -514,7 +516,7 @@ H5T_conv_order(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, HRETURN_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data type"); } md = src->size / 2; - for (i=0; i<nelmts; i++, buf+=stride?stride:src->size) { + for (i=0; i<nelmts; i++, buf+=buf_stride?buf_stride:src->size) { for (j=0; j<md; j++) { tmp = buf[j]; buf[j] = buf[src->size-(j+1)]; @@ -547,15 +549,16 @@ H5T_conv_order(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, * * Modifications: * Robb Matzke, 1999-06-16 - * Added support for non-zero strides. If STRIDE is non-zero + * Added support for non-zero strides. If BUF_STRIDE is non-zero * then convert one value at each memory location advancing - * STRIDE bytes each time; otherwise assume both source and + * BUF_STRIDE bytes each time; otherwise assume both source and * destination values are packed. *------------------------------------------------------------------------- */ herr_t H5T_conv_b_b(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, - size_t stride, void *_buf, void UNUSED *background, hid_t UNUSED dset_xfer_plist) + size_t buf_stride, size_t UNUSED bkg_stride, void *_buf, + void UNUSED *background, hid_t UNUSED dset_xfer_plist) { uint8_t *buf = (uint8_t*)_buf; H5T_t *src=NULL, *dst=NULL; /*source and dest data types */ @@ -609,7 +612,7 @@ H5T_conv_b_b(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, * how many of the elements have the source and destination areas * overlapping? */ - if (src->size==dst->size || stride) { + if (src->size==dst->size || buf_stride) { sp = dp = (uint8_t*)buf; direction = 1; olap = nelmts; @@ -669,10 +672,10 @@ H5T_conv_b_b(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, } /* - * Copy the significant part of the value. If the source is larger - * than the destination then invoke the overflow function or copy - * as many bits as possible. Zero extra bits in the destination. - */ + * Copy the significant part of the value. If the source is larger + * than the destination then invoke the overflow function or copy + * as many bits as possible. Zero extra bits in the destination. + */ if (src->u.atomic.prec>dst->u.atomic.prec) { if (!H5T_overflow_g || (H5T_overflow_g)(src_id, dst_id, s, d)<0) { @@ -688,8 +691,8 @@ H5T_conv_b_b(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, } /* - * Fill the destination padding areas. - */ + * Fill the destination padding areas. + */ switch (dst->u.atomic.lsb_pad) { case H5T_PAD_ZERO: H5T_bit_set(d, 0, dst->u.atomic.offset, FALSE); @@ -734,9 +737,9 @@ H5T_conv_b_b(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, * should copy the value to the true destination buffer. */ if (d==dbuf) HDmemcpy (dp, d, dst->size); - if (stride) { - sp += direction * stride; - dp += direction * stride; + if (buf_stride) { + sp += direction * buf_stride; + dp += direction * buf_stride; } else { sp += direction * src->size; dp += direction * dst->size; @@ -791,96 +794,96 @@ H5T_conv_struct_init (H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata) FUNC_ENTER (H5T_conv_struct_init, FAIL); if (!priv) { - /* - * Allocate private data structure and arrays. - */ - if (NULL==(priv=cdata->priv=H5MM_calloc(sizeof(H5T_conv_struct_t))) || - NULL==(priv->src2dst=H5MM_malloc(src->u.compnd.nmembs * - sizeof(intn))) || - NULL==(priv->src_memb_id=H5MM_malloc(src->u.compnd.nmembs * - sizeof(hid_t))) || - NULL==(priv->dst_memb_id=H5MM_malloc(dst->u.compnd.nmembs * - sizeof(hid_t))) || - NULL==(priv->memb_nelmts=H5MM_malloc(src->u.compnd.nmembs * - sizeof(size_t)))) { - HRETURN_ERROR (H5E_RESOURCE, H5E_NOSPACE, FAIL, - "memory allocation failed"); - } - src2dst = priv->src2dst; - - /* - * Insure that members are sorted. - */ - H5T_sort_value(src, NULL); - H5T_sort_value(dst, NULL); - - /* - * Build a mapping from source member number to destination member - * number. If some source member is not a destination member then that - * mapping element will be negative. Also create atoms for each - * source and destination member data type so we can look up the - * member data type conversion functions later. - */ - for (i=0; i<src->u.compnd.nmembs; i++) { - src2dst[i] = -1; - for (j=0; j<dst->u.compnd.nmembs; j++) { - if (!HDstrcmp (src->u.compnd.memb[i].name, - dst->u.compnd.memb[j].name)) { - src2dst[i] = j; - break; - } - } - if (src2dst[i]>=0) { - type = H5T_copy (src->u.compnd.memb[i].type, H5T_COPY_ALL); - tid = H5I_register (H5I_DATATYPE, type); - assert (tid>=0); - priv->src_memb_id[i] = tid; - - type = H5T_copy (dst->u.compnd.memb[src2dst[i]].type, - H5T_COPY_ALL); - tid = H5I_register (H5I_DATATYPE, type); - assert (tid>=0); - priv->dst_memb_id[src2dst[i]] = tid; - } - } - - /* - * Those members which are in both the source and destination must be - * the same size and shape arrays. - */ - for (i=0; i<src->u.compnd.nmembs; i++) { - if (src2dst[i]>=0) { - H5T_cmemb_t *src_memb = src->u.compnd.memb + i; - H5T_cmemb_t *dst_memb = dst->u.compnd.memb + src2dst[i]; - if (src_memb->ndims != dst_memb->ndims) { - HRETURN_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, - "source and dest members have incompatible " - "size or shape"); - } - for (j=0; j<src_memb->ndims; j++) { - if (src_memb->dim[j] != dst_memb->dim[j]) { - HRETURN_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, - "source and dest members have " - "incompatible size or shape"); - } + /* + * Allocate private data structure and arrays. + */ + if (NULL==(priv=cdata->priv=H5MM_calloc(sizeof(H5T_conv_struct_t))) || + NULL==(priv->src2dst=H5MM_malloc(src->u.compnd.nmembs * + sizeof(intn))) || + NULL==(priv->src_memb_id=H5MM_malloc(src->u.compnd.nmembs * + sizeof(hid_t))) || + NULL==(priv->dst_memb_id=H5MM_malloc(dst->u.compnd.nmembs * + sizeof(hid_t))) || + NULL==(priv->memb_nelmts=H5MM_malloc(src->u.compnd.nmembs * + sizeof(size_t)))) { + HRETURN_ERROR (H5E_RESOURCE, H5E_NOSPACE, FAIL, + "memory allocation failed"); + } + src2dst = priv->src2dst; + + /* + * Insure that members are sorted. + */ + H5T_sort_value(src, NULL); + H5T_sort_value(dst, NULL); + + /* + * Build a mapping from source member number to destination member + * number. If some source member is not a destination member then that + * mapping element will be negative. Also create atoms for each + * source and destination member data type so we can look up the + * member data type conversion functions later. + */ + for (i=0; i<src->u.compnd.nmembs; i++) { + src2dst[i] = -1; + for (j=0; j<dst->u.compnd.nmembs; j++) { + if (!HDstrcmp (src->u.compnd.memb[i].name, + dst->u.compnd.memb[j].name)) { + src2dst[i] = j; + break; + } + } + if (src2dst[i]>=0) { + type = H5T_copy (src->u.compnd.memb[i].type, H5T_COPY_ALL); + tid = H5I_register (H5I_DATATYPE, type); + assert (tid>=0); + priv->src_memb_id[i] = tid; + + type = H5T_copy (dst->u.compnd.memb[src2dst[i]].type, + H5T_COPY_ALL); + tid = H5I_register (H5I_DATATYPE, type); + assert (tid>=0); + priv->dst_memb_id[src2dst[i]] = tid; + } + } + + /* + * Those members which are in both the source and destination must be + * the same size and shape arrays. + */ + for (i=0; i<src->u.compnd.nmembs; i++) { + if (src2dst[i]>=0) { + H5T_cmemb_t *src_memb = src->u.compnd.memb + i; + H5T_cmemb_t *dst_memb = dst->u.compnd.memb + src2dst[i]; + if (src_memb->ndims != dst_memb->ndims) { + HRETURN_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, + "source and dest members have incompatible " + "size or shape"); + } + for (j=0; j<src_memb->ndims; j++) { + if (src_memb->dim[j] != dst_memb->dim[j]) { + HRETURN_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, + "source and dest members have " + "incompatible size or shape"); + } #ifndef LATER - /* Their permutation vectors must be equal */ - if (src_memb->perm[j]!=dst_memb->perm[j]) { - HRETURN_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, - "member permutations must be equal"); - } + /* Their permutation vectors must be equal */ + if (src_memb->perm[j]!=dst_memb->perm[j]) { + HRETURN_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, + "member permutations must be equal"); + } #endif - } - } - } + } + } + } - /* Calculate number of elements of each member */ - for (i=0; i<src->u.compnd.nmembs; i++) { - priv->memb_nelmts[i] = 1; - for (j=0; j<src->u.compnd.memb[i].ndims; j++) { - priv->memb_nelmts[i] *= src->u.compnd.memb[i].dim[j]; - } - } + /* Calculate number of elements of each member */ + for (i=0; i<src->u.compnd.nmembs; i++) { + priv->memb_nelmts[i] = 1; + for (j=0; j<src->u.compnd.memb[i].ndims; j++) { + priv->memb_nelmts[i] *= src->u.compnd.memb[i].dim[j]; + } + } } /* @@ -891,7 +894,7 @@ H5T_conv_struct_init (H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata) H5MM_xfree(priv->memb_path); if (NULL==(priv->memb_path=H5MM_malloc(src->u.compnd.nmembs * sizeof(H5T_path_t*)))) { - HRETURN_ERROR (H5E_RESOURCE, H5E_NOSPACE, FAIL, + HRETURN_ERROR (H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed"); } @@ -945,18 +948,28 @@ H5T_conv_struct_init (H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata) * * Modifications: * Robb Matzke, 1999-06-16 - * Added support for non-zero strides. If STRIDE is non-zero - * then convert one value at each memory location advancing - * STRIDE bytes each time; otherwise assume both source and - * destination values are packed. + * Added support for non-zero strides. If BUF_STRIDE is + * non-zero then convert one value at each memory location + * advancing BUF_STRIDE bytes each time; otherwise assume + * both source and destination values are packed. + * + * Robb Matzke, 2000-05-17 + * Added the BKG_STRIDE argument to fix a design bug. If + * BUF_STRIDE and BKG_STRIDE are both non-zero then each + * data element converted will be placed temporarily at a + * multiple of BKG_STRIDE in the BKG buffer; otherwise the + * BKG buffer is assumed to be a packed array of destination + * datatype. *------------------------------------------------------------------------- */ herr_t H5T_conv_struct(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, - size_t stride, void *_buf, void *_bkg, hid_t dset_xfer_plist) + size_t buf_stride, size_t bkg_stride, void *_buf, void *_bkg, + hid_t dset_xfer_plist) { uint8_t *buf = (uint8_t *)_buf; /*cast for pointer arithmetic */ uint8_t *bkg = (uint8_t *)_bkg; /*background pointer arithmetic */ + uint8_t *xbuf=buf, *xbkg=bkg; /*temp pointers into buf and bkg*/ H5T_t *src = NULL; /*source data type */ H5T_t *dst = NULL; /*destination data type */ intn *src2dst = NULL; /*maps src member to dst member */ @@ -1018,8 +1031,7 @@ H5T_conv_struct(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, assert (priv); assert (bkg && cdata->need_bkg>=H5T_BKG_TEMP); - if (cdata->recalc && - H5T_conv_struct_init (src, dst, cdata)<0) { + if (cdata->recalc && H5T_conv_struct_init (src, dst, cdata)<0) { HRETURN_ERROR (H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to initialize conversion data"); } @@ -1032,20 +1044,25 @@ H5T_conv_struct(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, src2dst = priv->src2dst; /* - * Direction of conversion. + * Direction of conversion and striding through background. */ - if (stride) { - src_delta = dst_delta = stride; + if (buf_stride) { + src_delta = buf_stride; + dst_delta = buf_stride; + if (!bkg_stride) bkg_stride = dst->size; } else if (dst->size <= src->size) { src_delta = src->size; dst_delta = dst->size; + bkg_stride = dst->size; } else { src_delta = -(src->size); dst_delta = -(dst->size); - buf += (nelmts-1) * src->size; - bkg += (nelmts-1) * dst->size; + bkg_stride = -(dst->size); + xbuf += (nelmts-1) * src->size; + xbkg += (nelmts-1) * dst->size; } + /* Conversion loop... */ for (elmtno=0; elmtno<nelmts; elmtno++) { /* * For each source member which will be present in the @@ -1056,7 +1073,7 @@ H5T_conv_struct(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, * right side. */ for (i=0, offset=0; i<src->u.compnd.nmembs; i++) { - if (src2dst[i]<0) continue; + if (src2dst[i]<0) continue; /*subsetting*/ src_memb = src->u.compnd.memb + i; dst_memb = dst->u.compnd.memb + src2dst[i]; @@ -1065,19 +1082,20 @@ H5T_conv_struct(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, priv->src_memb_id[i], priv->dst_memb_id[src2dst[i]], priv->memb_nelmts[i], - 0, /*no striding*/ - buf + src_memb->offset, - bkg + dst_memb->offset,dset_xfer_plist)<0) { + 0, 0, /*no striding (packed array)*/ + xbuf+src_memb->offset, + xbkg+dst_memb->offset, + dset_xfer_plist)<0) { HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to convert compound data type " "member"); } - HDmemmove (buf+offset, buf+src_memb->offset, - dst_memb->size); + HDmemmove (xbuf+offset, xbuf+src_memb->offset, + dst_memb->size); offset += dst_memb->size; } else { - HDmemmove (buf+offset, buf+src_memb->offset, - src_memb->size); + HDmemmove (xbuf+offset, xbuf+src_memb->offset, + src_memb->size); offset += src_memb->size; } } @@ -1090,7 +1108,7 @@ H5T_conv_struct(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, * background buffer. */ for (i=src->u.compnd.nmembs-1; i>=0; --i) { - if (src2dst[i]<0) continue; + if (src2dst[i]<0) continue; /*subsetting*/ src_memb = src->u.compnd.memb + i; dst_memb = dst->u.compnd.memb + src2dst[i]; @@ -1100,8 +1118,9 @@ H5T_conv_struct(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, priv->src_memb_id[i], priv->dst_memb_id[src2dst[i]], priv->memb_nelmts[i], - 0, /*no striding*/ - buf+offset, bkg+dst_memb->offset,dset_xfer_plist)<0) { + 0, 0, /*no striding (packed array)*/ + xbuf+offset, xbkg+dst_memb->offset, + dset_xfer_plist)<0) { HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to convert compound data type " "member"); @@ -1109,22 +1128,26 @@ H5T_conv_struct(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, } else { offset -= dst_memb->size; } - HDmemmove (bkg+dst_memb->offset, buf+offset, dst_memb->size); + HDmemmove (xbkg+dst_memb->offset, xbuf+offset, dst_memb->size); } assert (0==offset); /* - * Update buf and background. + * Update pointers */ - buf += src_delta; - bkg += dst_delta; + xbuf += src_delta; + xbkg += bkg_stride; } /* * Copy the background buffer back into the in-place conversion * buffer. */ - HDmemcpy (_buf, _bkg, nelmts*dst->size); + for (xbuf=buf, xbkg=bkg, elmtno=0; elmtno<nelmts; elmtno++) { + HDmemmove(xbuf, xbkg, dst->size); + xbuf += buf_stride ? buf_stride : dst->size; + xbkg += bkg_stride; + } break; default: @@ -1167,10 +1190,10 @@ H5T_conv_struct(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, * * Modifications: * Robb Matzke, 1999-06-16 - * Added support for non-zero strides. If STRIDE is non-zero - * then convert one value at each memory location advancing - * STRIDE bytes each time; otherwise assume both source and - * destination values are packed. + * Added support for non-zero strides. If BUF_STRIDE is + * non-zero then convert one value at each memory location + * advancing BUF_STRIDE bytes each time; otherwise assume both + * source and destination values are packed. * * Robb Matzke, 1999-06-16 * If the source and destination data structs are the same size @@ -1180,11 +1203,20 @@ H5T_conv_struct(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, * all of the field1's, then all field2's, etc. This can * drastically reduce the number of calls to H5T_convert() and * thereby eliminate most of the conversion constant overhead. + * + * Robb Matzke, 2000-05-17 + * Added the BKG_STRIDE argument to fix a design bug. If + * BUF_STRIDE and BKG_STRIDE are both non-zero then each + * data element converted will be placed temporarily at a + * multiple of BKG_STRIDE in the BKG buffer; otherwise the + * BKG buffer is assumed to be a packed array of destination + * datatype. *------------------------------------------------------------------------- */ herr_t H5T_conv_struct_opt(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - size_t nelmts, size_t stride, void *_buf, void *_bkg, hid_t dset_xfer_plist) + size_t nelmts, size_t buf_stride, size_t bkg_stride, + void *_buf, void *_bkg, hid_t dset_xfer_plist) { uint8_t *buf = (uint8_t *)_buf; /*cast for pointer arithmetic */ uint8_t *bkg = (uint8_t *)_bkg; /*background pointer arithmetic */ @@ -1259,10 +1291,16 @@ H5T_conv_struct_opt(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, src_memb_size = src_memb->size / priv->memb_nelmts[i]; dst_memb_size = dst_memb->size / priv->memb_nelmts[i]; - for (j=priv->memb_nelmts[i]-1; j>=0; --j) { + for (j=(intn)(priv->memb_nelmts[i]-1); j>=0; --j) { if (dst_memb_size > src_memb_size) { offset -= src_memb_size; if (dst_memb_size > src->size-offset) { + H5MM_xfree(priv->src2dst); + H5MM_xfree(priv->src_memb_id); + H5MM_xfree(priv->dst_memb_id); + H5MM_xfree(priv->memb_path); + H5MM_xfree(priv->memb_nelmts); + cdata->priv = priv = H5MM_xfree (priv); HRETURN_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "convertion is unsupported by this " "function"); @@ -1298,8 +1336,7 @@ H5T_conv_struct_opt(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, } /* Update cached data if necessary */ - if (cdata->recalc && - H5T_conv_struct_init (src, dst, cdata)<0) { + if (cdata->recalc && H5T_conv_struct_init (src, dst, cdata)<0) { HRETURN_ERROR (H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to initialize conversion data"); } @@ -1314,6 +1351,18 @@ H5T_conv_struct_opt(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, H5T_sort_value(src, NULL); H5T_sort_value(dst, NULL); + /* + * Calculate strides. If BUF_STRIDE is non-zero then convert one + * data element at every BUF_STRIDE bytes through the main buffer + * (BUF), leaving the result of each conversion at the same + * location; otherwise assume the source and destination data are + * packed tightly based on src->size and dst->size. Also, if + * BUF_STRIDE and BKG_STRIDE are both non-zero then place + * background data into the BKG buffer at multiples of BKG_STRIDE; + * otherwise assume BKG buffer is the packed destination datatype. + */ + if (!buf_stride || !bkg_stride) bkg_stride = dst->size; + /* * For each member where the destination is not larger than the * source, stride through all the elements converting only that member @@ -1322,7 +1371,7 @@ H5T_conv_struct_opt(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, * left as possible in the buffer. */ for (i=0, offset=0; i<src->u.compnd.nmembs; i++) { - if (src2dst[i]<0) continue; + if (src2dst[i]<0) continue; /*subsetting*/ src_memb = src->u.compnd.memb + i; dst_memb = dst->u.compnd.memb + src2dst[i]; src_memb_size = src_memb->size / priv->memb_nelmts[i]; @@ -1334,25 +1383,25 @@ H5T_conv_struct_opt(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, xbkg = bkg + dst_memb->offset + j*dst_memb_size; if (H5T_convert(priv->memb_path[i], priv->src_memb_id[i], - priv->dst_memb_id[src2dst[i]], - nelmts, - stride?stride:src->size, - xbuf, xbkg,dset_xfer_plist)<0) { + priv->dst_memb_id[src2dst[i]], nelmts, + buf_stride?buf_stride:src->size, + bkg_stride, xbuf, xbkg, + dset_xfer_plist)<0) { HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to convert compound data " "type member"); } for (elmtno=0; elmtno<nelmts; elmtno++) { HDmemmove(xbkg, xbuf, dst_memb_size); - xbuf += stride ? stride : src->size; - xbkg += stride ? stride : dst->size; + xbuf += buf_stride ? buf_stride : src->size; + xbkg += bkg_stride; } } else { for (xbuf=buf, elmtno=0; elmtno<nelmts; elmtno++) { HDmemmove(xbuf+offset, xbuf+src_memb->offset+j*src_memb_size, - src_memb_size); - xbuf += stride ? stride : src->size; + src_memb_size); + xbuf += buf_stride ? buf_stride : src->size; } offset += src_memb_size; } @@ -1372,34 +1421,35 @@ H5T_conv_struct_opt(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, src_memb_size = src_memb->size / priv->memb_nelmts[i]; dst_memb_size = dst_memb->size / priv->memb_nelmts[i]; - for (j=priv->memb_nelmts[i]-1; j>=0; --j) { + for (j=(intn)(priv->memb_nelmts[i]-1); j>=0; --j) { if (dst_memb_size > src_memb_size) { offset -= src_memb_size; xbuf = buf + offset; xbkg = bkg + dst_memb->offset + j*dst_memb_size; if (H5T_convert(priv->memb_path[i], priv->src_memb_id[i], - priv->dst_memb_id[src2dst[i]], - nelmts, stride?stride:src->size, - xbuf, xbkg, dset_xfer_plist)<0) { + priv->dst_memb_id[src2dst[i]], nelmts, + buf_stride?buf_stride:src->size, + bkg_stride, xbuf, xbkg, + dset_xfer_plist)<0) { HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, - "unable to convert compound data " - "type member"); + "unable to convert compound data type " + "member"); } for (elmtno=0; elmtno<nelmts; elmtno++) { HDmemmove(xbkg, xbuf, dst_memb_size); - xbuf += stride ? stride : src->size; - xbkg += stride ? stride : dst->size; + xbuf += buf_stride ? buf_stride : src->size; + xbkg += bkg_stride; } } } } - /* Move background into buffer */ + /* Move background buffer into result buffer */ for (xbuf=buf, xbkg=bkg, elmtno=0; elmtno<nelmts; elmtno++) { HDmemmove(xbuf, xbkg, dst->size); - xbuf += stride ? stride : dst->size; - xbkg += stride ? stride : dst->size; + xbuf += buf_stride ? buf_stride : dst->size; + xbkg += bkg_stride; } break; @@ -1571,15 +1621,16 @@ H5T_conv_enum_init(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata) * * Modifications: * Robb Matzke, 1999-06-16 - * Added support for non-zero strides. If STRIDE is non-zero + * Added support for non-zero strides. If BUF_STRIDE is non-zero * then convert one value at each memory location advancing - * STRIDE bytes each time; otherwise assume both source and + * BUF_STRIDE bytes each time; otherwise assume both source and * destination values are packed. *------------------------------------------------------------------------- */ herr_t H5T_conv_enum(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, - size_t stride, void *_buf, void UNUSED *bkg, hid_t UNUSED dset_xfer_plist) + size_t buf_stride, size_t UNUSED bkg_stride, void *_buf, + void UNUSED *bkg, hid_t UNUSED dset_xfer_plist) { uint8_t *buf = (uint8_t*)_buf; /*cast for pointer arithmetic */ H5T_t *src=NULL, *dst=NULL; /*src and dst data types */ @@ -1650,8 +1701,8 @@ H5T_conv_enum(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, /* * Direction of conversion. */ - if (stride) { - src_delta = dst_delta = stride; + if (buf_stride) { + src_delta = dst_delta = (intn)buf_stride; s = d = buf; } else if (dst->size <= src->size) { src_delta = (int)src->size; /*overflow shouldn't be possible*/ @@ -1749,16 +1800,17 @@ H5T_conv_enum(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, * Modifications: * * Quincey Koziol, 2 July, 1999 - * Enabled support for non-zero strides. If STRIDE is non-zero + * Enabled support for non-zero strides. If BUF_STRIDE is non-zero * then convert one value at each memory location advancing - * STRIDE bytes each time; otherwise assume both source and + * BUF_STRIDE bytes each time; otherwise assume both source and * destination values are packed. * *------------------------------------------------------------------------- */ herr_t H5T_conv_vlen(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, - size_t stride, void *_buf, void UNUSED *_bkg, hid_t dset_xfer_plist) + size_t buf_stride, size_t UNUSED bkg_stride, void *_buf, + void UNUSED *_bkg, hid_t dset_xfer_plist) { const H5F_xfer_t *xfer_parms = NULL; H5T_path_t *tpath; /* Type conversion path */ @@ -1769,10 +1821,10 @@ H5T_conv_vlen(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, uint8_t *s, *sp, *d, *dp; /*source and dest traversal ptrs */ uint8_t **dptr; /*pointer to correct destination pointer*/ size_t src_delta, dst_delta; /*source & destination stride */ - hsize_t seq_len; /*the number of elements in the current sequence*/ + hssize_t seq_len; /*the number of elements in the current sequence*/ size_t src_base_size, dst_base_size;/*source & destination base size*/ size_t src_size, dst_size;/*source & destination total size in bytes*/ - void *conv_buf=NULL; /*temporary conversion buffer */ + void *conv_buf=NULL; /*temporary conversion buffer */ hsize_t conv_buf_size; /*size of conversion buffer in bytes */ uint8_t dbuf[64],*dbuf_ptr=dbuf;/*temp destination buffer */ intn direction; /*direction of traversal */ @@ -1785,18 +1837,21 @@ H5T_conv_vlen(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, /* * First, determine if this conversion function applies to the * conversion path SRC_ID-->DST_ID. If not, return failure; - * otherwise initialize the `priv' field of `cdata' with information - * that remains (almost) constant for this conversion path. + * otherwise initialize the `priv' field of `cdata' with + * information that remains (almost) constant for this + * conversion path. */ - if (H5I_DATATYPE != H5I_get_type(src_id) || NULL == (src = H5I_object(src_id)) || - H5I_DATATYPE != H5I_get_type(dst_id) || NULL == (dst = H5I_object(dst_id))) { - HRETURN_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data type"); + if (H5I_DATATYPE != H5I_get_type(src_id) || + NULL == (src = H5I_object(src_id)) || + H5I_DATATYPE != H5I_get_type(dst_id) || + NULL == (dst = H5I_object(dst_id))) { + HRETURN_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data type"); } assert (H5T_VLEN==src->type); assert (H5T_VLEN==dst->type); #ifdef LATER -/* QAK - Set up conversion function? */ + /* QAK - Set up conversion function? */ if (H5T_conv_vlen_init (src, dst, cdata)<0) { HRETURN_ERROR (H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to initialize conversion data"); @@ -1805,51 +1860,59 @@ H5T_conv_vlen(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, break; case H5T_CONV_FREE: -/* QAK - Nothing to do currently */ + /* QAK - Nothing to do currently */ break; case H5T_CONV_CONV: /* * Conversion. */ - if (H5I_DATATYPE != H5I_get_type(src_id) || NULL == (src = H5I_object(src_id)) || - H5I_DATATYPE != H5I_get_type(dst_id) || NULL == (dst = H5I_object(dst_id))) { - HRETURN_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data type"); + if (H5I_DATATYPE != H5I_get_type(src_id) || + NULL == (src = H5I_object(src_id)) || + H5I_DATATYPE != H5I_get_type(dst_id) || + NULL == (dst = H5I_object(dst_id))) { + HRETURN_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data type"); } /* Get the dataset transfer property list */ if (H5P_DEFAULT == dset_xfer_plist) { xfer_parms = &H5F_xfer_dflt; } else if (H5P_DATASET_XFER != H5P_get_class(dset_xfer_plist) || - NULL == (xfer_parms = H5I_object(dset_xfer_plist))) { + NULL == (xfer_parms = H5I_object(dset_xfer_plist))) { HRETURN_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not xfer parms"); } /* - * Do we process the values from beginning to end or vice versa? Also, - * how many of the elements have the source and destination areas - * overlapping? + * Do we process the values from beginning to end or vice + * versa? Also, how many of the elements have the source and + * destination areas overlapping? */ - if (src->size==dst->size || stride>0) { + if (src->size==dst->size || buf_stride>0) { olap = nelmts; sp = dp = (uint8_t*)_buf; direction = 1; } else if (src->size>=dst->size) { - olap = ((dst->size)/(src->size-dst->size))+1; /* potentially this uses the destination buffer 1 extra time, but its faster that floating-point calcs */ + /* potentially this uses the destination buffer 1 extra + * time, but its faster that floating-point calcs */ + olap = ((dst->size)/(src->size-dst->size))+1; sp = dp = (uint8_t*)_buf; direction = 1; } else { - olap = nelmts-(((src->size)/(dst->size-src->size))+1); /* potentially this uses the destination buffer 1 extra time, but its faster that floating-point calcs */ - sp = (uint8_t*)_buf + (nelmts-1) * (stride ? stride : src->size); - dp = (uint8_t*)_buf + (nelmts-1) * (stride ? stride : dst->size); + /* potentially this uses the destination buffer 1 extra + * time, but its faster that floating-point calcs */ + olap = nelmts-(((src->size)/(dst->size-src->size))+1); + sp = (uint8_t*)_buf + (nelmts-1) * + (buf_stride ? buf_stride : src->size); + dp = (uint8_t*)_buf + (nelmts-1) * + (buf_stride ? buf_stride : dst->size); direction = -1; } /* * Direction & size of buffer traversal. */ - src_delta = direction * (stride ? stride : src->size); - dst_delta = direction * (stride ? stride : dst->size); + src_delta = direction * (buf_stride ? buf_stride : src->size); + dst_delta = direction * (buf_stride ? buf_stride : dst->size); /* * If the source and destination buffers overlap then use a @@ -1873,12 +1936,20 @@ H5T_conv_vlen(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, /* Set up conversion path for base elements */ tpath = H5T_path_find(src->parent, dst->parent, NULL, NULL); - if (NULL==(tpath=H5T_path_find(src->parent, dst->parent, NULL, NULL))) { - HRETURN_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "unable to convert between src and dest data types"); + if (NULL==(tpath=H5T_path_find(src->parent, dst->parent, + NULL, NULL))) { + HRETURN_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, + "unable to convert between src and dest " + "datatypes"); } else if (!H5T_IS_NOOP(tpath)) { - if ((tsrc_id = H5I_register(H5I_DATATYPE, H5T_copy(src->parent, H5T_COPY_ALL)))<0 || - (tdst_id = H5I_register(H5I_DATATYPE, H5T_copy(dst->parent, H5T_COPY_ALL)))<0) { - HRETURN_ERROR(H5E_DATASET, H5E_CANTREGISTER, FAIL, "unable to register types for conversion"); + if ((tsrc_id = H5I_register(H5I_DATATYPE, + H5T_copy(src->parent, + H5T_COPY_ALL)))<0 || + (tdst_id = H5I_register(H5I_DATATYPE, + H5T_copy(dst->parent, + H5T_COPY_ALL)))<0) { + HRETURN_ERROR(H5E_DATASET, H5E_CANTREGISTER, FAIL, + "unable to register types for conversion"); } } @@ -1891,28 +1962,38 @@ H5T_conv_vlen(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, src_size=seq_len*src_base_size; dst_size=seq_len*dst_base_size; - /* Check if conversion buffer is large enough, resize if necessary */ + /* Check if conversion buffer is large enough, resize if + * necessary */ if(conv_buf_size<MAX(src_size,dst_size)) { conv_buf_size=MAX(src_size,dst_size); - if((conv_buf=H5FL_BLK_REALLOC(vlen_seq,conv_buf,conv_buf_size))==NULL) - HRETURN_ERROR (H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for type conversion"); + if((conv_buf=H5FL_BLK_REALLOC(vlen_seq,conv_buf, + conv_buf_size))==NULL) + HRETURN_ERROR (H5E_RESOURCE, H5E_NOSPACE, FAIL, + "memory allocation failed for type " + "conversion"); } /* end if */ /* Read in VL sequence */ if((*(src->u.vlen.read))(src->u.vlen.f,s,conv_buf,src_size)<0) - HRETURN_ERROR(H5E_DATATYPE, H5E_READERROR, FAIL, "can't read VL data"); + HRETURN_ERROR(H5E_DATATYPE, H5E_READERROR, FAIL, + "can't read VL data"); /* Convert VL sequence */ - if (H5T_convert(tpath, tsrc_id, tdst_id, seq_len, 0, conv_buf, NULL, dset_xfer_plist)<0) - HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "datatype conversion failed"); + if (H5T_convert(tpath, tsrc_id, tdst_id, seq_len, 0, 0, + conv_buf, NULL, dset_xfer_plist)<0) + HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, + "datatype conversion failed"); /* Write sequence to destination location */ - if((*(dst->u.vlen.write))(xfer_parms,dst->u.vlen.f,d,conv_buf,seq_len,dst_base_size)<0) - HRETURN_ERROR(H5E_DATATYPE, H5E_WRITEERROR, FAIL, "can't write VL data"); + if((*(dst->u.vlen.write))(xfer_parms,dst->u.vlen.f,d,conv_buf, + seq_len,dst_base_size)<0) + HRETURN_ERROR(H5E_DATATYPE, H5E_WRITEERROR, FAIL, + "can't write VL data"); /* - * If we had used a temporary buffer for the destination then we - * should copy the value to the true destination buffer. + * If we had used a temporary buffer for the destination + * then we should copy the value to the true destination + * buffer. */ if (d==dbuf) HDmemcpy (dp, d, dst->size); sp += src_delta; @@ -1962,15 +2043,16 @@ H5T_conv_vlen(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, * Added overflow handling. * * Robb Matzke, 1999-06-16 - * Added support for non-zero strides. If STRIDE is non-zero + * Added support for non-zero strides. If BUF_STRIDE is non-zero * then convert one value at each memory location advancing - * STRIDE bytes each time; otherwise assume both source and + * BUF_STRIDE bytes each time; otherwise assume both source and * destination values are packed. *------------------------------------------------------------------------- */ herr_t H5T_conv_i_i (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, - size_t stride, void *buf, void UNUSED *bkg, hid_t UNUSED dset_xfer_plist) + size_t buf_stride, size_t UNUSED bkg_stride, void *buf, + void UNUSED *bkg, hid_t UNUSED dset_xfer_plist) { H5T_t *src = NULL; /*source data type */ H5T_t *dst = NULL; /*destination data type */ @@ -2028,7 +2110,7 @@ H5T_conv_i_i (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, * how many of the elements have the source and destination areas * overlapping? */ - if (src->size==dst->size || stride) { + if (src->size==dst->size || buf_stride) { sp = dp = (uint8_t*)buf; direction = 1; olap = nelmts; @@ -2293,9 +2375,9 @@ H5T_conv_i_i (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, * should copy the value to the true destination buffer. */ if (d==dbuf) HDmemcpy (dp, d, dst->size); - if (stride) { - sp += direction * stride; - dp += direction * stride; + if (buf_stride) { + sp += direction * buf_stride; + dp += direction * buf_stride; } else { sp += direction * src->size; dp += direction * dst->size; @@ -2330,15 +2412,16 @@ H5T_conv_i_i (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, * Added overflow handling. * * Robb Matzke, 1999-06-16 - * Added support for non-zero strides. If STRIDE is non-zero + * Added support for non-zero strides. If BUF_STRIDE is non-zero * then convert one value at each memory location advancing - * STRIDE bytes each time; otherwise assume both source and + * BUF_STRIDE bytes each time; otherwise assume both source and * destination values are packed. *------------------------------------------------------------------------- */ herr_t H5T_conv_f_f (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, - size_t stride, void *buf, void UNUSED *bkg, hid_t UNUSED dset_xfer_plist) + size_t buf_stride, size_t UNUSED bkg_stride, void *buf, + void UNUSED *bkg, hid_t UNUSED dset_xfer_plist) { /* Traversal-related variables */ H5T_t *src_p; /*source data type */ @@ -2417,7 +2500,7 @@ H5T_conv_f_f (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, * how many of the elements have the source and destination areas * overlapping? */ - if (src_p->size==dst_p->size || stride) { + if (src_p->size==dst_p->size || buf_stride) { sp = dp = (uint8_t*)buf; direction = 1; olap = nelmts; @@ -2707,9 +2790,9 @@ H5T_conv_f_f (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, */ next: if (d==dbuf) HDmemcpy (dp, d, dst_p->size); - if (stride) { - sp += direction * stride; - dp += direction * stride; + if (buf_stride) { + sp += direction * buf_stride; + dp += direction * buf_stride; } else { sp += direction * src_p->size; dp += direction * dst_p->size; @@ -2739,15 +2822,16 @@ H5T_conv_f_f (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, * * Modifications: * Robb Matzke, 1999-06-16 - * Added support for non-zero strides. If STRIDE is non-zero + * Added support for non-zero strides. If BUF_STRIDE is non-zero * then convert one value at each memory location advancing - * STRIDE bytes each time; otherwise assume both source and + * BUF_STRIDE bytes each time; otherwise assume both source and * destination values are packed. *------------------------------------------------------------------------- */ herr_t H5T_conv_s_s (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, - size_t stride, void *buf, void UNUSED *bkg, hid_t UNUSED dset_xfer_plist) + size_t buf_stride, size_t UNUSED bkg_stride, void *buf, + void UNUSED *bkg, hid_t UNUSED dset_xfer_plist) { H5T_t *src=NULL; /*source data type */ H5T_t *dst=NULL; /*destination data type */ @@ -2805,7 +2889,7 @@ H5T_conv_s_s (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, * how many of the elements have the source and destination areas * overlapping? */ - if (src->size==dst->size || stride) { + if (src->size==dst->size || buf_stride) { /* * When the source and destination are the same size we can do * all the conversions in place. @@ -2850,7 +2934,7 @@ H5T_conv_s_s (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, } #ifndef NDEBUG /* I don't quite trust the overlap calculations yet --rpm */ - if (src->size==dst->size || stride) { + if (src->size==dst->size || buf_stride) { assert(s==d); } else if (d==dbuf) { assert((dp>=sp && dp<sp+src->size) || @@ -2942,9 +3026,9 @@ H5T_conv_s_s (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, * should copy the value to the true destination buffer. */ if (d==dbuf) HDmemcpy(dp, d, dst->size); - if (stride) { - sp += direction * stride; - dp += direction * stride; + if (buf_stride) { + sp += direction * buf_stride; + dp += direction * buf_stride; } else { sp += direction * src->size; dp += direction * dst->size; @@ -2982,7 +3066,9 @@ H5T_conv_s_s (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, */ herr_t H5T_conv_schar_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - size_t nelmts, size_t stride, void *buf, void UNUSED *bkg, hid_t UNUSED dset_xfer_plist) + size_t nelmts, size_t buf_stride, + size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, + hid_t UNUSED dset_xfer_plist) { FUNC_ENTER(H5T_conv_schar_uchar, FAIL); H5T_CONV_su(SCHAR, UCHAR, @@ -3009,7 +3095,9 @@ H5T_conv_schar_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, */ herr_t H5T_conv_uchar_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - size_t nelmts, size_t stride, void *buf, void UNUSED *bkg, hid_t UNUSED dset_xfer_plist) + size_t nelmts, size_t buf_stride, + size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, + hid_t UNUSED dset_xfer_plist) { FUNC_ENTER(H5T_conv_uchar_schar, FAIL); H5T_CONV_us(UCHAR, SCHAR, @@ -3037,7 +3125,9 @@ H5T_conv_uchar_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, */ herr_t H5T_conv_schar_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - size_t nelmts, size_t stride, void *buf, void UNUSED *bkg, hid_t UNUSED dset_xfer_plist) + size_t nelmts, size_t buf_stride, + size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, + hid_t UNUSED dset_xfer_plist) { FUNC_ENTER(H5T_conv_schar_short, FAIL); H5T_CONV_sS(SCHAR, SHORT, @@ -3064,8 +3154,9 @@ H5T_conv_schar_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, */ herr_t H5T_conv_schar_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - size_t nelmts, size_t stride, void *buf, - void UNUSED *bkg, hid_t UNUSED dset_xfer_plist) + size_t nelmts, size_t buf_stride, + size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, + hid_t UNUSED dset_xfer_plist) { FUNC_ENTER(H5T_conv_schar_ushort, FAIL); H5T_CONV_sU(SCHAR, USHORT, @@ -3092,7 +3183,9 @@ H5T_conv_schar_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, */ herr_t H5T_conv_uchar_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - size_t nelmts, size_t stride, void *buf, void UNUSED *bkg, hid_t UNUSED dset_xfer_plist) + size_t nelmts, size_t buf_stride, + size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, + hid_t UNUSED dset_xfer_plist) { FUNC_ENTER(H5T_conv_uchar_short, FAIL); H5T_CONV_uS(UCHAR, SHORT, @@ -3120,8 +3213,9 @@ H5T_conv_uchar_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, */ herr_t H5T_conv_uchar_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - size_t nelmts, size_t stride, void *buf, - void UNUSED *bkg, hid_t UNUSED dset_xfer_plist) + size_t nelmts, size_t buf_stride, + size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, + hid_t UNUSED dset_xfer_plist) { FUNC_ENTER(H5T_conv_uchar_ushort, FAIL); H5T_CONV_uU(UCHAR, USHORT, @@ -3148,7 +3242,8 @@ H5T_conv_uchar_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, */ herr_t H5T_conv_schar_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - size_t nelmts, size_t stride, void *buf, void UNUSED *bkg, hid_t UNUSED dset_xfer_plist) + size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, + void *buf, void UNUSED *bkg, hid_t UNUSED dset_xfer_plist) { FUNC_ENTER(H5T_conv_schar_int, FAIL); H5T_CONV_sS(SCHAR, INT, @@ -3175,7 +3270,8 @@ H5T_conv_schar_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, */ herr_t H5T_conv_schar_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - size_t nelmts, size_t stride, void *buf, void UNUSED *bkg, hid_t UNUSED dset_xfer_plist) + size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, + void *buf, void UNUSED *bkg, hid_t UNUSED dset_xfer_plist) { FUNC_ENTER(H5T_conv_schar_uint, FAIL); H5T_CONV_sU(SCHAR, UINT, @@ -3202,7 +3298,8 @@ H5T_conv_schar_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, */ herr_t H5T_conv_uchar_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - size_t nelmts, size_t stride, void *buf, void UNUSED *bkg, hid_t UNUSED dset_xfer_plist) + size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, + void *buf, void UNUSED *bkg, hid_t UNUSED dset_xfer_plist) { FUNC_ENTER(H5T_conv_uchar_int, FAIL); H5T_CONV_uS(UCHAR, INT, @@ -3230,7 +3327,8 @@ H5T_conv_uchar_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, */ herr_t H5T_conv_uchar_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - size_t nelmts, size_t stride, void *buf, void UNUSED *bkg, hid_t UNUSED dset_xfer_plist) + size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, + void *buf, void UNUSED *bkg, hid_t UNUSED dset_xfer_plist) { FUNC_ENTER(H5T_conv_uchar_uint, FAIL); H5T_CONV_uU(UCHAR, UINT, @@ -3257,7 +3355,8 @@ H5T_conv_uchar_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, */ herr_t H5T_conv_schar_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - size_t nelmts, size_t stride, void *buf, void UNUSED *bkg, hid_t UNUSED dset_xfer_plist) + size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, + void *buf, void UNUSED *bkg, hid_t UNUSED dset_xfer_plist) { FUNC_ENTER(H5T_conv_schar_long, FAIL); H5T_CONV_sS(SCHAR, LONG, @@ -3284,7 +3383,9 @@ H5T_conv_schar_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, */ herr_t H5T_conv_schar_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - size_t nelmts, size_t stride, void *buf, void UNUSED *bkg, hid_t UNUSED dset_xfer_plist) + size_t nelmts, size_t buf_stride, + size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, + hid_t UNUSED dset_xfer_plist) { FUNC_ENTER(H5T_conv_schar_ulong, FAIL); H5T_CONV_sU(SCHAR, ULONG, @@ -3311,7 +3412,8 @@ H5T_conv_schar_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, */ herr_t H5T_conv_uchar_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - size_t nelmts, size_t stride, void *buf, void UNUSED *bkg, hid_t UNUSED dset_xfer_plist) + size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, + void *buf, void UNUSED *bkg, hid_t UNUSED dset_xfer_plist) { FUNC_ENTER(H5T_conv_uchar_long, FAIL); H5T_CONV_uS(UCHAR, LONG, @@ -3339,7 +3441,9 @@ H5T_conv_uchar_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, */ herr_t H5T_conv_uchar_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - size_t nelmts, size_t stride, void *buf, void UNUSED *bkg, hid_t UNUSED dset_xfer_plist) + size_t nelmts, size_t buf_stride, + size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, + hid_t UNUSED dset_xfer_plist) { FUNC_ENTER(H5T_conv_uchar_ulong, FAIL); H5T_CONV_uU(UCHAR, ULONG, @@ -3366,7 +3470,9 @@ H5T_conv_uchar_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, */ herr_t H5T_conv_schar_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - size_t nelmts, size_t stride, void *buf, void UNUSED *bkg, hid_t UNUSED dset_xfer_plist) + size_t nelmts, size_t buf_stride, + size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, + hid_t UNUSED dset_xfer_plist) { FUNC_ENTER(H5T_conv_schar_llong, FAIL); H5T_CONV_sS(SCHAR, LLONG, @@ -3393,8 +3499,9 @@ H5T_conv_schar_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, */ herr_t H5T_conv_schar_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - size_t nelmts, size_t stride, void *buf, - void UNUSED *bkg, hid_t UNUSED dset_xfer_plist) + size_t nelmts, size_t buf_stride, + size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, + hid_t UNUSED dset_xfer_plist) { FUNC_ENTER(H5T_conv_schar_ullong, FAIL); H5T_CONV_sU(SCHAR, ULLONG, @@ -3421,7 +3528,9 @@ H5T_conv_schar_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, */ herr_t H5T_conv_uchar_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - size_t nelmts, size_t stride, void *buf, void UNUSED *bkg, hid_t UNUSED dset_xfer_plist) + size_t nelmts, size_t buf_stride, + size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, + hid_t UNUSED dset_xfer_plist) { FUNC_ENTER(H5T_conv_uchar_llong, FAIL); H5T_CONV_uS(UCHAR, LLONG, @@ -3449,8 +3558,9 @@ H5T_conv_uchar_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, */ herr_t H5T_conv_uchar_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - size_t nelmts, size_t stride, void *buf, - void UNUSED *bkg, hid_t UNUSED dset_xfer_plist) + size_t nelmts, size_t buf_stride, + size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, + hid_t UNUSED dset_xfer_plist) { FUNC_ENTER(H5T_conv_uchar_ullong, FAIL); H5T_CONV_uU(UCHAR, ULLONG, @@ -3477,10 +3587,14 @@ H5T_conv_uchar_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, */ herr_t H5T_conv_short_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - size_t nelmts, size_t stride, void *buf, void UNUSED *bkg, hid_t UNUSED dset_xfer_plist) + size_t nelmts, size_t buf_stride, + size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, + hid_t UNUSED dset_xfer_plist) { FUNC_ENTER(H5T_conv_short_schar, FAIL); - H5T_CONV_Ss(SHORT, SCHAR, short, signed char, SCHAR_MIN, SCHAR_MAX); + H5T_CONV_Ss(SHORT, SCHAR, + short, signed char, + SCHAR_MIN, SCHAR_MAX); FUNC_LEAVE(SUCCEED); } @@ -3503,7 +3617,9 @@ H5T_conv_short_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, */ herr_t H5T_conv_short_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - size_t nelmts, size_t stride, void *buf, void UNUSED *bkg, hid_t UNUSED dset_xfer_plist) + size_t nelmts, size_t buf_stride, + size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, + hid_t UNUSED dset_xfer_plist) { FUNC_ENTER(H5T_conv_short_uchar, FAIL); H5T_CONV_Su(SHORT, UCHAR, @@ -3531,8 +3647,9 @@ H5T_conv_short_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, */ herr_t H5T_conv_ushort_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - size_t nelmts, size_t stride, void *buf, - void UNUSED *bkg, hid_t UNUSED dset_xfer_plist) + size_t nelmts, size_t buf_stride, + size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, + hid_t UNUSED dset_xfer_plist) { FUNC_ENTER(H5T_conv_ushort_schar, FAIL); H5T_CONV_Us(USHORT, SCHAR, @@ -3560,8 +3677,9 @@ H5T_conv_ushort_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, */ herr_t H5T_conv_ushort_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - size_t nelmts, size_t stride, void *buf, - void UNUSED *bkg, hid_t UNUSED dset_xfer_plist) + size_t nelmts, size_t buf_stride, + size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, + hid_t UNUSED dset_xfer_plist) { FUNC_ENTER(H5T_conv_ushort_uchar, FAIL); H5T_CONV_Uu(USHORT, UCHAR, @@ -3589,8 +3707,9 @@ H5T_conv_ushort_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, */ herr_t H5T_conv_short_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - size_t nelmts, size_t stride, void *buf, - void UNUSED *bkg, hid_t UNUSED dset_xfer_plist) + size_t nelmts, size_t buf_stride, + size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, + hid_t UNUSED dset_xfer_plist) { FUNC_ENTER(H5T_conv_short_ushort, FAIL); H5T_CONV_su(SHORT, USHORT, @@ -3617,8 +3736,9 @@ H5T_conv_short_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, */ herr_t H5T_conv_ushort_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - size_t nelmts, size_t stride, void *buf, - void UNUSED *bkg, hid_t UNUSED dset_xfer_plist) + size_t nelmts, size_t buf_stride, + size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, + hid_t UNUSED dset_xfer_plist) { FUNC_ENTER(H5T_conv_ushort_short, FAIL); H5T_CONV_us(USHORT, SHORT, @@ -3646,7 +3766,9 @@ H5T_conv_ushort_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, */ herr_t H5T_conv_short_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - size_t nelmts, size_t stride, void *buf, void UNUSED *bkg, hid_t UNUSED dset_xfer_plist) + size_t nelmts, size_t buf_stride, + size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, + hid_t UNUSED dset_xfer_plist) { FUNC_ENTER(H5T_conv_short_int, FAIL); H5T_CONV_sS(SHORT, INT, @@ -3673,7 +3795,9 @@ H5T_conv_short_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, */ herr_t H5T_conv_short_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - size_t nelmts, size_t stride, void *buf, void UNUSED *bkg, hid_t UNUSED dset_xfer_plist) + size_t nelmts, size_t buf_stride, + size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, + hid_t UNUSED dset_xfer_plist) { FUNC_ENTER(H5T_conv_short_uint, FAIL); H5T_CONV_sU(SHORT, UINT, @@ -3700,7 +3824,9 @@ H5T_conv_short_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, */ herr_t H5T_conv_ushort_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - size_t nelmts, size_t stride, void *buf, void UNUSED *bkg, hid_t UNUSED dset_xfer_plist) + size_t nelmts, size_t buf_stride, + size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, + hid_t UNUSED dset_xfer_plist) { FUNC_ENTER(H5T_conv_ushort_int, FAIL); H5T_CONV_uS(USHORT, INT, @@ -3728,7 +3854,9 @@ H5T_conv_ushort_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, */ herr_t H5T_conv_ushort_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - size_t nelmts, size_t stride, void *buf, void UNUSED *bkg, hid_t UNUSED dset_xfer_plist) + size_t nelmts, size_t buf_stride, + size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, + hid_t UNUSED dset_xfer_plist) { FUNC_ENTER(H5T_conv_ushort_uint, FAIL); H5T_CONV_uU(USHORT, UINT, @@ -3755,7 +3883,9 @@ H5T_conv_ushort_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, */ herr_t H5T_conv_short_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - size_t nelmts, size_t stride, void *buf, void UNUSED *bkg, hid_t UNUSED dset_xfer_plist) + size_t nelmts, size_t buf_stride, + size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, + hid_t UNUSED dset_xfer_plist) { FUNC_ENTER(H5T_conv_short_long, FAIL); H5T_CONV_sS(SHORT, LONG, @@ -3782,7 +3912,9 @@ H5T_conv_short_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, */ herr_t H5T_conv_short_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - size_t nelmts, size_t stride, void *buf, void UNUSED *bkg, hid_t UNUSED dset_xfer_plist) + size_t nelmts, size_t buf_stride, + size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, + hid_t UNUSED dset_xfer_plist) { FUNC_ENTER(H5T_conv_short_ulong, FAIL); H5T_CONV_sU(SHORT, ULONG, @@ -3809,7 +3941,9 @@ H5T_conv_short_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, */ herr_t H5T_conv_ushort_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - size_t nelmts, size_t stride, void *buf, void UNUSED *bkg, hid_t UNUSED dset_xfer_plist) + size_t nelmts, size_t buf_stride, + size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, + hid_t UNUSED dset_xfer_plist) { FUNC_ENTER(H5T_conv_ushort_long, FAIL); H5T_CONV_uS(USHORT, LONG, @@ -3837,8 +3971,9 @@ H5T_conv_ushort_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, */ herr_t H5T_conv_ushort_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - size_t nelmts, size_t stride, void *buf, - void UNUSED *bkg, hid_t UNUSED dset_xfer_plist) + size_t nelmts, size_t buf_stride, + size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, + hid_t UNUSED dset_xfer_plist) { FUNC_ENTER(H5T_conv_ushort_ulong, FAIL); H5T_CONV_uU(USHORT, ULONG, @@ -3865,7 +4000,9 @@ H5T_conv_ushort_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, */ herr_t H5T_conv_short_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - size_t nelmts, size_t stride, void *buf, void UNUSED *bkg, hid_t UNUSED dset_xfer_plist) + size_t nelmts, size_t buf_stride, + size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, + hid_t UNUSED dset_xfer_plist) { FUNC_ENTER(H5T_conv_short_llong, FAIL); H5T_CONV_sS(SHORT, LLONG, @@ -3892,8 +4029,9 @@ H5T_conv_short_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, */ herr_t H5T_conv_short_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - size_t nelmts, size_t stride, void *buf, - void UNUSED *bkg, hid_t UNUSED dset_xfer_plist) + size_t nelmts, size_t buf_stride, + size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, + hid_t UNUSED dset_xfer_plist) { FUNC_ENTER(H5T_conv_short_ullong, FAIL); H5T_CONV_sU(SHORT, ULLONG, @@ -3920,8 +4058,9 @@ H5T_conv_short_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, */ herr_t H5T_conv_ushort_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - size_t nelmts, size_t stride, void *buf, - void UNUSED *bkg, hid_t UNUSED dset_xfer_plist) + size_t nelmts, size_t buf_stride, + size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, + hid_t UNUSED dset_xfer_plist) { FUNC_ENTER(H5T_conv_ushort_llong, FAIL); H5T_CONV_uS(USHORT, LLONG, @@ -3949,8 +4088,9 @@ H5T_conv_ushort_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, */ herr_t H5T_conv_ushort_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - size_t nelmts, size_t stride, void *buf, - void UNUSED *bkg, hid_t UNUSED dset_xfer_plist) + size_t nelmts, size_t buf_stride, + size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, + hid_t UNUSED dset_xfer_plist) { FUNC_ENTER(H5T_conv_ushort_ullong, FAIL); H5T_CONV_uU(USHORT, ULLONG, @@ -3977,7 +4117,9 @@ H5T_conv_ushort_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, */ herr_t H5T_conv_int_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - size_t nelmts, size_t stride, void *buf, void UNUSED *bkg, hid_t UNUSED dset_xfer_plist) + size_t nelmts, size_t buf_stride, + size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, + hid_t UNUSED dset_xfer_plist) { FUNC_ENTER(H5T_conv_int_schar, FAIL); H5T_CONV_Ss(INT, SCHAR, @@ -4005,7 +4147,9 @@ H5T_conv_int_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, */ herr_t H5T_conv_int_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - size_t nelmts, size_t stride, void *buf, void UNUSED *bkg, hid_t UNUSED dset_xfer_plist) + size_t nelmts, size_t buf_stride, + size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, + hid_t UNUSED dset_xfer_plist) { FUNC_ENTER(H5T_conv_int_uchar, FAIL); H5T_CONV_Su(INT, UCHAR, @@ -4033,7 +4177,9 @@ H5T_conv_int_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, */ herr_t H5T_conv_uint_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - size_t nelmts, size_t stride, void *buf, void UNUSED *bkg, hid_t UNUSED dset_xfer_plist) + size_t nelmts, size_t buf_stride, + size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, + hid_t UNUSED dset_xfer_plist) { FUNC_ENTER(H5T_conv_uint_schar, FAIL); H5T_CONV_Us(UINT, SCHAR, @@ -4061,7 +4207,9 @@ H5T_conv_uint_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, */ herr_t H5T_conv_uint_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - size_t nelmts, size_t stride, void *buf, void UNUSED *bkg, hid_t UNUSED dset_xfer_plist) + size_t nelmts, size_t buf_stride, + size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, + hid_t UNUSED dset_xfer_plist) { FUNC_ENTER(H5T_conv_uint_uchar, FAIL); H5T_CONV_Uu(UINT, UCHAR, @@ -4089,7 +4237,9 @@ H5T_conv_uint_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, */ herr_t H5T_conv_int_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - size_t nelmts, size_t stride, void *buf, void UNUSED *bkg, hid_t UNUSED dset_xfer_plist) + size_t nelmts, size_t buf_stride, + size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, + hid_t UNUSED dset_xfer_plist) { FUNC_ENTER(H5T_conv_int_short, FAIL); H5T_CONV_Ss(INT, SHORT, @@ -4117,7 +4267,9 @@ H5T_conv_int_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, */ herr_t H5T_conv_int_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - size_t nelmts, size_t stride, void *buf, void UNUSED *bkg, hid_t UNUSED dset_xfer_plist) + size_t nelmts, size_t buf_stride, + size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, + hid_t UNUSED dset_xfer_plist) { FUNC_ENTER(H5T_conv_int_ushort, FAIL); H5T_CONV_Su(INT, USHORT, @@ -4145,7 +4297,9 @@ H5T_conv_int_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, */ herr_t H5T_conv_uint_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - size_t nelmts, size_t stride, void *buf, void UNUSED *bkg, hid_t UNUSED dset_xfer_plist) + size_t nelmts, size_t buf_stride, + size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, + hid_t UNUSED dset_xfer_plist) { FUNC_ENTER(H5T_conv_uint_short, FAIL); H5T_CONV_Us(UINT, SHORT, @@ -4173,7 +4327,9 @@ H5T_conv_uint_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, */ herr_t H5T_conv_uint_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - size_t nelmts, size_t stride, void *buf, void UNUSED *bkg, hid_t UNUSED dset_xfer_plist) + size_t nelmts, size_t buf_stride, + size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, + hid_t UNUSED dset_xfer_plist) { FUNC_ENTER(H5T_conv_uint_ushort, FAIL); H5T_CONV_Uu(UINT, USHORT, @@ -4201,7 +4357,8 @@ H5T_conv_uint_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, */ herr_t H5T_conv_int_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - size_t nelmts, size_t stride, void *buf, void UNUSED *bkg, hid_t UNUSED dset_xfer_plist) + size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, + void *buf, void UNUSED *bkg, hid_t UNUSED dset_xfer_plist) { FUNC_ENTER(H5T_conv_int_uint, FAIL); H5T_CONV_su(INT, UINT, @@ -4228,7 +4385,8 @@ H5T_conv_int_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, */ herr_t H5T_conv_uint_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - size_t nelmts, size_t stride, void *buf, void UNUSED *bkg, hid_t UNUSED dset_xfer_plist) + size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, + void *buf, void UNUSED *bkg, hid_t UNUSED dset_xfer_plist) { FUNC_ENTER(H5T_conv_uint_int, FAIL); H5T_CONV_us(UINT, INT, @@ -4256,7 +4414,8 @@ H5T_conv_uint_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, */ herr_t H5T_conv_int_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - size_t nelmts, size_t stride, void *buf, void UNUSED *bkg, hid_t UNUSED dset_xfer_plist) + size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, + void *buf, void UNUSED *bkg, hid_t UNUSED dset_xfer_plist) { FUNC_ENTER(H5T_conv_int_long, FAIL); H5T_CONV_sS(INT, LONG, @@ -4283,7 +4442,8 @@ H5T_conv_int_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, */ herr_t H5T_conv_int_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - size_t nelmts, size_t stride, void *buf, void UNUSED *bkg, hid_t UNUSED dset_xfer_plist) + size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, + void *buf, void UNUSED *bkg, hid_t UNUSED dset_xfer_plist) { FUNC_ENTER(H5T_conv_int_ulong, FAIL); H5T_CONV_sU(INT, LONG, @@ -4310,7 +4470,8 @@ H5T_conv_int_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, */ herr_t H5T_conv_uint_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - size_t nelmts, size_t stride, void *buf, void UNUSED *bkg, hid_t UNUSED dset_xfer_plist) + size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, + void *buf, void UNUSED *bkg, hid_t UNUSED dset_xfer_plist) { FUNC_ENTER(H5T_conv_uint_long, FAIL); H5T_CONV_uS(UINT, LONG, @@ -4338,7 +4499,8 @@ H5T_conv_uint_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, */ herr_t H5T_conv_uint_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - size_t nelmts, size_t stride, void *buf, void UNUSED *bkg, hid_t UNUSED dset_xfer_plist) + size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, + void *buf, void UNUSED *bkg, hid_t UNUSED dset_xfer_plist) { FUNC_ENTER(H5T_conv_uint_ulong, FAIL); H5T_CONV_uU(UINT, ULONG, @@ -4365,7 +4527,8 @@ H5T_conv_uint_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, */ herr_t H5T_conv_int_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - size_t nelmts, size_t stride, void *buf, void UNUSED *bkg, hid_t UNUSED dset_xfer_plist) + size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, + void *buf, void UNUSED *bkg, hid_t UNUSED dset_xfer_plist) { FUNC_ENTER(H5T_conv_int_llong, FAIL); H5T_CONV_sS(INT, LLONG, @@ -4392,7 +4555,8 @@ H5T_conv_int_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, */ herr_t H5T_conv_int_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - size_t nelmts, size_t stride, void *buf, void UNUSED *bkg, hid_t UNUSED dset_xfer_plist) + size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, + void *buf, void UNUSED *bkg, hid_t UNUSED dset_xfer_plist) { FUNC_ENTER(H5T_conv_int_ullong, FAIL); H5T_CONV_sU(INT, ULLONG, @@ -4419,7 +4583,8 @@ H5T_conv_int_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, */ herr_t H5T_conv_uint_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - size_t nelmts, size_t stride, void *buf, void UNUSED *bkg, hid_t UNUSED dset_xfer_plist) + size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, + void *buf, void UNUSED *bkg, hid_t UNUSED dset_xfer_plist) { FUNC_ENTER(H5T_conv_uint_llong, FAIL); H5T_CONV_uS(UINT, LLONG, @@ -4447,7 +4612,9 @@ H5T_conv_uint_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, */ herr_t H5T_conv_uint_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - size_t nelmts, size_t stride, void *buf, void UNUSED *bkg, hid_t UNUSED dset_xfer_plist) + size_t nelmts, size_t buf_stride, + size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, + hid_t UNUSED dset_xfer_plist) { FUNC_ENTER(H5T_conv_uint_ullong, FAIL); H5T_CONV_uU(UINT, ULLONG, @@ -4474,7 +4641,8 @@ H5T_conv_uint_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, */ herr_t H5T_conv_long_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - size_t nelmts, size_t stride, void *buf, void UNUSED *bkg, hid_t UNUSED dset_xfer_plist) + size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, + void *buf, void UNUSED *bkg, hid_t UNUSED dset_xfer_plist) { FUNC_ENTER(H5T_conv_long_schar, FAIL); H5T_CONV_Ss(LONG, SCHAR, @@ -4502,7 +4670,8 @@ H5T_conv_long_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, */ herr_t H5T_conv_long_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - size_t nelmts, size_t stride, void *buf, void UNUSED *bkg, hid_t UNUSED dset_xfer_plist) + size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, + void *buf, void UNUSED *bkg, hid_t UNUSED dset_xfer_plist) { FUNC_ENTER(H5T_conv_long_uchar, FAIL); H5T_CONV_Su(LONG, UCHAR, @@ -4530,7 +4699,9 @@ H5T_conv_long_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, */ herr_t H5T_conv_ulong_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - size_t nelmts, size_t stride, void *buf, void UNUSED *bkg, hid_t UNUSED dset_xfer_plist) + size_t nelmts, size_t buf_stride, + size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, + hid_t UNUSED dset_xfer_plist) { FUNC_ENTER(H5T_conv_ulong_schar, FAIL); H5T_CONV_Us(ULONG, SCHAR, @@ -4558,7 +4729,9 @@ H5T_conv_ulong_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, */ herr_t H5T_conv_ulong_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - size_t nelmts, size_t stride, void *buf, void UNUSED *bkg, hid_t UNUSED dset_xfer_plist) + size_t nelmts, size_t buf_stride, + size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, + hid_t UNUSED dset_xfer_plist) { FUNC_ENTER(H5T_conv_ulong_uchar, FAIL); H5T_CONV_Uu(ULONG, UCHAR, @@ -4586,7 +4759,8 @@ H5T_conv_ulong_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, */ herr_t H5T_conv_long_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - size_t nelmts, size_t stride, void *buf, void UNUSED *bkg, hid_t UNUSED dset_xfer_plist) + size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, + void *buf, void UNUSED *bkg, hid_t UNUSED dset_xfer_plist) { FUNC_ENTER(H5T_conv_long_short, FAIL); H5T_CONV_Ss(LONG, SHORT, @@ -4614,7 +4788,9 @@ H5T_conv_long_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, */ herr_t H5T_conv_long_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - size_t nelmts, size_t stride, void *buf, void UNUSED *bkg, hid_t UNUSED dset_xfer_plist) + size_t nelmts, size_t buf_stride, + size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, + hid_t UNUSED dset_xfer_plist) { FUNC_ENTER(H5T_conv_long_ushort, FAIL); H5T_CONV_Su(LONG, USHORT, @@ -4642,7 +4818,8 @@ H5T_conv_long_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, */ herr_t H5T_conv_ulong_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - size_t nelmts, size_t stride, void *buf, void UNUSED *bkg, hid_t UNUSED dset_xfer_plist) + size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, + void *buf, void UNUSED *bkg, hid_t UNUSED dset_xfer_plist) { FUNC_ENTER(H5T_conv_ulong_short, FAIL); H5T_CONV_Us(ULONG, SHORT, @@ -4670,8 +4847,9 @@ H5T_conv_ulong_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, */ herr_t H5T_conv_ulong_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - size_t nelmts, size_t stride, void *buf, - void UNUSED *bkg, hid_t UNUSED dset_xfer_plist) + size_t nelmts, size_t buf_stride, + size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, + hid_t UNUSED dset_xfer_plist) { FUNC_ENTER(H5T_conv_ulong_ushort, FAIL); H5T_CONV_Uu(ULONG, USHORT, @@ -4699,7 +4877,8 @@ H5T_conv_ulong_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, */ herr_t H5T_conv_long_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - size_t nelmts, size_t stride, void *buf, void UNUSED *bkg, hid_t UNUSED dset_xfer_plist) + size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, + void *buf, void UNUSED *bkg, hid_t UNUSED dset_xfer_plist) { FUNC_ENTER(H5T_conv_long_int, FAIL); H5T_CONV_Ss(LONG, INT, @@ -4727,7 +4906,8 @@ H5T_conv_long_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, */ herr_t H5T_conv_long_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - size_t nelmts, size_t stride, void *buf, void UNUSED *bkg, hid_t UNUSED dset_xfer_plist) + size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, + void *buf, void UNUSED *bkg, hid_t UNUSED dset_xfer_plist) { FUNC_ENTER(H5T_conv_long_uint, FAIL); H5T_CONV_Su(LONG, UINT, @@ -4755,7 +4935,8 @@ H5T_conv_long_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, */ herr_t H5T_conv_ulong_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - size_t nelmts, size_t stride, void *buf, void UNUSED *bkg, hid_t UNUSED dset_xfer_plist) + size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, + void *buf, void UNUSED *bkg, hid_t UNUSED dset_xfer_plist) { FUNC_ENTER(H5T_conv_ulong_int, FAIL); H5T_CONV_Us(ULONG, INT, @@ -4783,7 +4964,8 @@ H5T_conv_ulong_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, */ herr_t H5T_conv_ulong_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - size_t nelmts, size_t stride, void *buf, void UNUSED *bkg, hid_t UNUSED dset_xfer_plist) + size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, + void *buf, void UNUSED *bkg, hid_t UNUSED dset_xfer_plist) { FUNC_ENTER(H5T_conv_ulong_uint, FAIL); H5T_CONV_Uu(ULONG, UINT, @@ -4811,7 +4993,8 @@ H5T_conv_ulong_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, */ herr_t H5T_conv_long_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - size_t nelmts, size_t stride, void *buf, void UNUSED *bkg, hid_t UNUSED dset_xfer_plist) + size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, + void *buf, void UNUSED *bkg, hid_t UNUSED dset_xfer_plist) { FUNC_ENTER(H5T_conv_long_ulong, FAIL); H5T_CONV_su(LONG, ULONG, @@ -4838,7 +5021,8 @@ H5T_conv_long_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, */ herr_t H5T_conv_ulong_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - size_t nelmts, size_t stride, void *buf, void UNUSED *bkg, hid_t UNUSED dset_xfer_plist) + size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, + void *buf, void UNUSED *bkg, hid_t UNUSED dset_xfer_plist) { FUNC_ENTER(H5T_conv_ulong_long, FAIL); H5T_CONV_us(ULONG, LONG, @@ -4866,7 +5050,8 @@ H5T_conv_ulong_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, */ herr_t H5T_conv_long_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - size_t nelmts, size_t stride, void *buf, void UNUSED *bkg, hid_t UNUSED dset_xfer_plist) + size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, + void *buf, void UNUSED *bkg, hid_t UNUSED dset_xfer_plist) { FUNC_ENTER(H5T_conv_long_llong, FAIL); H5T_CONV_sS(LONG, LLONG, @@ -4893,7 +5078,9 @@ H5T_conv_long_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, */ herr_t H5T_conv_long_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - size_t nelmts, size_t stride, void *buf, void UNUSED *bkg, hid_t UNUSED dset_xfer_plist) + size_t nelmts, size_t buf_stride, + size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, + hid_t UNUSED dset_xfer_plist) { FUNC_ENTER(H5T_conv_long_ullong, FAIL); H5T_CONV_sU(LONG, ULLONG, @@ -4920,7 +5107,9 @@ H5T_conv_long_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, */ herr_t H5T_conv_ulong_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - size_t nelmts, size_t stride, void *buf, void UNUSED *bkg, hid_t UNUSED dset_xfer_plist) + size_t nelmts, size_t buf_stride, + size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, + hid_t UNUSED dset_xfer_plist) { FUNC_ENTER(H5T_conv_long_llong, FAIL); H5T_CONV_uS(ULONG, LLONG, @@ -4948,8 +5137,9 @@ H5T_conv_ulong_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, */ herr_t H5T_conv_ulong_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - size_t nelmts, size_t stride, void *buf, - void UNUSED *bkg, hid_t UNUSED dset_xfer_plist) + size_t nelmts, size_t buf_stride, + size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, + hid_t UNUSED dset_xfer_plist) { FUNC_ENTER(H5T_conv_ulong_ullong, FAIL); H5T_CONV_uU(ULONG, ULLONG, @@ -4976,7 +5166,9 @@ H5T_conv_ulong_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, */ herr_t H5T_conv_llong_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - size_t nelmts, size_t stride, void *buf, void UNUSED *bkg, hid_t UNUSED dset_xfer_plist) + size_t nelmts, size_t buf_stride, + size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, + hid_t UNUSED dset_xfer_plist) { FUNC_ENTER(H5T_conv_llong_schar, FAIL); H5T_CONV_Ss(LLONG, SCHAR, @@ -5004,7 +5196,9 @@ H5T_conv_llong_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, */ herr_t H5T_conv_llong_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - size_t nelmts, size_t stride, void *buf, void UNUSED *bkg, hid_t UNUSED dset_xfer_plist) + size_t nelmts, size_t buf_stride, + size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, + hid_t UNUSED dset_xfer_plist) { FUNC_ENTER(H5T_conv_llong_uchar, FAIL); H5T_CONV_Su(LLONG, UCHAR, @@ -5032,8 +5226,9 @@ H5T_conv_llong_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, */ herr_t H5T_conv_ullong_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - size_t nelmts, size_t stride, void *buf, - void UNUSED *bkg, hid_t UNUSED dset_xfer_plist) + size_t nelmts, size_t buf_stride, + size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, + hid_t UNUSED dset_xfer_plist) { FUNC_ENTER(H5T_conv_ullong_schar, FAIL); H5T_CONV_Us(ULLONG, SCHAR, @@ -5061,7 +5256,9 @@ H5T_conv_ullong_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, */ herr_t H5T_conv_ullong_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - size_t nelmts, size_t stride, void *buf, void UNUSED *bkg, hid_t UNUSED dset_xfer_plist) + size_t nelmts, size_t buf_stride, + size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, + hid_t UNUSED dset_xfer_plist) { FUNC_ENTER(H5T_conv_ullong_uchar, FAIL); H5T_CONV_Uu(ULLONG, UCHAR, @@ -5089,7 +5286,9 @@ H5T_conv_ullong_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, */ herr_t H5T_conv_llong_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - size_t nelmts, size_t stride, void *buf, void UNUSED *bkg, hid_t UNUSED dset_xfer_plist) + size_t nelmts, size_t buf_stride, + size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, + hid_t UNUSED dset_xfer_plist) { FUNC_ENTER(H5T_conv_llong_short, FAIL); H5T_CONV_Ss(LLONG, SHORT, @@ -5117,8 +5316,9 @@ H5T_conv_llong_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, */ herr_t H5T_conv_llong_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - size_t nelmts, size_t stride, void *buf, - void UNUSED *bkg, hid_t UNUSED dset_xfer_plist) + size_t nelmts, size_t buf_stride, + size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, + hid_t UNUSED dset_xfer_plist) { FUNC_ENTER(H5T_conv_llong_ushort, FAIL); H5T_CONV_Su(LLONG, USHORT, @@ -5146,8 +5346,9 @@ H5T_conv_llong_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, */ herr_t H5T_conv_ullong_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - size_t nelmts, size_t stride, void *buf, - void UNUSED *bkg, hid_t UNUSED dset_xfer_plist) + size_t nelmts, size_t buf_stride, + size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, + hid_t UNUSED dset_xfer_plist) { FUNC_ENTER(H5T_conv_ullong_short, FAIL); H5T_CONV_Us(ULLONG, SHORT, @@ -5175,8 +5376,9 @@ H5T_conv_ullong_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, */ herr_t H5T_conv_ullong_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - size_t nelmts, size_t stride, void *buf, - void UNUSED *bkg, hid_t UNUSED dset_xfer_plist) + size_t nelmts, size_t buf_stride, + size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, + hid_t UNUSED dset_xfer_plist) { FUNC_ENTER(H5T_conv_ullong_ushort, FAIL); H5T_CONV_Uu(ULLONG, USHORT, @@ -5204,7 +5406,8 @@ H5T_conv_ullong_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, */ herr_t H5T_conv_llong_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - size_t nelmts, size_t stride, void *buf, void UNUSED *bkg, hid_t UNUSED dset_xfer_plist) + size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, + void *buf, void UNUSED *bkg, hid_t UNUSED dset_xfer_plist) { FUNC_ENTER(H5T_conv_llong_int, FAIL); H5T_CONV_Ss(LLONG, INT, @@ -5232,7 +5435,8 @@ H5T_conv_llong_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, */ herr_t H5T_conv_llong_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - size_t nelmts, size_t stride, void *buf, void UNUSED *bkg, hid_t UNUSED dset_xfer_plist) + size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, + void *buf, void UNUSED *bkg, hid_t UNUSED dset_xfer_plist) { FUNC_ENTER(H5T_conv_llong_uint, FAIL); H5T_CONV_Su(LLONG, UINT, @@ -5260,7 +5464,8 @@ H5T_conv_llong_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, */ herr_t H5T_conv_ullong_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - size_t nelmts, size_t stride, void *buf, void UNUSED *bkg, hid_t UNUSED dset_xfer_plist) + size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, + void *buf, void UNUSED *bkg, hid_t UNUSED dset_xfer_plist) { FUNC_ENTER(H5T_conv_ullong_int, FAIL); H5T_CONV_Us(ULLONG, INT, @@ -5288,7 +5493,9 @@ H5T_conv_ullong_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, */ herr_t H5T_conv_ullong_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - size_t nelmts, size_t stride, void *buf, void UNUSED *bkg, hid_t UNUSED dset_xfer_plist) + size_t nelmts, size_t buf_stride, + size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, + hid_t UNUSED dset_xfer_plist) { FUNC_ENTER(H5T_conv_ullong_uint, FAIL); H5T_CONV_Uu(ULLONG, UINT, @@ -5316,7 +5523,8 @@ H5T_conv_ullong_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, */ herr_t H5T_conv_llong_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - size_t nelmts, size_t stride, void *buf, void UNUSED *bkg, hid_t UNUSED dset_xfer_plist) + size_t nelmts, size_t buf_stride, size_t UNUSED bkg_stride, + void *buf, void UNUSED *bkg, hid_t UNUSED dset_xfer_plist) { FUNC_ENTER(H5T_conv_llong_long, FAIL); H5T_CONV_Ss(LLONG, LONG, @@ -5344,7 +5552,9 @@ H5T_conv_llong_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, */ herr_t H5T_conv_llong_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - size_t nelmts, size_t stride, void *buf, void UNUSED *bkg, hid_t UNUSED dset_xfer_plist) + size_t nelmts, size_t buf_stride, + size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, + hid_t UNUSED dset_xfer_plist) { FUNC_ENTER(H5T_conv_llong_ulong, FAIL); H5T_CONV_Su(LLONG, ULONG, @@ -5372,7 +5582,9 @@ H5T_conv_llong_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, */ herr_t H5T_conv_ullong_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - size_t nelmts, size_t stride, void *buf, void UNUSED *bkg, hid_t UNUSED dset_xfer_plist) + size_t nelmts, size_t buf_stride, + size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, + hid_t UNUSED dset_xfer_plist) { FUNC_ENTER(H5T_conv_ullong_long, FAIL); H5T_CONV_Us(ULLONG, LONG, @@ -5400,8 +5612,9 @@ H5T_conv_ullong_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, */ herr_t H5T_conv_ullong_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - size_t nelmts, size_t stride, void *buf, - void UNUSED *bkg, hid_t UNUSED dset_xfer_plist) + size_t nelmts, size_t buf_stride, + size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, + hid_t UNUSED dset_xfer_plist) { FUNC_ENTER(H5T_conv_ullong_ulong, FAIL); H5T_CONV_Uu(ULLONG, ULONG, @@ -5429,8 +5642,9 @@ H5T_conv_ullong_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, */ herr_t H5T_conv_llong_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - size_t nelmts, size_t stride, void *buf, - void UNUSED *bkg, hid_t UNUSED dset_xfer_plist) + size_t nelmts, size_t buf_stride, + size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, + hid_t UNUSED dset_xfer_plist) { FUNC_ENTER(H5T_conv_llong_ullong, FAIL); H5T_CONV_su(LLONG, ULLONG, @@ -5457,8 +5671,9 @@ H5T_conv_llong_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, */ herr_t H5T_conv_ullong_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - size_t nelmts, size_t stride, void *buf, - void UNUSED *bkg, hid_t UNUSED dset_xfer_plist) + size_t nelmts, size_t buf_stride, + size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, + hid_t UNUSED dset_xfer_plist) { FUNC_ENTER(H5T_conv_ullong_llong, FAIL); H5T_CONV_us(ULLONG, LLONG, @@ -5481,16 +5696,17 @@ H5T_conv_ullong_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, * * Modifications: * Robb Matzke, 1999-06-16 - * Added support for non-zero strides. If STRIDE is non-zero + * Added support for non-zero strides. If BUF_STRIDE is non-zero * then convert one value at each memory location advancing - * STRIDE bytes each time; otherwise assume both source and + * BUF_STRIDE bytes each time; otherwise assume both source and * destination values are packed. *------------------------------------------------------------------------- */ herr_t H5T_conv_float_double (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - size_t nelmts, size_t stride, void *buf, - void UNUSED *bkg, hid_t UNUSED dset_xfer_plist) + size_t nelmts, size_t buf_stride, + size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, + hid_t UNUSED dset_xfer_plist) { size_t elmtno; /*element number */ uint8_t *src, *s; /*source buffer */ @@ -5526,8 +5742,8 @@ H5T_conv_float_double (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, break; case H5T_CONV_CONV: - if (stride) { - src = dst = (uint8_t*)buf + stride*(nelmts-1); + if (buf_stride) { + src = dst = (uint8_t*)buf + buf_stride*(nelmts-1); } else { src = (uint8_t*)buf + sizeof(float)*(nelmts-1); dst = (uint8_t*)buf + sizeof(double)*(nelmts-1); @@ -5536,14 +5752,14 @@ H5T_conv_float_double (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, /* Need alignment? */ if (H5T_NATIVE_FLOAT_ALIGN_g>1) { src_mv = ((size_t)buf % H5T_NATIVE_FLOAT_ALIGN_g) || - ((stride?stride:sizeof(float)) % + ((buf_stride?buf_stride:sizeof(float)) % H5T_NATIVE_FLOAT_ALIGN_g); } else { src_mv = FALSE; } if (H5T_NATIVE_DOUBLE_ALIGN_g>1) { dst_mv = ((size_t)buf % H5T_NATIVE_DOUBLE_ALIGN_g) || - ((stride?stride:sizeof(double)) % + ((buf_stride?buf_stride:sizeof(double)) % H5T_NATIVE_DOUBLE_ALIGN_g); } else { dst_mv = FALSE; @@ -5569,9 +5785,9 @@ H5T_conv_float_double (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, if (dst_mv) HDmemcpy(dst, &aligned, sizeof(double)); /* Advance buffer pointers */ - if (stride) { - src -= stride; - dst -= stride; + if (buf_stride) { + src -= buf_stride; + dst -= buf_stride; } else { src -= sizeof(float); dst -= sizeof(double); @@ -5604,16 +5820,17 @@ H5T_conv_float_double (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, * Added overflow handling. * * Robb Matzke, 1999-06-16 - * Added support for non-zero strides. If STRIDE is non-zero + * Added support for non-zero strides. If BUF_STRIDE is non-zero * then convert one value at each memory location advancing - * STRIDE bytes each time; otherwise assume both source and + * BUF_STRIDE bytes each time; otherwise assume both source and * destination values are packed. *------------------------------------------------------------------------- */ herr_t H5T_conv_double_float (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - size_t nelmts, size_t stride, void *buf, - void UNUSED *bkg, hid_t UNUSED dset_xfer_plist) + size_t nelmts, size_t buf_stride, + size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, + hid_t UNUSED dset_xfer_plist) { size_t elmtno; /*element number */ uint8_t *src, *s; /*source buffer */ @@ -5655,14 +5872,14 @@ H5T_conv_double_float (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, /* Need alignment? */ if (H5T_NATIVE_DOUBLE_ALIGN_g>1) { src_mv = ((size_t)buf % H5T_NATIVE_DOUBLE_ALIGN_g) || - ((stride?stride:sizeof(double)) % + ((buf_stride?buf_stride:sizeof(double)) % H5T_NATIVE_DOUBLE_ALIGN_g); } else { src_mv = FALSE; } if (H5T_NATIVE_FLOAT_ALIGN_g>1) { dst_mv = ((size_t)buf % H5T_NATIVE_FLOAT_ALIGN_g) || - ((stride?stride:sizeof(float)) % + ((buf_stride?buf_stride:sizeof(float)) % H5T_NATIVE_FLOAT_ALIGN_g); } else { dst_mv = FALSE; @@ -5700,9 +5917,9 @@ H5T_conv_double_float (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, if (dst_mv) HDmemcpy(dst, &aligned, sizeof(float)); /* Advance pointers */ - if (stride) { - src += stride; - dst += stride; + if (buf_stride) { + src += buf_stride; + dst += buf_stride; } else { src += sizeof(double); dst += sizeof(float); @@ -5733,16 +5950,17 @@ H5T_conv_double_float (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, * * Modifications: * Robb Matzke, 1999-06-16 - * Added support for non-zero strides. If STRIDE is non-zero + * Added support for non-zero strides. If BUF_STRIDE is non-zero * then convert one value at each memory location advancing - * STRIDE bytes each time; otherwise assume both source and + * BUF_STRIDE bytes each time; otherwise assume both source and * destination values are packed. *------------------------------------------------------------------------- */ herr_t H5T_conv_i32le_f64le (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - size_t nelmts, size_t stride, void *buf, - void UNUSED *bkg, hid_t UNUSED dset_xfer_plist) + size_t nelmts, size_t buf_stride, + size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, + hid_t UNUSED dset_xfer_plist) { uint8_t *s=NULL, *d=NULL; /*src and dst buf pointers */ uint8_t tmp[8]; /*temporary destination buffer */ @@ -5775,8 +5993,8 @@ H5T_conv_i32le_f64le (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, HRETURN_ERROR (H5E_ARGS, H5E_BADTYPE, FAIL, "not a data type"); } - s = (uint8_t*)buf + (stride?stride:4)*(nelmts-1); - d = (uint8_t*)buf + (stride?stride:8)*(nelmts-1); + s = (uint8_t*)buf + (buf_stride?buf_stride:4)*(nelmts-1); + d = (uint8_t*)buf + (buf_stride?buf_stride:8)*(nelmts-1); for (elmtno=0; elmtno<nelmts; elmtno++) { /* @@ -6057,9 +6275,9 @@ H5T_conv_i32le_f64le (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, if (d==tmp) HDmemcpy (s, d, 8); /* Advance pointers */ - if (stride) { - s -= stride; - d -= stride; + if (buf_stride) { + s -= buf_stride; + d -= buf_stride; } else { s -= 4; d -= 8; diff --git a/src/H5Tpkg.h b/src/H5Tpkg.h index bfd59cf..aa5f667 100644 --- a/src/H5Tpkg.h +++ b/src/H5Tpkg.h @@ -208,321 +208,518 @@ __DLLVAR__ size_t H5T_NATIVE_UINT_FAST64_ALIGN_g; /* Conversion functions */ __DLL__ herr_t H5T_conv_noop(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - size_t nelmts, size_t stride, void *buf, - void *bkg, hid_t dset_xfer_plist); + size_t nelmts, size_t buf_stride, + size_t bkg_stride, void *buf, void *bkg, + hid_t dset_xfer_plist); __DLL__ herr_t H5T_conv_order(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - size_t nelmts, size_t stride, void *_buf, - void *bkg, hid_t dset_xfer_plist); + size_t nelmts, size_t buf_stride, + size_t bkg_stride, void *_buf, void *bkg, + hid_t dset_xfer_plist); __DLL__ herr_t H5T_conv_struct(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - size_t nelmts, size_t stride, void *_buf, - void *bkg, hid_t dset_xfer_plist); + size_t nelmts, size_t buf_stride, + size_t bkg_stride, void *_buf, void *bkg, + hid_t dset_xfer_plist); __DLL__ herr_t H5T_conv_struct_opt(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, - size_t stride, void *_buf, void *bkg, hid_t dset_xfer_plist); + size_t buf_stride, size_t bkg_stride, + void *_buf, void *bkg, + hid_t dset_xfer_plist); __DLL__ herr_t H5T_conv_enum(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - size_t nelmts, size_t stride, void *buf, - void *bkg, hid_t dset_xfer_plist); + size_t nelmts, size_t buf_stride, + size_t bkg_stride, void *buf, void *bkg, + hid_t dset_xfer_plist); __DLL__ herr_t H5T_conv_vlen(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - size_t nelmts, size_t stride, void *buf, - void *bkg, hid_t dset_xfer_plist); + size_t nelmts, size_t buf_stride, + size_t bkg_stride, void *buf, void *bkg, + hid_t dset_xfer_plist); __DLL__ herr_t H5T_conv_i_i(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - size_t nelmts, size_t stride, void *_buf, - void *bkg, hid_t dset_xfer_plist); + size_t nelmts, size_t buf_stride, + size_t bkg_stride, void *_buf, void *bkg, + hid_t dset_xfer_plist); __DLL__ herr_t H5T_conv_f_f(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - size_t nelmts, size_t stride, void *_buf, - void *bkg, hid_t dset_xfer_plist); + size_t nelmts, size_t buf_stride, + size_t bkg_stride, void *_buf, void *bkg, + hid_t dset_xfer_plist); __DLL__ herr_t H5T_conv_s_s(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - size_t nelmts, size_t stride, void *_buf, - void *bkg, hid_t dset_xfer_plist); + size_t nelmts, size_t buf_stride, + size_t bkg_stride, void *_buf, void *bkg, + hid_t dset_xfer_plist); __DLL__ herr_t H5T_conv_b_b(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - size_t nelmts, size_t stride, void *_buf, - void *bkg, hid_t dset_xfer_plist); + size_t nelmts, size_t buf_stride, + size_t bkg_stride, void *_buf, void *bkg, + hid_t dset_xfer_plist); __DLL__ herr_t H5T_conv_schar_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, - size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist); + size_t buf_stride, size_t bkg_stride, + void *buf, void *bkg, + hid_t dset_xfer_plist); __DLL__ herr_t H5T_conv_uchar_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, - size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist); + size_t buf_stride, size_t bkg_stride, + void *buf, void *bkg, + hid_t dset_xfer_plist); __DLL__ herr_t H5T_conv_schar_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, - size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist); + size_t buf_stride, size_t bkg_stride, + void *buf, void *bkg, + hid_t dset_xfer_plist); __DLL__ herr_t H5T_conv_schar_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, - size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist); + size_t buf_stride, size_t bkg_stride, + void *buf, void *bkg, + hid_t dset_xfer_plist); __DLL__ herr_t H5T_conv_uchar_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, - size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist); + size_t buf_stride, size_t bkg_stride, + void *buf, void *bkg, + hid_t dset_xfer_plist); __DLL__ herr_t H5T_conv_uchar_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, - size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist); + size_t buf_stride, size_t bkg_stride, + void *buf, void *bkg, + hid_t dset_xfer_plist); __DLL__ herr_t H5T_conv_schar_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, - size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist); + size_t buf_stride, size_t bkg_stride, + void *buf, void *bkg, + hid_t dset_xfer_plist); __DLL__ herr_t H5T_conv_schar_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, - size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist); + size_t buf_stride, size_t bkg_stride, + void *buf, void *bkg, + hid_t dset_xfer_plist); __DLL__ herr_t H5T_conv_uchar_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, - size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist); + size_t buf_stride, size_t bkg_stride, + void *buf, void *bkg, + hid_t dset_xfer_plist); __DLL__ herr_t H5T_conv_uchar_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, - size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist); + size_t buf_stride, size_t bkg_stride, + void *buf, void *bkg, + hid_t dset_xfer_plist); __DLL__ herr_t H5T_conv_schar_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, - size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist); + size_t buf_stride, size_t bkg_stride, + void *buf, void *bkg, + hid_t dset_xfer_plist); __DLL__ herr_t H5T_conv_schar_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, - size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist); + size_t buf_stride, size_t bkg_stride, + void *buf, void *bkg, + hid_t dset_xfer_plist); __DLL__ herr_t H5T_conv_uchar_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, - size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist); + size_t buf_stride, size_t bkg_stride, + void *buf, void *bkg, + hid_t dset_xfer_plist); __DLL__ herr_t H5T_conv_uchar_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, - size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist); + size_t buf_stride, size_t bkg_stride, + void *buf, void *bkg, + hid_t dset_xfer_plist); __DLL__ herr_t H5T_conv_schar_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, - size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist); + size_t buf_stride, size_t bkg_stride, + void *buf, void *bkg, + hid_t dset_xfer_plist); __DLL__ herr_t H5T_conv_schar_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, - size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist); + size_t buf_stride, size_t bkg_stride, + void *buf, void *bkg, + hid_t dset_xfer_plist); __DLL__ herr_t H5T_conv_uchar_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, - size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist); + size_t buf_stride, size_t bkg_stride, + void *buf, void *bkg, + hid_t dset_xfer_plist); __DLL__ herr_t H5T_conv_uchar_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, - size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist); + size_t buf_stride, size_t bkg_stride, + void *buf, void *bkg, + hid_t dset_xfer_plist); __DLL__ herr_t H5T_conv_short_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, - size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist); + size_t buf_stride, size_t bkg_stride, + void *buf, void *bkg, + hid_t dset_xfer_plist); __DLL__ herr_t H5T_conv_short_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, - size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist); + size_t buf_stride, size_t bkg_stride, + void *buf, void *bkg, + hid_t dset_xfer_plist); __DLL__ herr_t H5T_conv_ushort_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, - size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist); + size_t buf_stride, size_t bkg_stride, + void *buf, void *bkg, + hid_t dset_xfer_plist); __DLL__ herr_t H5T_conv_ushort_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, - size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist); + size_t buf_stride, size_t bkg_stride, + void *buf, void *bkg, + hid_t dset_xfer_plist); __DLL__ herr_t H5T_conv_short_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, - size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist); + size_t buf_stride, size_t bkg_stride, + void *buf, void *bkg, + hid_t dset_xfer_plist); __DLL__ herr_t H5T_conv_ushort_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, - size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist); + size_t buf_stride, size_t bkg_stride, + void *buf, void *bkg, + hid_t dset_xfer_plist); __DLL__ herr_t H5T_conv_short_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, - size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist); + size_t buf_stride, size_t bkg_stride, + void *buf, void *bkg, + hid_t dset_xfer_plist); __DLL__ herr_t H5T_conv_short_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, - size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist); + size_t buf_stride, size_t bkg_stride, + void *buf, void *bkg, + hid_t dset_xfer_plist); __DLL__ herr_t H5T_conv_ushort_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, - size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist); + size_t buf_stride, size_t bkg_stride, + void *buf, void *bkg, + hid_t dset_xfer_plist); __DLL__ herr_t H5T_conv_ushort_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, - size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist); + size_t buf_stride, size_t bkg_stride, + void *buf, void *bkg, + hid_t dset_xfer_plist); __DLL__ herr_t H5T_conv_short_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, - size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist); + size_t buf_stride, size_t bkg_stride, + void *buf, void *bkg, + hid_t dset_xfer_plist); __DLL__ herr_t H5T_conv_short_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, - size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist); + size_t buf_stride, size_t bkg_stride, + void *buf, void *bkg, + hid_t dset_xfer_plist); __DLL__ herr_t H5T_conv_ushort_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, - size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist); + size_t buf_stride, size_t bkg_stride, + void *buf, void *bkg, + hid_t dset_xfer_plist); __DLL__ herr_t H5T_conv_ushort_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, - size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist); + size_t buf_stride, size_t bkg_stride, + void *buf, void *bkg, + hid_t dset_xfer_plist); __DLL__ herr_t H5T_conv_short_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, - size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist); + size_t buf_stride, size_t bkg_stride, + void *buf, void *bkg, + hid_t dset_xfer_plist); __DLL__ herr_t H5T_conv_short_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, - size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist); + size_t buf_stride, size_t bkg_stride, + void *buf, void *bkg, + hid_t dset_xfer_plist); __DLL__ herr_t H5T_conv_ushort_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, - size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist); + size_t buf_stride, size_t bkg_stride, + void *buf, void *bkg, + hid_t dset_xfer_plist); __DLL__ herr_t H5T_conv_ushort_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, - size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist); + size_t buf_stride, size_t bkg_stride, + void *buf, void *bkg, + hid_t dset_xfer_plist); __DLL__ herr_t H5T_conv_int_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, - size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist); + size_t buf_stride, size_t bkg_stride, + void *buf, void *bkg, + hid_t dset_xfer_plist); __DLL__ herr_t H5T_conv_int_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, - size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist); + size_t buf_stride, size_t bkg_stride, + void *buf, void *bkg, + hid_t dset_xfer_plist); __DLL__ herr_t H5T_conv_uint_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, - size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist); + size_t buf_stride, size_t bkg_stride, + void *buf, void *bkg, + hid_t dset_xfer_plist); __DLL__ herr_t H5T_conv_uint_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, - size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist); + size_t buf_stride, size_t bkg_stride, + void *buf, void *bkg, + hid_t dset_xfer_plist); __DLL__ herr_t H5T_conv_int_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, - size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist); + size_t buf_stride, size_t bkg_stride, + void *buf, void *bkg, + hid_t dset_xfer_plist); __DLL__ herr_t H5T_conv_int_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, - size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist); + size_t buf_stride, size_t bkg_stride, + void *buf, void *bkg, + hid_t dset_xfer_plist); __DLL__ herr_t H5T_conv_uint_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, - size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist); + size_t buf_stride, size_t bkg_stride, + void *buf, void *bkg, + hid_t dset_xfer_plist); __DLL__ herr_t H5T_conv_uint_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, - size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist); + size_t buf_stride, size_t bkg_stride, + void *buf, void *bkg, + hid_t dset_xfer_plist); __DLL__ herr_t H5T_conv_int_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, - size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist); + size_t buf_stride, size_t bkg_stride, + void *buf, void *bkg, + hid_t dset_xfer_plist); __DLL__ herr_t H5T_conv_uint_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, - size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist); + size_t buf_stride, size_t bkg_stride, + void *buf, void *bkg, + hid_t dset_xfer_plist); __DLL__ herr_t H5T_conv_int_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, - size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist); + size_t buf_stride, size_t bkg_stride, + void *buf, void *bkg, + hid_t dset_xfer_plist); __DLL__ herr_t H5T_conv_int_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, - size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist); + size_t buf_stride, size_t bkg_stride, + void *buf, void *bkg, + hid_t dset_xfer_plist); __DLL__ herr_t H5T_conv_uint_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, - size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist); + size_t buf_stride, size_t bkg_stride, + void *buf, void *bkg, + hid_t dset_xfer_plist); __DLL__ herr_t H5T_conv_uint_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, - size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist); + size_t buf_stride, size_t bkg_stride, + void *buf, void *bkg, + hid_t dset_xfer_plist); __DLL__ herr_t H5T_conv_int_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, - size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist); + size_t buf_stride, size_t bkg_stride, + void *buf, void *bkg, + hid_t dset_xfer_plist); __DLL__ herr_t H5T_conv_int_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, - size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist); + size_t buf_stride, size_t bkg_stride, + void *buf, void *bkg, + hid_t dset_xfer_plist); __DLL__ herr_t H5T_conv_uint_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, - size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist); + size_t buf_stride, size_t bkg_stride, + void *buf, void *bkg, + hid_t dset_xfer_plist); __DLL__ herr_t H5T_conv_uint_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, - size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist); + size_t buf_stride, size_t bkg_stride, + void *buf, void *bkg, + hid_t dset_xfer_plist); __DLL__ herr_t H5T_conv_long_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, - size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist); + size_t buf_stride, size_t bkg_stride, + void *buf, void *bkg, + hid_t dset_xfer_plist); __DLL__ herr_t H5T_conv_long_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, - size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist); + size_t buf_stride, size_t bkg_stride, + void *buf, void *bkg, + hid_t dset_xfer_plist); __DLL__ herr_t H5T_conv_ulong_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, - size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist); + size_t buf_stride, size_t bkg_stride, + void *buf, void *bkg, + hid_t dset_xfer_plist); __DLL__ herr_t H5T_conv_ulong_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, - size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist); + size_t buf_stride, size_t bkg_stride, + void *buf, void *bkg, + hid_t dset_xfer_plist); __DLL__ herr_t H5T_conv_long_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, - size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist); + size_t buf_stride, size_t bkg_stride, + void *buf, void *bkg, + hid_t dset_xfer_plist); __DLL__ herr_t H5T_conv_long_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, - size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist); + size_t buf_stride, size_t bkg_stride, + void *buf, void *bkg, + hid_t dset_xfer_plist); __DLL__ herr_t H5T_conv_ulong_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, - size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist); + size_t buf_stride, size_t bkg_stride, + void *buf, void *bkg, + hid_t dset_xfer_plist); __DLL__ herr_t H5T_conv_ulong_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, - size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist); + size_t buf_stride, size_t bkg_stride, + void *buf, void *bkg, + hid_t dset_xfer_plist); __DLL__ herr_t H5T_conv_long_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, - size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist); + size_t buf_stride, size_t bkg_stride, + void *buf, void *bkg, + hid_t dset_xfer_plist); __DLL__ herr_t H5T_conv_long_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, - size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist); + size_t buf_stride, size_t bkg_stride, + void *buf, void *bkg, + hid_t dset_xfer_plist); __DLL__ herr_t H5T_conv_ulong_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, - size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist); + size_t buf_stride, size_t bkg_stride, + void *buf, void *bkg, + hid_t dset_xfer_plist); __DLL__ herr_t H5T_conv_ulong_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, - size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist); + size_t buf_stride, size_t bkg_stride, + void *buf, void *bkg, + hid_t dset_xfer_plist); __DLL__ herr_t H5T_conv_long_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, - size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist); + size_t buf_stride, size_t bkg_stride, + void *buf, void *bkg, + hid_t dset_xfer_plist); __DLL__ herr_t H5T_conv_ulong_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, - size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist); + size_t buf_stride, size_t bkg_stride, + void *buf, void *bkg, + hid_t dset_xfer_plist); __DLL__ herr_t H5T_conv_long_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, - size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist); + size_t buf_stride, size_t bkg_stride, + void *buf, void *bkg, + hid_t dset_xfer_plist); __DLL__ herr_t H5T_conv_long_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, - size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist); + size_t buf_stride, size_t bkg_stride, + void *buf, void *bkg, + hid_t dset_xfer_plist); __DLL__ herr_t H5T_conv_ulong_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, - size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist); + size_t buf_stride, size_t bkg_stride, + void *buf, void *bkg, + hid_t dset_xfer_plist); __DLL__ herr_t H5T_conv_ulong_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, - size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist); + size_t buf_stride, size_t bkg_stride, + void *buf, void *bkg, + hid_t dset_xfer_plist); __DLL__ herr_t H5T_conv_llong_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, - size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist); + size_t buf_stride, size_t bkg_stride, + void *buf, void *bkg, + hid_t dset_xfer_plist); __DLL__ herr_t H5T_conv_llong_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, - size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist); + size_t buf_stride, size_t bkg_stride, + void *buf, void *bkg, + hid_t dset_xfer_plist); __DLL__ herr_t H5T_conv_ullong_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, - size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist); + size_t buf_stride, size_t bkg_stride, + void *buf, void *bkg, + hid_t dset_xfer_plist); __DLL__ herr_t H5T_conv_ullong_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, - size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist); + size_t buf_stride, size_t bkg_stride, + void *buf, void *bkg, + hid_t dset_xfer_plist); __DLL__ herr_t H5T_conv_llong_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, - size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist); + size_t buf_stride, size_t bkg_stride, + void *buf, void *bkg, + hid_t dset_xfer_plist); __DLL__ herr_t H5T_conv_llong_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, - size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist); + size_t buf_stride, size_t bkg_stride, + void *buf, void *bkg, + hid_t dset_xfer_plist); __DLL__ herr_t H5T_conv_ullong_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, - size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist); + size_t buf_stride, size_t bkg_stride, + void *buf, void *bkg, + hid_t dset_xfer_plist); __DLL__ herr_t H5T_conv_ullong_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, - size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist); + size_t buf_stride, size_t bkg_stride, + void *buf, void *bkg, + hid_t dset_xfer_plist); __DLL__ herr_t H5T_conv_llong_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, - size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist); + size_t buf_stride, size_t bkg_stride, + void *buf, void *bkg, + hid_t dset_xfer_plist); __DLL__ herr_t H5T_conv_llong_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, - size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist); + size_t buf_stride, size_t bkg_stride, + void *buf, void *bkg, + hid_t dset_xfer_plist); __DLL__ herr_t H5T_conv_ullong_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, - size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist); + size_t buf_stride, size_t bkg_stride, + void *buf, void *bkg, + hid_t dset_xfer_plist); __DLL__ herr_t H5T_conv_ullong_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, - size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist); + size_t buf_stride, size_t bkg_stride, + void *buf, void *bkg, + hid_t dset_xfer_plist); __DLL__ herr_t H5T_conv_llong_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, - size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist); + size_t buf_stride, size_t bkg_stride, + void *buf, void *bkg, + hid_t dset_xfer_plist); __DLL__ herr_t H5T_conv_llong_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, - size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist); + size_t buf_stride, size_t bkg_stride, + void *buf, void *bkg, + hid_t dset_xfer_plist); __DLL__ herr_t H5T_conv_ullong_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, - size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist); + size_t buf_stride, size_t bkg_stride, + void *buf, void *bkg, + hid_t dset_xfer_plist); __DLL__ herr_t H5T_conv_ullong_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, - size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist); + size_t buf_stride, size_t bkg_stride, + void *buf, void *bkg, + hid_t dset_xfer_plist); __DLL__ herr_t H5T_conv_llong_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, - size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist); + size_t buf_stride, size_t bkg_stride, + void *buf, void *bkg, + hid_t dset_xfer_plist); __DLL__ herr_t H5T_conv_ullong_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, - size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist); + size_t buf_stride, size_t bkg_stride, + void *buf, void *bkg, + hid_t dset_xfer_plist); __DLL__ herr_t H5T_conv_float_double(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, - size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist); + size_t buf_stride, size_t bkg_stride, + void *buf, void *bkg, + hid_t dset_xfer_plist); __DLL__ herr_t H5T_conv_double_float(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, - size_t stride, void *buf, void *bkg, hid_t dset_xfer_plist); + size_t buf_stride, size_t bkg_stride, + void *buf, void *bkg, + hid_t dset_xfer_plist); __DLL__ herr_t H5T_conv_i32le_f64le(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, - size_t stride, void *_buf, void *bkg, hid_t dset_xfer_plist); + size_t buf_stride, size_t bkg_stride, + void *_buf, void *bkg, + hid_t dset_xfer_plist); /* Bit twiddling functions */ __DLL__ void H5T_bit_copy(uint8_t *dst, size_t dst_offset, const uint8_t *src, diff --git a/src/H5Tprivate.h b/src/H5Tprivate.h index 7ce7f67..749be63 100644 --- a/src/H5Tprivate.h +++ b/src/H5Tprivate.h @@ -97,8 +97,8 @@ __DLL__ H5T_path_t *H5T_path_find(const H5T_t *src, const H5T_t *dst, __DLL__ herr_t H5T_sort_value(H5T_t *dt, int *map); __DLL__ herr_t H5T_sort_name(H5T_t *dt, int *map); __DLL__ herr_t H5T_convert(H5T_path_t *tpath, hid_t src_id, hid_t dst_id, - size_t nelmts, size_t stride, void *buf, void *bkg, - hid_t dset_xfer_plist); + size_t nelmts, size_t buf_stride, size_t bkg_stride, + void *buf, void *bkg, hid_t dset_xfer_plist); __DLL__ herr_t H5T_set_size(H5T_t *dt, size_t size); __DLL__ herr_t H5T_set_precision(H5T_t *dt, size_t prec); __DLL__ herr_t H5T_set_offset(H5T_t *dt, size_t offset); diff --git a/src/H5Tpublic.h b/src/H5Tpublic.h index c6959ab..9c3e906 100644 --- a/src/H5Tpublic.h +++ b/src/H5Tpublic.h @@ -158,8 +158,9 @@ typedef struct { /* All data type conversion functions are... */ typedef herr_t (*H5T_conv_t) (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, - size_t nelmts, size_t stride, void *buf, - void *bkg, hid_t dset_xfer_plist); + size_t nelmts, size_t buf_stride, + size_t bkg_stride, void *buf, void *bkg, + hid_t dset_xfer_plist); /* * If an error occurs during a data type conversion then the function diff --git a/test/dtypes.c b/test/dtypes.c index 2c0e178..647f323 100644 --- a/test/dtypes.c +++ b/test/dtypes.c @@ -751,7 +751,105 @@ test_compound_4(void) error: return 1; } + + +/*------------------------------------------------------------------------- + * Function: test_compound_5 + * + * Purpose: Many versions of HDF5 have a bug in the optimized compound + * datatype conversion function, H5T_conv_struct_opt(), which + * is triggered when the top-level type contains a struct + * which must undergo a conversion. + * + * Return: Success: 0 + * + * Failure: number of errors + * + * Programmer: Robb Matzke + * Thursday, June 17, 1999 + * + * Modifications: + * + *------------------------------------------------------------------------- + */ +static int +test_compound_5(void) +{ + typedef struct { + char name[16]; + short tdim; + short coll_ids[4]; + } src_type_t; + + typedef struct { + char name[16]; + short tdim; + int coll_ids[4]; + } dst_type_t; + + hsize_t dims[1] = {4}; + hid_t src_type, dst_type, short_array, int_array, string; + src_type_t src[2] = {{"one", 102, {104, 105, 106, 107}}, + {"two", 202, {204, 205, 206, 207}}}; + dst_type_t *dst; + void *buf = calloc(2, sizeof(dst_type_t)); + void *bkg = calloc(2, sizeof(dst_type_t)); + +#if 1 + TESTING("optimized struct converter"); +#else + /* Turn off optimized compound conversion function to work around + * the problem. */ + TESTING("optimized struct converter bug workaround"); + H5Tunregister(H5T_PERS_DONTCARE, "struct(opt)", -1, -1, NULL); +#endif + + /* Build datatypes */ + short_array = H5Tcreate(H5T_COMPOUND, 4*sizeof(short)); + H5Tinsert_array(short_array, "_", 0, 1, dims, NULL, H5T_NATIVE_SHORT); + + int_array = H5Tcreate(H5T_COMPOUND, 4*sizeof(int)); + H5Tinsert_array(int_array, "_", 0, 1, dims, NULL, H5T_NATIVE_INT); + + string = H5Tcopy(H5T_C_S1); + H5Tset_size(string, 16); + + src_type = H5Tcreate(H5T_COMPOUND, sizeof(src_type_t)); + H5Tinsert(src_type, "name", HOFFSET(src_type_t, name), string ); + H5Tinsert(src_type, "tdim", HOFFSET(src_type_t, tdim), H5T_NATIVE_SHORT); + H5Tinsert(src_type, "coll_ids", HOFFSET(src_type_t, coll_ids), short_array ); + + dst_type = H5Tcreate(H5T_COMPOUND, sizeof(dst_type_t)); + H5Tinsert(dst_type, "name", HOFFSET(dst_type_t, name), string ); + H5Tinsert(dst_type, "tdim", HOFFSET(dst_type_t, tdim), H5T_NATIVE_SHORT); + H5Tinsert(dst_type, "coll_ids", HOFFSET(dst_type_t, coll_ids), int_array ); + + /* Convert data */ + memcpy(buf, src, sizeof(src)); + H5Tconvert(src_type, dst_type, 2, buf, bkg, H5P_DEFAULT); + dst = (dst_type_t*)buf; + + /* Cleanup */ + H5Tclose(src_type); + H5Tclose(dst_type); + H5Tclose(string); + H5Tclose(short_array); + H5Tclose(int_array); + + /* Check results */ + if (memcmp(src[1].name, dst[1].name, sizeof(src[1].name)) || + src[1].tdim!=dst[1].tdim || + src[1].coll_ids[0]!=dst[1].coll_ids[0] || + src[1].coll_ids[1]!=dst[1].coll_ids[1] || + src[1].coll_ids[2]!=dst[1].coll_ids[2] || + src[1].coll_ids[3]!=dst[1].coll_ids[3]) { + FAILED(); + return 1; + } + PASSED(); + return 0; +} /*------------------------------------------------------------------------- @@ -1587,8 +1685,9 @@ test_conv_bitfield(void) */ static herr_t convert_opaque(hid_t UNUSED st, hid_t UNUSED dt, H5T_cdata_t *cdata, - size_t UNUSED nelmts, size_t UNUSED stride, void UNUSED *_buf, - void UNUSED *bkg, hid_t dset_xfer_plid) + size_t UNUSED nelmts, size_t UNUSED buf_stride, + size_t UNUSED bkg_stride, void UNUSED *_buf, + void UNUSED *bkg, hid_t UNUSED dset_xfer_plid) { if (H5T_CONV_CONV==cdata->command) num_opaque_conversions_g++; return 0; @@ -3576,6 +3675,7 @@ main(void) nerrors += test_compound_2(); nerrors += test_compound_3(); nerrors += test_compound_4(); + nerrors += test_compound_5(); nerrors += test_conv_int (); nerrors += test_conv_enum_1(); nerrors += test_conv_bitfield(); |