summaryrefslogtreecommitdiffstats
path: root/test/dsets.c
diff options
context:
space:
mode:
authorDana Robinson <43805+derobins@users.noreply.github.com>2023-06-29 19:33:46 (GMT)
committerGitHub <noreply@github.com>2023-06-29 19:33:46 (GMT)
commit39e6bf48c92dda00057e2e19cdeed93f5a07b3c8 (patch)
tree7596e876fd008f38830d04591d49a0328208b0d1 /test/dsets.c
parentfd933f30b1f8cd487ad790ac0b054bb779280a62 (diff)
downloadhdf5-39e6bf48c92dda00057e2e19cdeed93f5a07b3c8.zip
hdf5-39e6bf48c92dda00057e2e19cdeed93f5a07b3c8.tar.gz
hdf5-39e6bf48c92dda00057e2e19cdeed93f5a07b3c8.tar.bz2
Remove HD from HDmem* calls (#3211)
Diffstat (limited to 'test/dsets.c')
-rw-r--r--test/dsets.c86
1 files changed, 43 insertions, 43 deletions
diff --git a/test/dsets.c b/test/dsets.c
index 0679f33..6d8c9dc 100644
--- a/test/dsets.c
+++ b/test/dsets.c
@@ -1821,11 +1821,11 @@ filter_corrupt(unsigned int flags, size_t cd_nelmts, const unsigned int *cd_valu
if (NULL == (data = malloc((size_t)length)))
TEST_ERROR;
- HDmemset(data, (int)value, (size_t)length);
+ memset(data, (int)value, (size_t)length);
if (flags & H5Z_FLAG_REVERSE) { /* Verify data is actually corrupted during read */
dst += offset;
- if (HDmemcmp(data, dst, (size_t)length) != 0)
+ if (memcmp(data, dst, (size_t)length) != 0)
TEST_ERROR;
else {
*buf_size = nbytes;
@@ -1834,7 +1834,7 @@ filter_corrupt(unsigned int flags, size_t cd_nelmts, const unsigned int *cd_valu
} /* end if */
else { /* Write corrupted data */
dst += offset;
- HDmemcpy(dst, data, (size_t)length);
+ memcpy(dst, data, (size_t)length);
*buf_size = nbytes;
ret_value = *buf_size;
} /* end else */
@@ -4336,7 +4336,7 @@ test_nbit_compound_3(hid_t file)
/* Initialize data */
for (i = 0; i < (size_t)size[0]; i++) {
power = HDpow(2.0, 17.0 - 1.0);
- HDmemset(&orig_data[i], 0, sizeof(orig_data[i]));
+ memset(&orig_data[i], 0, sizeof(orig_data[i]));
orig_data[i].i = (int)(HDrandom() % (long)power);
HDstrcpy(orig_data[i].str, "fixed-length C string");
orig_data[i].vl_str = HDstrdup("variable-length C string");
@@ -7143,7 +7143,7 @@ auxread_fdata(hid_t fid, const char *name)
goto error;
if ((rank = H5Sget_simple_extent_ndims(space_id)) < 0)
goto error;
- HDmemset(dims, 0, sizeof dims);
+ memset(dims, 0, sizeof dims);
if (H5Sget_simple_extent_dims(space_id, dims, NULL) < 0)
goto error;
nelmts = 1;
@@ -11336,7 +11336,7 @@ test_single_chunk(hid_t fapl)
if ((did = H5Dopen2(fid, DSET_SINGLE_NOMAX, H5P_DEFAULT)) < 0)
TEST_ERROR;
- HDmemset(rbuf, 0, sizeof(int) * (DSET_DIM1 * DSET_DIM2));
+ memset(rbuf, 0, sizeof(int) * (DSET_DIM1 * DSET_DIM2));
/* Read from dataset */
if (H5Dread(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, t_rbuf) < 0)
@@ -12409,7 +12409,7 @@ test_bt2_hdr_fd(const char *env_h5_driver, hid_t fapl)
TESTING("Version 2 B-tree chunk index header flush dependencies handled correctly");
/* Initialize struct */
- HDmemset(&info, 0, sizeof(info));
+ memset(&info, 0, sizeof(info));
/* Skip this test if SWMR I/O is not supported for the VFD specified
* by the environment variable.
@@ -12563,7 +12563,7 @@ test_storage_size(hid_t fapl)
FAIL_STACK_ERROR;
/* Initialize buffer to zeroes */
- HDmemset(wdata, 0, sizeof(wdata));
+ memset(wdata, 0, sizeof(wdata));
/* write elements to dataset */
if (H5Dwrite(dsid, H5T_NATIVE_INT, sid, sid, H5P_DEFAULT, wdata) < 0)
@@ -12612,7 +12612,7 @@ test_storage_size(hid_t fapl)
FAIL_STACK_ERROR;
/* Initialize buffer to zeroes */
- HDmemset(wdata, 0, sizeof(wdata));
+ memset(wdata, 0, sizeof(wdata));
/* write elements to dataset */
if (H5Dwrite(dsid, H5T_NATIVE_INT, sid, sid, H5P_DEFAULT, wdata) < 0)
@@ -12673,7 +12673,7 @@ test_storage_size(hid_t fapl)
FAIL_STACK_ERROR;
/* Initialize buffer to zeroes */
- HDmemset(wdata, 0, sizeof(wdata));
+ memset(wdata, 0, sizeof(wdata));
/* write elements to dataset */
if (H5Dwrite(dsid, H5T_NATIVE_INT, sid, sid, H5P_DEFAULT, wdata) < 0)
@@ -12734,7 +12734,7 @@ test_storage_size(hid_t fapl)
FAIL_STACK_ERROR;
/* Initialize buffer to zeroes */
- HDmemset(wdata, 0, sizeof(wdata));
+ memset(wdata, 0, sizeof(wdata));
/* write elements to dataset */
if (H5Dwrite(dsid, H5T_NATIVE_INT, sid, sid, H5P_DEFAULT, wdata) < 0)
@@ -12795,7 +12795,7 @@ test_storage_size(hid_t fapl)
FAIL_STACK_ERROR;
/* Initialize buffer to zeroes */
- HDmemset(wdata, 0, sizeof(wdata));
+ memset(wdata, 0, sizeof(wdata));
/* write elements to dataset */
if (H5Dwrite(dsid, H5T_NATIVE_INT, sid, sid, H5P_DEFAULT, wdata) < 0)
@@ -12856,7 +12856,7 @@ test_storage_size(hid_t fapl)
FAIL_STACK_ERROR;
/* Initialize buffer to zeroes */
- HDmemset(wdata, 0, sizeof(wdata));
+ memset(wdata, 0, sizeof(wdata));
/* write elements to dataset */
if (H5Dwrite(dsid, H5T_NATIVE_INT, sid, sid, H5P_DEFAULT, wdata) < 0)
@@ -12917,7 +12917,7 @@ test_storage_size(hid_t fapl)
FAIL_STACK_ERROR;
/* Initialize buffer to zeroes */
- HDmemset(wdata, 0, sizeof(wdata));
+ memset(wdata, 0, sizeof(wdata));
/* write elements to dataset */
if (H5Dwrite(dsid, H5T_NATIVE_INT, sid, sid, H5P_DEFAULT, wdata) < 0)
@@ -13171,14 +13171,14 @@ test_scatter(void)
TEST_ERROR;
/* Initialize dst_buf and expect_dst_buf */
- (void)HDmemset(expect_dst_buf, 0, sizeof(expect_dst_buf));
+ (void)memset(expect_dst_buf, 0, sizeof(expect_dst_buf));
for (i = 0; i < 8; i++)
expect_dst_buf[0][0][i] = src_buf[i];
/* Loop over buffer sizes */
for (src_buf_size = 1; src_buf_size <= 9; src_buf_size++) {
/* Reset dst_buf */
- (void)HDmemset(dst_buf, 0, sizeof(dst_buf));
+ (void)memset(dst_buf, 0, sizeof(dst_buf));
/* Set up scatter info */
scatter_info.src_buf = src_buf;
@@ -13207,7 +13207,7 @@ test_scatter(void)
TEST_ERROR;
/* Initialize expect_dst_buf */
- (void)HDmemset(expect_dst_buf, 0, sizeof(expect_dst_buf));
+ (void)memset(expect_dst_buf, 0, sizeof(expect_dst_buf));
src_i = 0;
for (i = 3; i < 5; i++)
for (j = 2; j < 5; j++)
@@ -13217,7 +13217,7 @@ test_scatter(void)
/* Loop over buffer sizes */
for (src_buf_size = 1; src_buf_size <= 13; src_buf_size++) {
/* Reset dst_buf */
- (void)HDmemset(dst_buf, 0, sizeof(dst_buf));
+ (void)memset(dst_buf, 0, sizeof(dst_buf));
/* Set up scatter info */
scatter_info.src_buf = src_buf;
@@ -13255,7 +13255,7 @@ test_scatter(void)
/* Iterate over block containing selection, checking if each element is in
* selection. Note that the algorithm used here (if statement) would not
* work for overlapping hyperslabs. */
- (void)HDmemset(expect_dst_buf, 0, sizeof(expect_dst_buf));
+ (void)memset(expect_dst_buf, 0, sizeof(expect_dst_buf));
src_i = 0;
for (i = 1; i < 8; i++)
for (j = 1; j < 4; j++)
@@ -13271,7 +13271,7 @@ test_scatter(void)
/* Loop over buffer sizes */
for (src_buf_size = 1; src_buf_size <= 37; src_buf_size++) {
/* Reset dst_buf */
- (void)HDmemset(dst_buf, 0, sizeof(dst_buf));
+ (void)memset(dst_buf, 0, sizeof(dst_buf));
/* Set up scatter info */
scatter_info.src_buf = src_buf;
@@ -13310,7 +13310,7 @@ test_scatter(void)
/* Initialize expect_dst_buf */
/* Iterate over block containing selection, checking if each element is in
* selection. */
- (void)HDmemset(expect_dst_buf, 0, sizeof(expect_dst_buf));
+ (void)memset(expect_dst_buf, 0, sizeof(expect_dst_buf));
src_i = 0;
for (i = 1; i < 4; i++)
for (j = 1; j < 4; j++)
@@ -13326,7 +13326,7 @@ test_scatter(void)
/* Loop over buffer sizes */
for (src_buf_size = 1; src_buf_size <= 17; src_buf_size++) {
/* Reset dst_buf */
- (void)HDmemset(dst_buf, 0, sizeof(dst_buf));
+ (void)memset(dst_buf, 0, sizeof(dst_buf));
/* Set up scatter info */
scatter_info.src_buf = src_buf;
@@ -13351,14 +13351,14 @@ test_scatter(void)
/* Initialize expect_dst_buf */
/* Iterate over block containing selection, checking if each element is in
* selection. */
- (void)HDmemset(expect_dst_buf, 0, sizeof(expect_dst_buf));
+ (void)memset(expect_dst_buf, 0, sizeof(expect_dst_buf));
for (i = 0; i < (int)(sizeof(point) / sizeof(point[0])); i++)
expect_dst_buf[point[i][0]][point[i][1]][point[i][2]] = src_buf[i];
/* Loop over buffer sizes */
for (src_buf_size = 1; src_buf_size <= 5; src_buf_size++) {
/* Reset dst_buf */
- (void)HDmemset(dst_buf, 0, sizeof(dst_buf));
+ (void)memset(dst_buf, 0, sizeof(dst_buf));
/* Set up scatter info */
scatter_info.src_buf = src_buf;
@@ -13489,14 +13489,14 @@ test_gather(void)
TEST_ERROR;
/* Initialize expect_dst_buf */
- (void)HDmemset(expect_dst_buf, 0, sizeof(expect_dst_buf));
+ (void)memset(expect_dst_buf, 0, sizeof(expect_dst_buf));
for (i = 0; i < 8; i++)
expect_dst_buf[i] = src_buf[0][0][i];
/* Loop over buffer sizes */
for (dst_buf_size = 1; dst_buf_size <= 9; dst_buf_size++) {
/* Reset dst_buf */
- (void)HDmemset(dst_buf, 0, sizeof(dst_buf));
+ (void)memset(dst_buf, 0, sizeof(dst_buf));
/* Initialize gather_info */
gather_info.expect_dst_buf = expect_dst_buf;
@@ -13517,7 +13517,7 @@ test_gather(void)
/* Loop over buffer sizes */
for (dst_buf_size = 8; dst_buf_size <= 9; dst_buf_size++) {
/* Reset dst_buf */
- (void)HDmemset(dst_buf, 0, sizeof(dst_buf));
+ (void)memset(dst_buf, 0, sizeof(dst_buf));
/* Gather data */
if (H5Dgather(sid, src_buf, H5T_NATIVE_INT, dst_buf_size * sizeof(dst_buf[0]), dst_buf, NULL, NULL) <
@@ -13533,7 +13533,7 @@ test_gather(void)
/* Test with a dst_buf_size that is not a multiple of the datatype size */
/* Reset dst_buf */
dst_buf_size = 7;
- (void)HDmemset(dst_buf, 0, sizeof(dst_buf));
+ (void)memset(dst_buf, 0, sizeof(dst_buf));
/* Initialize gather_info */
gather_info.expect_dst_buf = expect_dst_buf;
@@ -13563,7 +13563,7 @@ test_gather(void)
TEST_ERROR;
/* Initialize expect_dst_buf */
- (void)HDmemset(expect_dst_buf, 0, sizeof(expect_dst_buf));
+ (void)memset(expect_dst_buf, 0, sizeof(expect_dst_buf));
dst_i = 0;
for (i = 3; i < 5; i++)
for (j = 2; j < 5; j++)
@@ -13573,7 +13573,7 @@ test_gather(void)
/* Loop over buffer sizes */
for (dst_buf_size = 1; dst_buf_size <= 13; dst_buf_size++) {
/* Reset dst_buf */
- (void)HDmemset(dst_buf, 0, sizeof(dst_buf));
+ (void)memset(dst_buf, 0, sizeof(dst_buf));
/* Initialize gather_info */
gather_info.expect_dst_buf = expect_dst_buf;
@@ -13613,7 +13613,7 @@ test_gather(void)
/* Iterate over block containing selection, checking if each element is in
* selection. Note that the algorithm used here (if statement) would not
* work for overlapping hyperslabs. */
- (void)HDmemset(expect_dst_buf, 0, sizeof(expect_dst_buf));
+ (void)memset(expect_dst_buf, 0, sizeof(expect_dst_buf));
dst_i = 0;
for (i = 1; i < 8; i++)
for (j = 1; j < 4; j++)
@@ -13629,7 +13629,7 @@ test_gather(void)
/* Loop over buffer sizes */
for (dst_buf_size = 1; dst_buf_size <= 37; dst_buf_size++) {
/* Reset dst_buf */
- (void)HDmemset(dst_buf, 0, sizeof(dst_buf));
+ (void)memset(dst_buf, 0, sizeof(dst_buf));
/* Initialize gather_info */
gather_info.expect_dst_buf = expect_dst_buf;
@@ -13670,7 +13670,7 @@ test_gather(void)
/* Initialize expect_dst_buf */
/* Iterate over block containing selection, checking if each element is in
* selection. */
- (void)HDmemset(expect_dst_buf, 0, sizeof(expect_dst_buf));
+ (void)memset(expect_dst_buf, 0, sizeof(expect_dst_buf));
dst_i = 0;
for (i = 1; i < 4; i++)
for (j = 1; j < 4; j++)
@@ -13686,7 +13686,7 @@ test_gather(void)
/* Loop over buffer sizes */
for (dst_buf_size = 1; dst_buf_size <= 17; dst_buf_size++) {
/* Reset dst_buf */
- (void)HDmemset(dst_buf, 0, sizeof(dst_buf));
+ (void)memset(dst_buf, 0, sizeof(dst_buf));
/* Initialize gather_info */
gather_info.expect_dst_buf = expect_dst_buf;
@@ -13713,14 +13713,14 @@ test_gather(void)
/* Initialize expect_dst_buf */
/* Iterate over block containing selection, checking if each element is in
* selection. */
- (void)HDmemset(expect_dst_buf, 0, sizeof(expect_dst_buf));
+ (void)memset(expect_dst_buf, 0, sizeof(expect_dst_buf));
for (i = 0; i < (int)(sizeof(point) / sizeof(point[0])); i++)
expect_dst_buf[i] = src_buf[point[i][0]][point[i][1]][point[i][2]];
/* Loop over buffer sizes */
for (dst_buf_size = 1; dst_buf_size <= 5; dst_buf_size++) {
/* Reset dst_buf */
- (void)HDmemset(dst_buf, 0, sizeof(dst_buf));
+ (void)memset(dst_buf, 0, sizeof(dst_buf));
/* Initialize gather_info */
gather_info.expect_dst_buf = expect_dst_buf;
@@ -14031,7 +14031,7 @@ test_gather_error(void)
TEST_ERROR;
/* Initialize expect_dst_buf */
- (void)HDmemset(expect_dst_buf, 0, sizeof(expect_dst_buf));
+ (void)memset(expect_dst_buf, 0, sizeof(expect_dst_buf));
for (i = 0; i < 6; i++)
expect_dst_buf[i] = src_buf[i + 2];
@@ -14904,7 +14904,7 @@ test_h5s_block(void)
FAIL_STACK_ERROR;
/* Reset the memory buffer */
- HDmemset(buf, 0, sizeof(buf));
+ memset(buf, 0, sizeof(buf));
/* Read the entire dataset */
if (H5Dread(dset_id, H5T_NATIVE_INT, H5S_BLOCK, H5S_ALL, H5P_DEFAULT, buf) < 0)
@@ -15082,7 +15082,7 @@ test_h5s_plist(void)
FAIL_STACK_ERROR;
/* Reset the memory buffer */
- HDmemset(buf, 0, sizeof(buf));
+ memset(buf, 0, sizeof(buf));
/* Read the entire dataset */
if (H5Dread(dset_id, H5T_NATIVE_INT, H5S_BLOCK, H5S_ALL, H5P_DEFAULT, buf) < 0)
@@ -15094,7 +15094,7 @@ test_h5s_plist(void)
TEST_ERROR;
/* Reset the memory buffer */
- HDmemset(buf, 0, sizeof(buf));
+ memset(buf, 0, sizeof(buf));
/* Set valid selection in DXPL */
if (H5Pset_dataset_io_hyperslab_selection(dxpl_id, 1, H5S_SELECT_SET, &start, &stride, &count, &block) <
@@ -15111,7 +15111,7 @@ test_h5s_plist(void)
TEST_ERROR;
/* Reset the memory buffer */
- HDmemset(buf, 0, sizeof(buf));
+ memset(buf, 0, sizeof(buf));
/* Check for copying property list w/selection */
if ((dxpl_id_copy = H5Pcopy(dxpl_id)) < 0)
@@ -15309,7 +15309,7 @@ test_0sized_dset_metadata_alloc(hid_t fapl_id)
FAIL_STACK_ERROR;
/* Retrieve & verify the dataset's index info */
- HDmemset(&nat_info, 0, sizeof(nat_info));
+ memset(&nat_info, 0, sizeof(nat_info));
if (H5Oget_native_info(dset_id, &nat_info, H5O_NATIVE_INFO_META_SIZE) < 0)
FAIL_STACK_ERROR;
if (0 != nat_info.meta_size.obj.index_size)
@@ -15348,7 +15348,7 @@ test_0sized_dset_metadata_alloc(hid_t fapl_id)
FAIL_STACK_ERROR;
/* Retrieve & verify the dataset's index info */
- HDmemset(&nat_info, 0, sizeof(nat_info));
+ memset(&nat_info, 0, sizeof(nat_info));
if (H5Oget_native_info(dset_id, &nat_info, H5O_NATIVE_INFO_META_SIZE) < 0)
FAIL_STACK_ERROR;
if (0 == nat_info.meta_size.obj.index_size)