Skip to content

Commit

Permalink
Print HOFFSET for the compound elements; remove memset in H5Dscatgath…
Browse files Browse the repository at this point in the history
…_read()
  • Loading branch information
vchoi-hdfgroup committed Sep 19, 2023
1 parent d18041a commit 111b968
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
3 changes: 0 additions & 3 deletions src/H5Dscatgath.c
Original file line number Diff line number Diff line change
Expand Up @@ -541,9 +541,6 @@ H5D__scatgath_read(const H5D_io_info_t *io_info, const H5D_dset_io_info_t *dset_
(size_t)MIN(dset_info->type_info.request_nelmts, (dset_info->nelmts - smine_start));
}

memset(tmp_buf, 0,
smine_nelmts * MAX(dset_info->type_info.src_type_size, dset_info->type_info.dst_type_size));

/*
* Gather the data from disk into the datatype conversion
* buffer. Also gather data from application to background buffer
Expand Down
7 changes: 7 additions & 0 deletions test/cmpd_dset.c
Original file line number Diff line number Diff line change
Expand Up @@ -1941,6 +1941,13 @@ create_stype4(void)
H5Tinsert(tid, "t", HOFFSET(stype4, t), H5T_NATIVE_LLONG) < 0)
goto error;

printf("HOFFSET for stype4: a=%zu, b=%zu, c=%zu, d=%zu, e=%zu, f=%zu, g=%zu, h=%zu, i=%zu, j=%zu, k=%zu, l=%zu, m=%zu, n=%zu, o=%zu, p=%zu, q=%zu, r=%zu, s=%zu, t=%zu; TOT=%zu\n",
HOFFSET(stype4, a), HOFFSET(stype4, b), HOFFSET(stype4, c), HOFFSET(stype4, d), HOFFSET(stype4, e),\
HOFFSET(stype4, f), HOFFSET(stype4, g), HOFFSET(stype4, h), HOFFSET(stype4, i), HOFFSET(stype4, j),\
HOFFSET(stype4, k), HOFFSET(stype4, l), HOFFSET(stype4, m), HOFFSET(stype4, n), HOFFSET(stype4, o),\
HOFFSET(stype4, p), HOFFSET(stype4, q), HOFFSET(stype4, r), HOFFSET(stype4, s), HOFFSET(stype4, t),
H5Tget_size(tid));

if (H5Tclose(array_dt1) < 0)
goto error;
if (H5Tclose(array_dt2) < 0)
Expand Down

0 comments on commit 111b968

Please sign in to comment.