diff options
Diffstat (limited to 'testpar/t_select_io_dset.c')
-rw-r--r-- | testpar/t_select_io_dset.c | 204 |
1 files changed, 102 insertions, 102 deletions
diff --git a/testpar/t_select_io_dset.c b/testpar/t_select_io_dset.c index 14fc592..13c6743 100644 --- a/testpar/t_select_io_dset.c +++ b/testpar/t_select_io_dset.c @@ -353,11 +353,11 @@ test_no_size_change_no_bkg(hid_t fid, unsigned chunked, unsigned mwbuf) curr_nerrors = nerrors; - if ((wbuf = (char *)HDmalloc((size_t)(4 * DSET_SELECT_DIM))) == NULL) + if ((wbuf = (char *)malloc((size_t)(4 * DSET_SELECT_DIM))) == NULL) P_TEST_ERROR; - if (mwbuf && (wbuf_bak = (char *)HDmalloc((size_t)(4 * DSET_SELECT_DIM))) == NULL) + if (mwbuf && (wbuf_bak = (char *)malloc((size_t)(4 * DSET_SELECT_DIM))) == NULL) P_TEST_ERROR; - if ((rbuf = (char *)HDmalloc((size_t)(4 * DSET_SELECT_DIM))) == NULL) + if ((rbuf = (char *)malloc((size_t)(4 * DSET_SELECT_DIM))) == NULL) P_TEST_ERROR; /* Create 1d data space */ @@ -467,13 +467,13 @@ test_no_size_change_no_bkg(hid_t fid, unsigned chunked, unsigned mwbuf) P_TEST_ERROR; if (wbuf) - HDfree(wbuf); + free(wbuf); if (wbuf_bak) - HDfree(wbuf_bak); + free(wbuf_bak); if (rbuf) - HDfree(rbuf); + free(rbuf); CHECK_PASSED(); @@ -826,17 +826,17 @@ test_cmpd_with_bkg(hid_t fid, unsigned chunked, unsigned mwbuf) curr_nerrors = nerrors; /* Allocate buffers for datasets */ - if (NULL == (s1_wbuf = (s1_t *)HDmalloc(sizeof(s1_t) * DSET_SELECT_DIM))) + if (NULL == (s1_wbuf = (s1_t *)malloc(sizeof(s1_t) * DSET_SELECT_DIM))) P_TEST_ERROR; - if (mwbuf && NULL == (s1_wbuf_bak = (s1_t *)HDmalloc(sizeof(s1_t) * DSET_SELECT_DIM))) + if (mwbuf && NULL == (s1_wbuf_bak = (s1_t *)malloc(sizeof(s1_t) * DSET_SELECT_DIM))) P_TEST_ERROR; - if (NULL == (s1_rbuf = (s1_t *)HDmalloc(sizeof(s1_t) * DSET_SELECT_DIM))) + if (NULL == (s1_rbuf = (s1_t *)malloc(sizeof(s1_t) * DSET_SELECT_DIM))) P_TEST_ERROR; - if (NULL == (s2_wbuf = (s2_t *)HDmalloc(sizeof(s2_t) * DSET_SELECT_DIM))) + if (NULL == (s2_wbuf = (s2_t *)malloc(sizeof(s2_t) * DSET_SELECT_DIM))) P_TEST_ERROR; - if (mwbuf && NULL == (s2_wbuf_bak = (s2_t *)HDmalloc(sizeof(s2_t) * DSET_SELECT_DIM))) + if (mwbuf && NULL == (s2_wbuf_bak = (s2_t *)malloc(sizeof(s2_t) * DSET_SELECT_DIM))) P_TEST_ERROR; - if (NULL == (s2_rbuf = (s2_t *)HDmalloc(sizeof(s2_t) * DSET_SELECT_DIM))) + if (NULL == (s2_rbuf = (s2_t *)malloc(sizeof(s2_t) * DSET_SELECT_DIM))) P_TEST_ERROR; /* Create the memory data type */ @@ -1093,12 +1093,12 @@ test_cmpd_with_bkg(hid_t fid, unsigned chunked, unsigned mwbuf) P_TEST_ERROR; /* Release buffers */ - HDfree(s1_wbuf); - HDfree(s1_wbuf_bak); - HDfree(s1_rbuf); - HDfree(s2_wbuf); - HDfree(s2_wbuf_bak); - HDfree(s2_rbuf); + free(s1_wbuf); + free(s1_wbuf_bak); + free(s1_rbuf); + free(s2_wbuf); + free(s2_wbuf_bak); + free(s2_rbuf); CHECK_PASSED(); @@ -1495,24 +1495,24 @@ test_multi_dsets_no_bkg(hid_t fid, unsigned chunked, unsigned dtrans, unsigned m buf_size = ndsets * DSET_SELECT_DIM * sizeof(int); /* Allocate buffers for all datasets */ - if (NULL == (total_wbuf = (int *)HDmalloc(buf_size))) + if (NULL == (total_wbuf = (int *)malloc(buf_size))) P_TEST_ERROR; - if (mwbuf && NULL == (total_wbuf_bak = (int *)HDmalloc(buf_size))) + if (mwbuf && NULL == (total_wbuf_bak = (int *)malloc(buf_size))) P_TEST_ERROR; - if (NULL == (total_trans_wbuf = (int *)HDmalloc(buf_size))) + if (NULL == (total_trans_wbuf = (int *)malloc(buf_size))) P_TEST_ERROR; - if (NULL == (total_rbuf = (int *)HDmalloc(buf_size))) + if (NULL == (total_rbuf = (int *)malloc(buf_size))) P_TEST_ERROR; buf_size = ndsets * DSET_SELECT_DIM * sizeof(long); - if (NULL == (total_lwbuf = (long *)HDmalloc(buf_size))) + if (NULL == (total_lwbuf = (long *)malloc(buf_size))) P_TEST_ERROR; - if (mwbuf && NULL == (total_lwbuf_bak = (long *)HDmalloc(buf_size))) + if (mwbuf && NULL == (total_lwbuf_bak = (long *)malloc(buf_size))) P_TEST_ERROR; - if (NULL == (total_trans_lwbuf = (long *)HDmalloc(buf_size))) + if (NULL == (total_trans_lwbuf = (long *)malloc(buf_size))) P_TEST_ERROR; - if (NULL == (total_lrbuf = (long *)HDmalloc(buf_size))) + if (NULL == (total_lrbuf = (long *)malloc(buf_size))) P_TEST_ERROR; /* Initialize buffer indices */ @@ -1651,14 +1651,14 @@ test_multi_dsets_no_bkg(hid_t fid, unsigned chunked, unsigned dtrans, unsigned m P_TEST_ERROR; } - HDfree(total_wbuf); - HDfree(total_wbuf_bak); - HDfree(total_rbuf); - HDfree(total_trans_wbuf); - HDfree(total_lwbuf); - HDfree(total_lwbuf_bak); - HDfree(total_trans_lwbuf); - HDfree(total_lrbuf); + free(total_wbuf); + free(total_wbuf_bak); + free(total_rbuf); + free(total_trans_wbuf); + free(total_lwbuf); + free(total_lwbuf_bak); + free(total_trans_lwbuf); + free(total_lrbuf); CHECK_PASSED(); @@ -1805,18 +1805,18 @@ test_multi_dsets_cmpd_with_bkg(hid_t fid, unsigned chunked, unsigned mwbuf) s2_buf_size = ndsets * DSET_SELECT_DIM * sizeof(s2_t); /* Allocate buffers for all datasets */ - if (NULL == (total_wbuf = (s1_t *)HDmalloc(buf_size))) + if (NULL == (total_wbuf = (s1_t *)malloc(buf_size))) P_TEST_ERROR; - if (mwbuf && NULL == (total_wbuf_bak = (s1_t *)HDmalloc(buf_size))) + if (mwbuf && NULL == (total_wbuf_bak = (s1_t *)malloc(buf_size))) P_TEST_ERROR; - if (NULL == (total_rbuf = (s1_t *)HDmalloc(buf_size))) + if (NULL == (total_rbuf = (s1_t *)malloc(buf_size))) P_TEST_ERROR; - if (NULL == (s2_total_wbuf = (s2_t *)HDmalloc(s2_buf_size))) + if (NULL == (s2_total_wbuf = (s2_t *)malloc(s2_buf_size))) P_TEST_ERROR; - if (mwbuf && NULL == (s2_total_wbuf_bak = (s2_t *)HDmalloc(s2_buf_size))) + if (mwbuf && NULL == (s2_total_wbuf_bak = (s2_t *)malloc(s2_buf_size))) P_TEST_ERROR; - if (NULL == (s2_total_rbuf = (s2_t *)HDmalloc(s2_buf_size))) + if (NULL == (s2_total_rbuf = (s2_t *)malloc(s2_buf_size))) P_TEST_ERROR; /* Initialize buffer indices */ @@ -2129,12 +2129,12 @@ test_multi_dsets_cmpd_with_bkg(hid_t fid, unsigned chunked, unsigned mwbuf) P_TEST_ERROR; } - HDfree(total_wbuf); - HDfree(total_wbuf_bak); - HDfree(total_rbuf); - HDfree(s2_total_wbuf); - HDfree(s2_total_wbuf_bak); - HDfree(s2_total_rbuf); + free(total_wbuf); + free(total_wbuf_bak); + free(total_rbuf); + free(s2_total_wbuf); + free(s2_total_wbuf_bak); + free(s2_total_rbuf); CHECK_PASSED(); @@ -2254,11 +2254,11 @@ test_multi_dsets_size_change_no_bkg(hid_t fid, unsigned chunked, unsigned mwbuf) buf_size = ndsets * ss * DSET_SELECT_DIM; /* Allocate buffers for all datasets */ - if (NULL == (total_wbuf = (uint8_t *)HDmalloc(buf_size))) + if (NULL == (total_wbuf = (uint8_t *)malloc(buf_size))) P_TEST_ERROR; - if (NULL == (total_wbuf_bak = (uint8_t *)HDmalloc(buf_size))) + if (NULL == (total_wbuf_bak = (uint8_t *)malloc(buf_size))) P_TEST_ERROR; - if (NULL == (total_rbuf = (uint8_t *)HDmalloc(buf_size))) + if (NULL == (total_rbuf = (uint8_t *)malloc(buf_size))) P_TEST_ERROR; /* Initialize buffer indices */ @@ -2323,11 +2323,11 @@ test_multi_dsets_size_change_no_bkg(hid_t fid, unsigned chunked, unsigned mwbuf) buf_size = ndsets * (ss * DSET_SELECT_DIM); /* Allocate buffers for all datasets */ - if (NULL == (total_lwbuf = (uint8_t *)HDmalloc(buf_size))) + if (NULL == (total_lwbuf = (uint8_t *)malloc(buf_size))) P_TEST_ERROR; - if (NULL == (total_lwbuf_bak = (uint8_t *)HDmalloc(buf_size))) + if (NULL == (total_lwbuf_bak = (uint8_t *)malloc(buf_size))) P_TEST_ERROR; - if (NULL == (total_lrbuf = (uint8_t *)HDmalloc(buf_size))) + if (NULL == (total_lrbuf = (uint8_t *)malloc(buf_size))) P_TEST_ERROR; /* Initialize buffer indices */ @@ -2398,11 +2398,11 @@ test_multi_dsets_size_change_no_bkg(hid_t fid, unsigned chunked, unsigned mwbuf) buf_size = ndsets * (ss * DSET_SELECT_DIM); /* Allocate buffers for all datasets */ - if (NULL == (total_swbuf = (uint8_t *)HDmalloc(buf_size))) + if (NULL == (total_swbuf = (uint8_t *)malloc(buf_size))) P_TEST_ERROR; - if (NULL == (total_swbuf_bak = (uint8_t *)HDmalloc(buf_size))) + if (NULL == (total_swbuf_bak = (uint8_t *)malloc(buf_size))) P_TEST_ERROR; - if (NULL == (total_srbuf = (uint8_t *)HDmalloc(buf_size))) + if (NULL == (total_srbuf = (uint8_t *)malloc(buf_size))) P_TEST_ERROR; /* Initialize buffer indices */ @@ -2467,15 +2467,15 @@ test_multi_dsets_size_change_no_bkg(hid_t fid, unsigned chunked, unsigned mwbuf) P_TEST_ERROR; } - HDfree(total_wbuf); - HDfree(total_wbuf_bak); - HDfree(total_rbuf); - HDfree(total_lwbuf); - HDfree(total_lwbuf_bak); - HDfree(total_lrbuf); - HDfree(total_swbuf); - HDfree(total_swbuf_bak); - HDfree(total_srbuf); + free(total_wbuf); + free(total_wbuf_bak); + free(total_rbuf); + free(total_lwbuf); + free(total_lwbuf_bak); + free(total_lrbuf); + free(total_swbuf); + free(total_swbuf_bak); + free(total_srbuf); CHECK_PASSED(); @@ -2598,13 +2598,13 @@ test_multi_dsets_conv_sel_empty(hid_t fid, unsigned chunked, unsigned dtrans, un buf_size = ndsets * DSET_SELECT_DIM * sizeof(int); /* Allocate buffers for all datasets */ - if (NULL == (total_wbuf = (int *)HDmalloc(buf_size))) + if (NULL == (total_wbuf = (int *)malloc(buf_size))) P_TEST_ERROR; - if (NULL == (total_wbuf_bak = (int *)HDmalloc(buf_size))) + if (NULL == (total_wbuf_bak = (int *)malloc(buf_size))) P_TEST_ERROR; - if (NULL == (total_trans_wbuf = (int *)HDmalloc(buf_size))) + if (NULL == (total_trans_wbuf = (int *)malloc(buf_size))) P_TEST_ERROR; - if (NULL == (total_lrbuf = (long *)HDmalloc(ndsets * DSET_SELECT_DIM * sizeof(long)))) + if (NULL == (total_lrbuf = (long *)malloc(ndsets * DSET_SELECT_DIM * sizeof(long)))) P_TEST_ERROR; /* Initialize buffer indices */ @@ -2826,10 +2826,10 @@ test_multi_dsets_conv_sel_empty(hid_t fid, unsigned chunked, unsigned dtrans, un P_TEST_ERROR; } - HDfree(total_wbuf); - HDfree(total_wbuf_bak); - HDfree(total_trans_wbuf); - HDfree(total_lrbuf); + free(total_wbuf); + free(total_wbuf_bak); + free(total_trans_wbuf); + free(total_lrbuf); CHECK_PASSED(); @@ -3064,49 +3064,49 @@ test_multi_dsets_all(int niter, hid_t fid, unsigned chunked, unsigned mwbuf) /* DSET_WITH_NO_CONV */ buf_size = ndsets * DSET_SELECT_DIM * sizeof(int); - if (NULL == (total_wbuf1 = (int *)HDmalloc(buf_size))) + if (NULL == (total_wbuf1 = (int *)malloc(buf_size))) P_TEST_ERROR; - if (mwbuf && NULL == (total_wbuf1_bak = (int *)HDmalloc(buf_size))) + if (mwbuf && NULL == (total_wbuf1_bak = (int *)malloc(buf_size))) P_TEST_ERROR; - if (NULL == (total_rbuf1 = (int *)HDmalloc(buf_size))) + if (NULL == (total_rbuf1 = (int *)malloc(buf_size))) P_TEST_ERROR; /* DSET_WITH_CONV_AND_NO_BKG */ buf_size = ndsets * DSET_SELECT_DIM * sizeof(unsigned long); - if (NULL == (ul_total_wbuf2 = (unsigned long *)HDmalloc(buf_size))) + if (NULL == (ul_total_wbuf2 = (unsigned long *)malloc(buf_size))) P_TEST_ERROR; - if (mwbuf && NULL == (ul_total_wbuf2_bak = (unsigned long *)HDmalloc(buf_size))) + if (mwbuf && NULL == (ul_total_wbuf2_bak = (unsigned long *)malloc(buf_size))) P_TEST_ERROR; buf_size = ndsets * DSET_SELECT_DIM * sizeof(long); - if (NULL == (l_total_rbuf2 = (long *)HDmalloc(buf_size))) + if (NULL == (l_total_rbuf2 = (long *)malloc(buf_size))) P_TEST_ERROR; buf_size = ndsets * DSET_SELECT_DIM * sizeof(long); - if (NULL == (l_total_wbuf2 = (long *)HDmalloc(buf_size))) + if (NULL == (l_total_wbuf2 = (long *)malloc(buf_size))) P_TEST_ERROR; - if (mwbuf && NULL == (l_total_wbuf2_bak = (long *)HDmalloc(buf_size))) + if (mwbuf && NULL == (l_total_wbuf2_bak = (long *)malloc(buf_size))) P_TEST_ERROR; buf_size = ndsets * DSET_SELECT_DIM * sizeof(short); - if (NULL == (s_total_rbuf2 = (short *)HDmalloc(buf_size))) + if (NULL == (s_total_rbuf2 = (short *)malloc(buf_size))) P_TEST_ERROR; /* DSET_WITH_CONV_AND_BKG */ buf_size = ndsets * DSET_SELECT_DIM * sizeof(s1_t); - if (NULL == (s1_total_wbuf3 = (s1_t *)HDmalloc(buf_size))) + if (NULL == (s1_total_wbuf3 = (s1_t *)malloc(buf_size))) P_TEST_ERROR; - if (mwbuf && NULL == (s1_total_wbuf3_bak = (s1_t *)HDmalloc(buf_size))) + if (mwbuf && NULL == (s1_total_wbuf3_bak = (s1_t *)malloc(buf_size))) P_TEST_ERROR; buf_size = ndsets * DSET_SELECT_DIM * sizeof(s3_t); - if (NULL == (s3_total_rbuf3 = (s3_t *)HDmalloc(buf_size))) + if (NULL == (s3_total_rbuf3 = (s3_t *)malloc(buf_size))) P_TEST_ERROR; buf_size = ndsets * DSET_SELECT_DIM * sizeof(s4_t); - if (NULL == (s4_total_wbuf3 = (s4_t *)HDmalloc(buf_size))) + if (NULL == (s4_total_wbuf3 = (s4_t *)malloc(buf_size))) P_TEST_ERROR; - if (mwbuf && NULL == (s4_total_wbuf3_bak = (s4_t *)HDmalloc(buf_size))) + if (mwbuf && NULL == (s4_total_wbuf3_bak = (s4_t *)malloc(buf_size))) P_TEST_ERROR; buf_size = ndsets * DSET_SELECT_DIM * sizeof(s1_t); - if (NULL == (s1_total_rbuf3 = (s1_t *)HDmalloc(buf_size))) + if (NULL == (s1_total_rbuf3 = (s1_t *)malloc(buf_size))) P_TEST_ERROR; /* Test with s settings for ndsets */ @@ -3344,37 +3344,37 @@ test_multi_dsets_all(int niter, hid_t fid, unsigned chunked, unsigned mwbuf) } /* Freeing */ - HDfree(total_wbuf1); + free(total_wbuf1); total_wbuf1 = NULL; - HDfree(total_wbuf1_bak); + free(total_wbuf1_bak); total_wbuf1_bak = NULL; - HDfree(total_rbuf1); + free(total_rbuf1); total_rbuf1 = NULL; - HDfree(ul_total_wbuf2); + free(ul_total_wbuf2); ul_total_wbuf2 = NULL; - HDfree(ul_total_wbuf2_bak); + free(ul_total_wbuf2_bak); ul_total_wbuf2_bak = NULL; - HDfree(l_total_rbuf2); + free(l_total_rbuf2); l_total_rbuf2 = NULL; - HDfree(l_total_wbuf2); + free(l_total_wbuf2); l_total_wbuf2 = NULL; - HDfree(l_total_wbuf2_bak); + free(l_total_wbuf2_bak); l_total_wbuf2_bak = NULL; - HDfree(s_total_rbuf2); + free(s_total_rbuf2); s_total_rbuf2 = NULL; - HDfree(s1_total_wbuf3); + free(s1_total_wbuf3); s1_total_wbuf3 = NULL; - HDfree(s1_total_wbuf3_bak); + free(s1_total_wbuf3_bak); s1_total_wbuf3_bak = NULL; - HDfree(s3_total_rbuf3); + free(s3_total_rbuf3); s3_total_rbuf3 = NULL; - HDfree(s4_total_wbuf3); + free(s4_total_wbuf3); s4_total_wbuf3 = NULL; - HDfree(s4_total_wbuf3_bak); + free(s4_total_wbuf3_bak); s4_total_wbuf3_bak = NULL; - HDfree(s1_total_rbuf3); + free(s1_total_rbuf3); s1_total_rbuf3 = NULL; } /* end for n niter */ |