summaryrefslogtreecommitdiffstats
path: root/test/select_io_dset.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/select_io_dset.c
parentfd933f30b1f8cd487ad790ac0b054bb779280a62 (diff)
downloadhdf5-39e6bf48c92dda00057e2e19cdeed93f5a07b3c8.zip
hdf5-39e6bf48c92dda00057e2e19cdeed93f5a07b3c8.tar.gz
hdf5-39e6bf48c92dda00057e2e19cdeed93f5a07b3c8.tar.bz2
Remove HD from HDmem* calls (#3211)
Diffstat (limited to 'test/select_io_dset.c')
-rw-r--r--test/select_io_dset.c82
1 files changed, 40 insertions, 42 deletions
diff --git a/test/select_io_dset.c b/test/select_io_dset.c
index 361b1d5..2746bcc 100644
--- a/test/select_io_dset.c
+++ b/test/select_io_dset.c
@@ -176,7 +176,7 @@ test_no_type_conv(hid_t fid, unsigned chunked, unsigned dtrans, unsigned mwbuf)
/* Copy wbuf if the library will be modifying it */
if (mwbuf)
- HDmemcpy(wbuf_bak, wbuf, sizeof(wbuf));
+ memcpy(wbuf_bak, wbuf, sizeof(wbuf));
/* Write data to the dataset with/without data transform */
if (H5Dwrite(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, dxpl, wbuf) < 0)
@@ -184,7 +184,7 @@ test_no_type_conv(hid_t fid, unsigned chunked, unsigned dtrans, unsigned mwbuf)
/* Restore wbuf from backup if the library modified it */
if (mwbuf)
- HDmemcpy(wbuf, wbuf_bak, sizeof(wbuf));
+ memcpy(wbuf, wbuf_bak, sizeof(wbuf));
/* Read data from the dataset without data transform set in dxpl */
if (H5Dread(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, ntrans_dxpl, rbuf) < 0)
@@ -316,7 +316,7 @@ test_no_size_change_no_bkg(hid_t fid, unsigned chunked, unsigned mwbuf)
/* Copy wbuf if the library will be modifying it */
if (mwbuf)
- HDmemcpy(wbuf_bak, wbuf, (size_t)(4 * DSET_SELECT_DIM));
+ memcpy(wbuf_bak, wbuf, (size_t)(4 * DSET_SELECT_DIM));
/* Write the data to the dataset with little endian */
if (H5Dwrite(did, H5T_STD_I32LE, H5S_ALL, H5S_ALL, dxpl, wbuf) < 0)
@@ -324,7 +324,7 @@ test_no_size_change_no_bkg(hid_t fid, unsigned chunked, unsigned mwbuf)
/* Restore wbuf from backup if the library modified it */
if (mwbuf)
- HDmemcpy(wbuf, wbuf_bak, (size_t)(4 * DSET_SELECT_DIM));
+ memcpy(wbuf, wbuf_bak, (size_t)(4 * DSET_SELECT_DIM));
/* Read the data from the dataset with little endian */
if (H5Dread(did, H5T_STD_I32LE, H5S_ALL, H5S_ALL, dxpl, rbuf) < 0)
@@ -466,7 +466,7 @@ test_larger_mem_type_no_bkg(hid_t fid, unsigned chunked, unsigned dtrans, unsign
/* Copy wbuf if the library will be modifying it */
if (mwbuf)
- HDmemcpy(wbuf_bak, wbuf, sizeof(wbuf));
+ memcpy(wbuf_bak, wbuf, sizeof(wbuf));
/* Write data to the dataset with/without data transform set in dxpl */
if (H5Dwrite(did, H5T_NATIVE_LONG, H5S_ALL, H5S_ALL, dxpl, wbuf) < 0)
@@ -474,7 +474,7 @@ test_larger_mem_type_no_bkg(hid_t fid, unsigned chunked, unsigned dtrans, unsign
/* Restore wbuf from backup if the library modified it */
if (mwbuf)
- HDmemcpy(wbuf, wbuf_bak, sizeof(wbuf));
+ memcpy(wbuf, wbuf_bak, sizeof(wbuf));
/* Read the data from the dataset without data transform in dxpl */
if (H5Dread(did, H5T_NATIVE_LLONG, H5S_ALL, H5S_ALL, ntrans_dxpl, rbuf) < 0)
@@ -609,7 +609,7 @@ test_smaller_mem_type_no_bkg(hid_t fid, unsigned chunked, unsigned dtrans, unsig
/* Copy wbuf if the library will be modifying it */
if (mwbuf)
- HDmemcpy(wbuf_bak, wbuf, sizeof(wbuf));
+ memcpy(wbuf_bak, wbuf, sizeof(wbuf));
/* Write data to the dataset with/without data transform in dxpl */
if (H5Dwrite(did, H5T_NATIVE_SHORT, H5S_ALL, H5S_ALL, dxpl, wbuf) < 0)
@@ -617,7 +617,7 @@ test_smaller_mem_type_no_bkg(hid_t fid, unsigned chunked, unsigned dtrans, unsig
/* Restore wbuf from backup if the library modified it */
if (mwbuf)
- HDmemcpy(wbuf, wbuf_bak, sizeof(wbuf));
+ memcpy(wbuf, wbuf_bak, sizeof(wbuf));
/* Read data from the dataset without data transform in dxpl */
if (H5Dread(did, H5T_NATIVE_SHORT, H5S_ALL, H5S_ALL, ntrans_dxpl, rbuf) < 0)
@@ -791,7 +791,7 @@ test_cmpd_with_bkg(hid_t fid, unsigned chunked, unsigned mwbuf)
/* Copy wbuf if the library will be modifying it */
if (mwbuf)
- HDmemcpy(s1_wbuf_bak, s1_wbuf, sizeof(s1_t) * DSET_SELECT_DIM);
+ memcpy(s1_wbuf_bak, s1_wbuf, sizeof(s1_t) * DSET_SELECT_DIM);
/* Write all the data to the dataset */
if (H5Dwrite(did, s1_tid, H5S_ALL, H5S_ALL, dxpl, s1_wbuf) < 0)
@@ -799,7 +799,7 @@ test_cmpd_with_bkg(hid_t fid, unsigned chunked, unsigned mwbuf)
/* Restore wbuf from backup if the library modified it */
if (mwbuf)
- HDmemcpy(s1_wbuf, s1_wbuf_bak, sizeof(s1_t) * DSET_SELECT_DIM);
+ memcpy(s1_wbuf, s1_wbuf_bak, sizeof(s1_t) * DSET_SELECT_DIM);
/* Read all the data from the dataset */
if (H5Dread(did, s1_tid, H5S_ALL, H5S_ALL, dxpl, s1_rbuf) < 0)
@@ -837,7 +837,7 @@ test_cmpd_with_bkg(hid_t fid, unsigned chunked, unsigned mwbuf)
/* Copy wbuf if the library will be modifying it */
if (mwbuf)
- HDmemcpy(s1_wbuf_bak, s1_wbuf, sizeof(s1_t) * DSET_SELECT_DIM);
+ memcpy(s1_wbuf_bak, s1_wbuf, sizeof(s1_t) * DSET_SELECT_DIM);
/* Write s1_wbuf to the dataset with only subset members in ss_tid */
if (H5Dwrite(did, ss_ac_tid, H5S_ALL, H5S_ALL, dxpl, s1_wbuf) < 0)
@@ -845,7 +845,7 @@ test_cmpd_with_bkg(hid_t fid, unsigned chunked, unsigned mwbuf)
/* Restore wbuf from backup if the library modified it */
if (mwbuf)
- HDmemcpy(s1_wbuf, s1_wbuf_bak, sizeof(s1_t) * DSET_SELECT_DIM);
+ memcpy(s1_wbuf, s1_wbuf_bak, sizeof(s1_t) * DSET_SELECT_DIM);
/* Read the whole compound back */
if (H5Dread(did, ss_ac_tid, H5S_ALL, H5S_ALL, dxpl, s1_rbuf) < 0)
@@ -923,14 +923,14 @@ test_cmpd_with_bkg(hid_t fid, unsigned chunked, unsigned mwbuf)
/* Copy wbuf if the library will be modifying it */
if (mwbuf)
- HDmemcpy(s2_wbuf_bak, s2_wbuf, sizeof(s2_t) * DSET_SELECT_DIM);
+ memcpy(s2_wbuf_bak, s2_wbuf, sizeof(s2_t) * DSET_SELECT_DIM);
if (H5Dwrite(did, s2_tid, H5S_ALL, H5S_ALL, dxpl, s2_wbuf) < 0)
FAIL_STACK_ERROR;
/* Restore wbuf from backup if the library modified it */
if (mwbuf)
- HDmemcpy(s2_wbuf, s2_wbuf_bak, sizeof(s2_t) * DSET_SELECT_DIM);
+ memcpy(s2_wbuf, s2_wbuf_bak, sizeof(s2_t) * DSET_SELECT_DIM);
/* Read it back */
if (H5Dread(did, s2_tid, H5S_ALL, H5S_ALL, dxpl, s2_rbuf) < 0) {
@@ -1159,7 +1159,7 @@ test_multi_dsets_no_bkg(hid_t fid, unsigned chunked, unsigned dtrans, unsigned m
/* Copy wbuf if the library will be modifying it */
if (mwbuf)
- HDmemcpy(total_wbuf_bak, total_wbuf, ndsets * DSET_SELECT_DIM * sizeof(int));
+ memcpy(total_wbuf_bak, total_wbuf, ndsets * DSET_SELECT_DIM * sizeof(int));
/* Write data to the dataset with/without data transform */
if (H5Dwrite_multi(ndsets, dset_dids, mem_tids, mem_sids, file_sids, dxpl, wbufs) < 0)
@@ -1167,7 +1167,7 @@ test_multi_dsets_no_bkg(hid_t fid, unsigned chunked, unsigned dtrans, unsigned m
/* Restore wbuf from backup if the library modified it */
if (mwbuf)
- HDmemcpy(total_wbuf, total_wbuf_bak, ndsets * DSET_SELECT_DIM * sizeof(int));
+ memcpy(total_wbuf, total_wbuf_bak, ndsets * DSET_SELECT_DIM * sizeof(int));
/* Read data from the dataset (if dtrans, without data transform set in dxpl) */
if (H5Dread_multi(ndsets, dset_dids, mem_tids, mem_sids, file_sids, ntrans_dxpl, rbufs) < 0)
@@ -1224,7 +1224,7 @@ test_multi_dsets_no_bkg(hid_t fid, unsigned chunked, unsigned dtrans, unsigned m
/* Copy wbuf if the library will be modifying it */
if (mwbuf)
- HDmemcpy(total_lwbuf_bak, total_lwbuf, ndsets * DSET_SELECT_DIM * sizeof(long));
+ memcpy(total_lwbuf_bak, total_lwbuf, ndsets * DSET_SELECT_DIM * sizeof(long));
/* Write data to the dataset with/without data transform */
if (H5Dwrite_multi(ndsets, dset_dids, mem_tids, mem_sids, file_sids, dxpl, wbufs) < 0)
@@ -1232,7 +1232,7 @@ test_multi_dsets_no_bkg(hid_t fid, unsigned chunked, unsigned dtrans, unsigned m
/* Restore wbuf from backup if the library modified it */
if (mwbuf)
- HDmemcpy(total_lwbuf, total_lwbuf_bak, ndsets * DSET_SELECT_DIM * sizeof(long));
+ memcpy(total_lwbuf, total_lwbuf_bak, ndsets * DSET_SELECT_DIM * sizeof(long));
/* Read data from the dataset (if dtrans, with data transform again in dxpl) */
if (H5Dread_multi(ndsets, dset_dids, mem_tids, mem_sids, file_sids, dxpl, rbufs) < 0)
@@ -1484,14 +1484,14 @@ test_multi_dsets_cmpd_with_bkg(hid_t fid, unsigned chunked, unsigned mwbuf)
/* Copy wbuf if the library will be modifying it */
if (mwbuf)
- HDmemcpy(total_wbuf_bak, total_wbuf, buf_size);
+ memcpy(total_wbuf_bak, total_wbuf, buf_size);
if (H5Dwrite_multi(ndsets, dset_dids, mem_tids, mem_sids, file_sids, dxpl, wbufs) < 0)
TEST_ERROR;
/* Restore wbuf from backup if the library modified it */
if (mwbuf)
- HDmemcpy(total_wbuf, total_wbuf_bak, buf_size);
+ memcpy(total_wbuf, total_wbuf_bak, buf_size);
if (H5Dread_multi(ndsets, dset_dids, mem_tids, mem_sids, file_sids, dxpl, rbufs) < 0)
TEST_ERROR;
@@ -1543,14 +1543,14 @@ test_multi_dsets_cmpd_with_bkg(hid_t fid, unsigned chunked, unsigned mwbuf)
/* Copy wbuf if the library will be modifying it */
if (mwbuf)
- HDmemcpy(total_wbuf_bak, total_wbuf, buf_size);
+ memcpy(total_wbuf_bak, total_wbuf, buf_size);
if (H5Dwrite_multi(ndsets, dset_dids, mem_tids, mem_sids, file_sids, dxpl, wbufs) < 0)
TEST_ERROR;
/* Restore wbuf from backup if the library modified it */
if (mwbuf)
- HDmemcpy(total_wbuf, total_wbuf_bak, buf_size);
+ memcpy(total_wbuf, total_wbuf_bak, buf_size);
if (H5Dread_multi(ndsets, dset_dids, mem_tids, mem_sids, file_sids, dxpl, rbufs) < 0)
TEST_ERROR;
@@ -1701,14 +1701,14 @@ test_multi_dsets_cmpd_with_bkg(hid_t fid, unsigned chunked, unsigned mwbuf)
/* Copy wbuf if the library will be modifying it */
if (mwbuf)
- HDmemcpy(s2_total_wbuf_bak, s2_total_wbuf, s2_buf_size);
+ memcpy(s2_total_wbuf_bak, s2_total_wbuf, s2_buf_size);
if (H5Dwrite_multi(ndsets, dset_dids, mem_tids, mem_sids, file_sids, dxpl, wbufs) < 0)
TEST_ERROR;
/* Restore wbuf from backup if the library modified it */
if (mwbuf)
- HDmemcpy(s2_total_wbuf, s2_total_wbuf_bak, s2_buf_size);
+ memcpy(s2_total_wbuf, s2_total_wbuf_bak, s2_buf_size);
if (H5Dread_multi(ndsets, dset_dids, mem_tids, mem_sids, file_sids, dxpl, rbufs) < 0)
TEST_ERROR;
@@ -1911,7 +1911,7 @@ test_multi_dsets_size_change_no_bkg(hid_t fid, unsigned chunked, unsigned mwbuf)
/* Copy wbuf if the library will be modifying it */
if (mwbuf)
- HDmemcpy(total_wbuf_bak, total_wbuf, buf_size);
+ memcpy(total_wbuf_bak, total_wbuf, buf_size);
/* Write data to the dataset */
if (H5Dwrite_multi(ndsets, dset_dids, mem_tids, mem_sids, file_sids, dxpl, wbufs) < 0)
@@ -1919,7 +1919,7 @@ test_multi_dsets_size_change_no_bkg(hid_t fid, unsigned chunked, unsigned mwbuf)
/* Restore wbuf from backup if the library modified it */
if (mwbuf)
- HDmemcpy(total_wbuf, total_wbuf_bak, buf_size);
+ memcpy(total_wbuf, total_wbuf_bak, buf_size);
/* Read data from the dataset */
if (H5Dread_multi(ndsets, dset_dids, mem_tids, mem_sids, file_sids, dxpl, rbufs) < 0)
@@ -1982,7 +1982,7 @@ test_multi_dsets_size_change_no_bkg(hid_t fid, unsigned chunked, unsigned mwbuf)
/* Copy wbuf if the library will be modifying it */
if (mwbuf)
- HDmemcpy(total_lwbuf_bak, total_lwbuf, buf_size);
+ memcpy(total_lwbuf_bak, total_lwbuf, buf_size);
/* Write data to the dataset */
if (H5Dwrite_multi(ndsets, dset_dids, mem_tids, mem_sids, file_sids, dxpl, wbufs) < 0)
@@ -1990,7 +1990,7 @@ test_multi_dsets_size_change_no_bkg(hid_t fid, unsigned chunked, unsigned mwbuf)
/* Restore wbuf from backup if the library modified it */
if (mwbuf)
- HDmemcpy(total_lwbuf, total_lwbuf_bak, buf_size);
+ memcpy(total_lwbuf, total_lwbuf_bak, buf_size);
/* Read data from the dataset */
if (H5Dread_multi(ndsets, dset_dids, mem_tids, mem_sids, file_sids, dxpl, rbufs) < 0)
@@ -2051,7 +2051,7 @@ test_multi_dsets_size_change_no_bkg(hid_t fid, unsigned chunked, unsigned mwbuf)
/* Copy wbuf if the library will be modifying it */
if (mwbuf)
- HDmemcpy(total_swbuf_bak, total_swbuf, buf_size);
+ memcpy(total_swbuf_bak, total_swbuf, buf_size);
/* Write data to the dataset */
if (H5Dwrite_multi(ndsets, dset_dids, mem_tids, mem_sids, file_sids, dxpl, wbufs) < 0)
@@ -2059,7 +2059,7 @@ test_multi_dsets_size_change_no_bkg(hid_t fid, unsigned chunked, unsigned mwbuf)
/* Restore wbuf from backup if the library modified it */
if (mwbuf)
- HDmemcpy(total_swbuf, total_swbuf_bak, buf_size);
+ memcpy(total_swbuf, total_swbuf_bak, buf_size);
/* Read data from the dataset */
if (H5Dread_multi(ndsets, dset_dids, mem_tids, mem_sids, file_sids, dxpl, rbufs) < 0)
@@ -2515,12 +2515,11 @@ test_multi_dsets_all(int niter, hid_t fid, unsigned chunked, unsigned mwbuf)
/* Copy wbufs if the library will be modifying them */
if (mwbuf) {
- HDmemcpy(total_wbuf1_bak, total_wbuf1, ndsets * DSET_SELECT_DIM * sizeof(int));
- HDmemcpy(ul_total_wbuf2_bak, ul_total_wbuf2,
- ndsets * DSET_SELECT_DIM * sizeof(unsigned long));
- HDmemcpy(l_total_wbuf2_bak, l_total_wbuf2, ndsets * DSET_SELECT_DIM * sizeof(long));
- HDmemcpy(s1_total_wbuf3_bak, s1_total_wbuf3, ndsets * DSET_SELECT_DIM * sizeof(s1_t));
- HDmemcpy(s4_total_wbuf3_bak, s4_total_wbuf3, ndsets * DSET_SELECT_DIM * sizeof(s4_t));
+ memcpy(total_wbuf1_bak, total_wbuf1, ndsets * DSET_SELECT_DIM * sizeof(int));
+ memcpy(ul_total_wbuf2_bak, ul_total_wbuf2, ndsets * DSET_SELECT_DIM * sizeof(unsigned long));
+ memcpy(l_total_wbuf2_bak, l_total_wbuf2, ndsets * DSET_SELECT_DIM * sizeof(long));
+ memcpy(s1_total_wbuf3_bak, s1_total_wbuf3, ndsets * DSET_SELECT_DIM * sizeof(s1_t));
+ memcpy(s4_total_wbuf3_bak, s4_total_wbuf3, ndsets * DSET_SELECT_DIM * sizeof(s4_t));
}
if (H5Dwrite_multi(ndsets, dset_dids, mem_tids, mem_sids, file_sids, dxpl, wbufs) < 0)
@@ -2528,12 +2527,11 @@ test_multi_dsets_all(int niter, hid_t fid, unsigned chunked, unsigned mwbuf)
/* Restore wbufs from backup if the library modified them */
if (mwbuf) {
- HDmemcpy(total_wbuf1, total_wbuf1_bak, ndsets * DSET_SELECT_DIM * sizeof(int));
- HDmemcpy(ul_total_wbuf2, ul_total_wbuf2_bak,
- ndsets * DSET_SELECT_DIM * sizeof(unsigned long));
- HDmemcpy(l_total_wbuf2, l_total_wbuf2_bak, ndsets * DSET_SELECT_DIM * sizeof(long));
- HDmemcpy(s1_total_wbuf3, s1_total_wbuf3_bak, ndsets * DSET_SELECT_DIM * sizeof(s1_t));
- HDmemcpy(s4_total_wbuf3, s4_total_wbuf3_bak, ndsets * DSET_SELECT_DIM * sizeof(s4_t));
+ memcpy(total_wbuf1, total_wbuf1_bak, ndsets * DSET_SELECT_DIM * sizeof(int));
+ memcpy(ul_total_wbuf2, ul_total_wbuf2_bak, ndsets * DSET_SELECT_DIM * sizeof(unsigned long));
+ memcpy(l_total_wbuf2, l_total_wbuf2_bak, ndsets * DSET_SELECT_DIM * sizeof(long));
+ memcpy(s1_total_wbuf3, s1_total_wbuf3_bak, ndsets * DSET_SELECT_DIM * sizeof(s1_t));
+ memcpy(s4_total_wbuf3, s4_total_wbuf3_bak, ndsets * DSET_SELECT_DIM * sizeof(s4_t));
}
if (H5Dread_multi(ndsets, dset_dids, r_mem_tids, mem_sids, file_sids, dxpl, rbufs) < 0)