diff options
Diffstat (limited to 'test/tselect.c')
-rw-r--r-- | test/tselect.c | 408 |
1 files changed, 204 insertions, 204 deletions
diff --git a/test/tselect.c b/test/tselect.c index f55f5c3..5b79b3b 100644 --- a/test/tselect.c +++ b/test/tselect.c @@ -247,10 +247,10 @@ test_select_hyper(hid_t xfer_plist) MESSAGE(5, ("Testing Hyperslab Selection Functions\n")); /* Allocate write & read buffers */ - wbuf = (uint8_t *)HDmalloc(sizeof(uint8_t) * SPACE2_DIM1 * SPACE2_DIM2); - CHECK_PTR(wbuf, "HDmalloc"); - rbuf = (uint8_t *)HDcalloc(sizeof(uint8_t), (size_t)(SPACE3_DIM1 * SPACE3_DIM2)); - CHECK_PTR(rbuf, "HDcalloc"); + wbuf = (uint8_t *)malloc(sizeof(uint8_t) * SPACE2_DIM1 * SPACE2_DIM2); + CHECK_PTR(wbuf, "malloc"); + rbuf = (uint8_t *)calloc(sizeof(uint8_t), (size_t)(SPACE3_DIM1 * SPACE3_DIM2)); + CHECK_PTR(rbuf, "calloc"); /* Initialize write buffer */ for (i = 0, tbuf = wbuf; i < SPACE2_DIM1; i++) @@ -434,8 +434,8 @@ test_select_hyper(hid_t xfer_plist) CHECK(ret, FAIL, "H5Fclose"); /* Free memory buffers */ - HDfree(wbuf); - HDfree(rbuf); + free(wbuf); + free(rbuf); } /* test_select_hyper() */ struct pnt_iter { @@ -501,10 +501,10 @@ test_select_point(hid_t xfer_plist) MESSAGE(5, ("Testing Element Selection Functions\n")); /* Allocate write & read buffers */ - wbuf = (uint8_t *)HDmalloc(sizeof(uint8_t) * SPACE2_DIM1 * SPACE2_DIM2); - CHECK_PTR(wbuf, "HDmalloc"); - rbuf = (uint8_t *)HDcalloc(sizeof(uint8_t), (size_t)(SPACE3_DIM1 * SPACE3_DIM2)); - CHECK_PTR(rbuf, "HDcalloc"); + wbuf = (uint8_t *)malloc(sizeof(uint8_t) * SPACE2_DIM1 * SPACE2_DIM2); + CHECK_PTR(wbuf, "malloc"); + rbuf = (uint8_t *)calloc(sizeof(uint8_t), (size_t)(SPACE3_DIM1 * SPACE3_DIM2)); + CHECK_PTR(rbuf, "calloc"); /* Initialize write buffer */ for (i = 0, tbuf = wbuf; i < SPACE2_DIM1; i++) @@ -801,8 +801,8 @@ test_select_point(hid_t xfer_plist) CHECK(ret, FAIL, "H5Fclose"); /* Free memory buffers */ - HDfree(wbuf); - HDfree(rbuf); + free(wbuf); + free(rbuf); } /* test_select_point() */ /**************************************************************** @@ -863,10 +863,10 @@ test_select_all(hid_t xfer_plist) MESSAGE(5, ("Testing 'All' Selection Functions\n")); /* Allocate write & read buffers */ - wbuf = (uint8_t *)HDmalloc(sizeof(uint8_t) * SPACE4_DIM1 * SPACE4_DIM2 * SPACE4_DIM3); - CHECK_PTR(wbuf, "HDmalloc"); - rbuf = (uint8_t *)HDcalloc(sizeof(uint8_t), (size_t)(SPACE4_DIM1 * SPACE4_DIM2 * SPACE4_DIM3)); - CHECK_PTR(rbuf, "HDcalloc"); + wbuf = (uint8_t *)malloc(sizeof(uint8_t) * SPACE4_DIM1 * SPACE4_DIM2 * SPACE4_DIM3); + CHECK_PTR(wbuf, "malloc"); + rbuf = (uint8_t *)calloc(sizeof(uint8_t), (size_t)(SPACE4_DIM1 * SPACE4_DIM2 * SPACE4_DIM3)); + CHECK_PTR(rbuf, "calloc"); /* Initialize write buffer */ for (i = 0, tbuf = wbuf; i < SPACE4_DIM1; i++) @@ -916,8 +916,8 @@ test_select_all(hid_t xfer_plist) CHECK(ret, FAIL, "H5Fclose"); /* Free memory buffers */ - HDfree(wbuf); - HDfree(rbuf); + free(wbuf); + free(rbuf); } /* test_select_all() */ /**************************************************************** @@ -950,10 +950,10 @@ test_select_all_hyper(hid_t xfer_plist) MESSAGE(5, ("Testing 'All' Selection Functions\n")); /* Allocate write & read buffers */ - wbuf = (uint8_t *)HDmalloc(sizeof(uint8_t) * SPACE2_DIM1 * SPACE2_DIM2); - CHECK_PTR(wbuf, "HDmalloc"); - rbuf = (uint8_t *)HDcalloc(sizeof(uint8_t), (size_t)(SPACE3_DIM1 * SPACE3_DIM2)); - CHECK_PTR(rbuf, "HDcalloc"); + wbuf = (uint8_t *)malloc(sizeof(uint8_t) * SPACE2_DIM1 * SPACE2_DIM2); + CHECK_PTR(wbuf, "malloc"); + rbuf = (uint8_t *)calloc(sizeof(uint8_t), (size_t)(SPACE3_DIM1 * SPACE3_DIM2)); + CHECK_PTR(rbuf, "calloc"); /* Initialize write buffer */ for (i = 0, tbuf = wbuf; i < SPACE2_DIM1; i++) @@ -1068,8 +1068,8 @@ test_select_all_hyper(hid_t xfer_plist) CHECK(ret, FAIL, "H5Fclose"); /* Free memory buffers */ - HDfree(wbuf); - HDfree(rbuf); + free(wbuf); + free(rbuf); } /* test_select_all_hyper() */ /**************************************************************** @@ -1104,10 +1104,10 @@ test_select_combo(void) MESSAGE(5, ("Testing Combination of Hyperslab & Element Selection Functions\n")); /* Allocate write & read buffers */ - wbuf = (uint8_t *)HDmalloc(sizeof(uint8_t) * SPACE2_DIM1 * SPACE2_DIM2); - CHECK_PTR(wbuf, "HDmalloc"); - rbuf = (uint8_t *)HDcalloc(sizeof(uint8_t), (size_t)(SPACE3_DIM1 * SPACE3_DIM2)); - CHECK_PTR(rbuf, "HDcalloc"); + wbuf = (uint8_t *)malloc(sizeof(uint8_t) * SPACE2_DIM1 * SPACE2_DIM2); + CHECK_PTR(wbuf, "malloc"); + rbuf = (uint8_t *)calloc(sizeof(uint8_t), (size_t)(SPACE3_DIM1 * SPACE3_DIM2)); + CHECK_PTR(rbuf, "calloc"); /* Initialize write buffer */ for (i = 0, tbuf = wbuf; i < SPACE2_DIM1; i++) @@ -1229,8 +1229,8 @@ test_select_combo(void) CHECK(ret, FAIL, "H5Fclose"); /* Free memory buffers */ - HDfree(wbuf); - HDfree(rbuf); + free(wbuf); + free(rbuf); } /* test_select_combo() */ static int @@ -1299,10 +1299,10 @@ test_select_hyper_stride(hid_t xfer_plist) MESSAGE(5, ("Testing Hyperslabs with Strides Functionality\n")); /* Allocate write & read buffers */ - wbuf = (uint16_t *)HDmalloc(sizeof(uint16_t) * SPACE2_DIM1 * SPACE2_DIM2); - CHECK_PTR(wbuf, "HDmalloc"); - rbuf = (uint16_t *)HDcalloc(sizeof(uint16_t), (size_t)(SPACE3_DIM1 * SPACE3_DIM2)); - CHECK_PTR(rbuf, "HDcalloc"); + wbuf = (uint16_t *)malloc(sizeof(uint16_t) * SPACE2_DIM1 * SPACE2_DIM2); + CHECK_PTR(wbuf, "malloc"); + rbuf = (uint16_t *)calloc(sizeof(uint16_t), (size_t)(SPACE3_DIM1 * SPACE3_DIM2)); + CHECK_PTR(rbuf, "calloc"); /* Initialize write buffer */ for (i = 0, tbuf = wbuf; i < SPACE2_DIM1; i++) @@ -1414,8 +1414,8 @@ test_select_hyper_stride(hid_t xfer_plist) CHECK(ret, FAIL, "H5Fclose"); /* Free memory buffers */ - HDfree(wbuf); - HDfree(rbuf); + free(wbuf); + free(rbuf); } /* test_select_hyper_stride() */ /**************************************************************** @@ -1445,10 +1445,10 @@ test_select_hyper_contig(hid_t dset_type, hid_t xfer_plist) MESSAGE(5, ("Testing Contiguous Hyperslabs Functionality\n")); /* Allocate write & read buffers */ - wbuf = (uint16_t *)HDmalloc(sizeof(uint16_t) * SPACE2_DIM1 * SPACE2_DIM2); - CHECK_PTR(wbuf, "HDmalloc"); - rbuf = (uint16_t *)HDcalloc(sizeof(uint16_t), (size_t)(SPACE2_DIM1 * SPACE2_DIM2)); - CHECK_PTR(rbuf, "HDcalloc"); + wbuf = (uint16_t *)malloc(sizeof(uint16_t) * SPACE2_DIM1 * SPACE2_DIM2); + CHECK_PTR(wbuf, "malloc"); + rbuf = (uint16_t *)calloc(sizeof(uint16_t), (size_t)(SPACE2_DIM1 * SPACE2_DIM2)); + CHECK_PTR(rbuf, "calloc"); /* Initialize write buffer */ for (i = 0, tbuf = wbuf; i < SPACE2_DIM1; i++) @@ -1556,8 +1556,8 @@ test_select_hyper_contig(hid_t dset_type, hid_t xfer_plist) CHECK(ret, FAIL, "H5Fclose"); /* Free memory buffers */ - HDfree(wbuf); - HDfree(rbuf); + free(wbuf); + free(rbuf); } /* test_select_hyper_contig() */ /**************************************************************** @@ -1585,11 +1585,11 @@ test_select_hyper_contig2(hid_t dset_type, hid_t xfer_plist) MESSAGE(5, ("Testing More Contiguous Hyperslabs Functionality\n")); /* Allocate write & read buffers */ - wbuf = (uint16_t *)HDmalloc(sizeof(uint16_t) * SPACE8_DIM1 * SPACE8_DIM2 * SPACE8_DIM3 * SPACE8_DIM4); - CHECK_PTR(wbuf, "HDmalloc"); - rbuf = (uint16_t *)HDcalloc(sizeof(uint16_t), - (size_t)(SPACE8_DIM1 * SPACE8_DIM2 * SPACE8_DIM3 * SPACE8_DIM4)); - CHECK_PTR(rbuf, "HDcalloc"); + wbuf = (uint16_t *)malloc(sizeof(uint16_t) * SPACE8_DIM1 * SPACE8_DIM2 * SPACE8_DIM3 * SPACE8_DIM4); + CHECK_PTR(wbuf, "malloc"); + rbuf = + (uint16_t *)calloc(sizeof(uint16_t), (size_t)(SPACE8_DIM1 * SPACE8_DIM2 * SPACE8_DIM3 * SPACE8_DIM4)); + CHECK_PTR(rbuf, "calloc"); /* Initialize write buffer */ for (i = 0, tbuf = wbuf; i < SPACE8_DIM1; i++) @@ -1699,8 +1699,8 @@ test_select_hyper_contig2(hid_t dset_type, hid_t xfer_plist) CHECK(ret, FAIL, "H5Fclose"); /* Free memory buffers */ - HDfree(wbuf); - HDfree(rbuf); + free(wbuf); + free(rbuf); } /* test_select_hyper_contig2() */ /**************************************************************** @@ -1731,11 +1731,11 @@ test_select_hyper_contig3(hid_t dset_type, hid_t xfer_plist) MESSAGE(5, ("Testing Yet More Contiguous Hyperslabs Functionality\n")); /* Allocate write & read buffers */ - wbuf = (uint16_t *)HDmalloc(sizeof(uint16_t) * SPACE8_DIM1 * SPACE8_DIM2 * SPACE8_DIM3 * SPACE8_DIM4); - CHECK_PTR(wbuf, "HDmalloc"); - rbuf = (uint16_t *)HDcalloc(sizeof(uint16_t), - (size_t)(SPACE8_DIM1 * SPACE8_DIM2 * SPACE8_DIM3 * SPACE8_DIM4)); - CHECK_PTR(rbuf, "HDcalloc"); + wbuf = (uint16_t *)malloc(sizeof(uint16_t) * SPACE8_DIM1 * SPACE8_DIM2 * SPACE8_DIM3 * SPACE8_DIM4); + CHECK_PTR(wbuf, "malloc"); + rbuf = + (uint16_t *)calloc(sizeof(uint16_t), (size_t)(SPACE8_DIM1 * SPACE8_DIM2 * SPACE8_DIM3 * SPACE8_DIM4)); + CHECK_PTR(rbuf, "calloc"); /* Initialize write buffer */ for (i = 0, tbuf = wbuf; i < SPACE8_DIM4; i++) @@ -1864,8 +1864,8 @@ test_select_hyper_contig3(hid_t dset_type, hid_t xfer_plist) CHECK(ret, FAIL, "H5Fclose"); /* Free memory buffers */ - HDfree(wbuf); - HDfree(rbuf); + free(wbuf); + free(rbuf); } /* test_select_hyper_contig3() */ /**************************************************************** @@ -2001,10 +2001,10 @@ test_select_hyper_contig_dr__run_test(int test_num, const uint16_t *cube_buf, co block_ptr = &(block[SS_DR_MAX_RANK - large_rank]); /* Allocate buffers */ - small_cube_buf_1 = (uint16_t *)HDcalloc(sizeof(uint16_t), small_cube_size); - CHECK_PTR(small_cube_buf_1, "HDcalloc"); - large_cube_buf_1 = (uint16_t *)HDcalloc(sizeof(uint16_t), large_cube_size); - CHECK_PTR(large_cube_buf_1, "HDcalloc"); + small_cube_buf_1 = (uint16_t *)calloc(sizeof(uint16_t), small_cube_size); + CHECK_PTR(small_cube_buf_1, "calloc"); + large_cube_buf_1 = (uint16_t *)calloc(sizeof(uint16_t), large_cube_size); + CHECK_PTR(large_cube_buf_1, "calloc"); /* Create a dataset transfer property list */ fapl = H5Pcreate(H5P_FILE_ACCESS); @@ -2489,8 +2489,8 @@ test_select_hyper_contig_dr__run_test(int test_num, const uint16_t *cube_buf, co CHECK(ret, FAIL, "H5Fclose"); /* Free memory buffers */ - HDfree(small_cube_buf_1); - HDfree(large_cube_buf_1); + free(small_cube_buf_1); + free(large_cube_buf_1); } /* test_select_hyper_contig_dr__run_test() */ @@ -2528,8 +2528,8 @@ test_select_hyper_contig_dr(hid_t dset_type, hid_t xfer_plist) max_cube_size *= (size_t)edge_size; /* Allocate cube buffer for writing values */ - cube_buf = (uint16_t *)HDmalloc(sizeof(uint16_t) * max_cube_size); - CHECK_PTR(cube_buf, "HDmalloc"); + cube_buf = (uint16_t *)malloc(sizeof(uint16_t) * max_cube_size); + CHECK_PTR(cube_buf, "malloc"); /* Initialize the cube buffer */ cube_ptr = cube_buf; @@ -2537,8 +2537,8 @@ test_select_hyper_contig_dr(hid_t dset_type, hid_t xfer_plist) *cube_ptr++ = (uint16_t)s; /* Allocate cube buffer for zeroing values on disk */ - zero_buf = (uint16_t *)HDcalloc(sizeof(uint16_t), max_cube_size); - CHECK_PTR(zero_buf, "HDcalloc"); + zero_buf = (uint16_t *)calloc(sizeof(uint16_t), max_cube_size); + CHECK_PTR(zero_buf, "calloc"); for (large_rank = 1; large_rank <= max_rank; large_rank++) { for (small_rank = 1; small_rank < large_rank; small_rank++) { @@ -2554,8 +2554,8 @@ test_select_hyper_contig_dr(hid_t dset_type, hid_t xfer_plist) } /* for loop on small rank */ } /* for loop on large rank */ - HDfree(cube_buf); - HDfree(zero_buf); + free(cube_buf); + free(zero_buf); } /* test_select_hyper_contig_dr() */ @@ -2986,10 +2986,10 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_ assert(large_cube_size < (size_t)(64 * 1024)); /* Allocate & initialize buffers */ - small_cube_buf_1 = (uint16_t *)HDcalloc(sizeof(uint16_t), small_cube_size); - CHECK_PTR(small_cube_buf_1, "HDcalloc"); - large_cube_buf_1 = (uint16_t *)HDcalloc(sizeof(uint16_t), large_cube_size); - CHECK_PTR(large_cube_buf_1, "HDcalloc"); + small_cube_buf_1 = (uint16_t *)calloc(sizeof(uint16_t), small_cube_size); + CHECK_PTR(small_cube_buf_1, "calloc"); + large_cube_buf_1 = (uint16_t *)calloc(sizeof(uint16_t), large_cube_size); + CHECK_PTR(large_cube_buf_1, "calloc"); /* Create a dataset transfer property list */ fapl = H5Pcreate(H5P_FILE_ACCESS); @@ -3561,8 +3561,8 @@ test_select_hyper_checker_board_dr__run_test(int test_num, const uint16_t *cube_ CHECK(ret, FAIL, "H5Fclose"); /* Free memory buffers */ - HDfree(small_cube_buf_1); - HDfree(large_cube_buf_1); + free(small_cube_buf_1); + free(large_cube_buf_1); } /* test_select_hyper_checker_board_dr__run_test() */ @@ -3604,8 +3604,8 @@ test_select_hyper_checker_board_dr(hid_t dset_type, hid_t xfer_plist) max_cube_size *= (size_t)(edge_size + 1); /* Allocate cube buffer for writing values */ - cube_buf = (uint16_t *)HDmalloc(sizeof(uint16_t) * max_cube_size); - CHECK_PTR(cube_buf, "HDmalloc"); + cube_buf = (uint16_t *)malloc(sizeof(uint16_t) * max_cube_size); + CHECK_PTR(cube_buf, "malloc"); /* Initialize the cube buffer */ cube_ptr = cube_buf; @@ -3613,8 +3613,8 @@ test_select_hyper_checker_board_dr(hid_t dset_type, hid_t xfer_plist) *cube_ptr++ = (uint16_t)s; /* Allocate cube buffer for zeroing values on disk */ - zero_buf = (uint16_t *)HDcalloc(sizeof(uint16_t), max_cube_size); - CHECK_PTR(zero_buf, "HDcalloc"); + zero_buf = (uint16_t *)calloc(sizeof(uint16_t), max_cube_size); + CHECK_PTR(zero_buf, "calloc"); for (large_rank = 1; large_rank <= max_rank; large_rank++) { for (small_rank = 1; small_rank < large_rank; small_rank++) { @@ -3642,8 +3642,8 @@ test_select_hyper_checker_board_dr(hid_t dset_type, hid_t xfer_plist) } /* for loop on small rank */ } /* for loop on large rank */ - HDfree(cube_buf); - HDfree(zero_buf); + free(cube_buf); + free(zero_buf); } /* test_select_hyper_checker_board_dr() */ @@ -3677,12 +3677,12 @@ test_select_hyper_copy(void) MESSAGE(5, ("Testing Hyperslabs with Strides Functionality\n")); /* Allocate write & read buffers */ - wbuf = (uint16_t *)HDmalloc(sizeof(uint16_t) * SPACE2_DIM1 * SPACE2_DIM2); - CHECK_PTR(wbuf, "HDmalloc"); - rbuf = (uint16_t *)HDcalloc(sizeof(uint16_t), (size_t)(SPACE3_DIM1 * SPACE3_DIM2)); - CHECK_PTR(rbuf, "HDcalloc"); - rbuf2 = (uint16_t *)HDcalloc(sizeof(uint16_t), (size_t)(SPACE3_DIM1 * SPACE3_DIM2)); - CHECK_PTR(rbuf2, "HDcalloc"); + wbuf = (uint16_t *)malloc(sizeof(uint16_t) * SPACE2_DIM1 * SPACE2_DIM2); + CHECK_PTR(wbuf, "malloc"); + rbuf = (uint16_t *)calloc(sizeof(uint16_t), (size_t)(SPACE3_DIM1 * SPACE3_DIM2)); + CHECK_PTR(rbuf, "calloc"); + rbuf2 = (uint16_t *)calloc(sizeof(uint16_t), (size_t)(SPACE3_DIM1 * SPACE3_DIM2)); + CHECK_PTR(rbuf2, "calloc"); /* Initialize write buffer */ for (i = 0, tbuf = wbuf; i < SPACE2_DIM1; i++) @@ -3814,9 +3814,9 @@ test_select_hyper_copy(void) CHECK(ret, FAIL, "H5Fclose"); /* Free memory buffers */ - HDfree(wbuf); - HDfree(rbuf); - HDfree(rbuf2); + free(wbuf); + free(rbuf); + free(rbuf2); } /* test_select_hyper_copy() */ /**************************************************************** @@ -3848,12 +3848,12 @@ test_select_point_copy(void) MESSAGE(5, ("Testing Hyperslabs with Strides Functionality\n")); /* Allocate write & read buffers */ - wbuf = (uint16_t *)HDmalloc(sizeof(uint16_t) * SPACE2_DIM1 * SPACE2_DIM2); - CHECK_PTR(wbuf, "HDmalloc"); - rbuf = (uint16_t *)HDcalloc(sizeof(uint16_t), (size_t)(SPACE3_DIM1 * SPACE3_DIM2)); - CHECK_PTR(rbuf, "HDcalloc"); - rbuf2 = (uint16_t *)HDcalloc(sizeof(uint16_t), (size_t)(SPACE3_DIM1 * SPACE3_DIM2)); - CHECK_PTR(rbuf2, "HDcalloc"); + wbuf = (uint16_t *)malloc(sizeof(uint16_t) * SPACE2_DIM1 * SPACE2_DIM2); + CHECK_PTR(wbuf, "malloc"); + rbuf = (uint16_t *)calloc(sizeof(uint16_t), (size_t)(SPACE3_DIM1 * SPACE3_DIM2)); + CHECK_PTR(rbuf, "calloc"); + rbuf2 = (uint16_t *)calloc(sizeof(uint16_t), (size_t)(SPACE3_DIM1 * SPACE3_DIM2)); + CHECK_PTR(rbuf2, "calloc"); /* Initialize write buffer */ for (i = 0, tbuf = wbuf; i < SPACE2_DIM1; i++) @@ -4027,9 +4027,9 @@ test_select_point_copy(void) CHECK(ret, FAIL, "H5Fclose"); /* Free memory buffers */ - HDfree(wbuf); - HDfree(rbuf); - HDfree(rbuf2); + free(wbuf); + free(rbuf); + free(rbuf2); } /* test_select_point_copy() */ /**************************************************************** @@ -4066,10 +4066,10 @@ test_select_hyper_offset(void) MESSAGE(5, ("Testing Hyperslab Selection Functions with Offsets\n")); /* Allocate write & read buffers */ - wbuf = (uint8_t *)HDmalloc(sizeof(uint8_t) * SPACE2_DIM1 * SPACE2_DIM2); - CHECK_PTR(wbuf, "HDmalloc"); - rbuf = (uint8_t *)HDcalloc(sizeof(uint8_t), (size_t)(SPACE3_DIM1 * SPACE3_DIM2)); - CHECK_PTR(rbuf, "HDcalloc"); + wbuf = (uint8_t *)malloc(sizeof(uint8_t) * SPACE2_DIM1 * SPACE2_DIM2); + CHECK_PTR(wbuf, "malloc"); + rbuf = (uint8_t *)calloc(sizeof(uint8_t), (size_t)(SPACE3_DIM1 * SPACE3_DIM2)); + CHECK_PTR(rbuf, "calloc"); /* Initialize write buffer */ for (i = 0, tbuf = wbuf; i < SPACE2_DIM1; i++) @@ -4215,8 +4215,8 @@ test_select_hyper_offset(void) CHECK(ret, FAIL, "H5Fclose"); /* Free memory buffers */ - HDfree(wbuf); - HDfree(rbuf); + free(wbuf); + free(rbuf); } /* test_select_hyper_offset() */ /**************************************************************** @@ -4248,10 +4248,10 @@ test_select_hyper_offset2(void) MESSAGE(5, ("Testing More Hyperslab Selection Functions with Offsets\n")); /* Allocate write & read buffers */ - wbuf = (uint8_t *)HDmalloc(sizeof(uint8_t) * SPACE7_DIM1 * SPACE7_DIM2); - CHECK_PTR(wbuf, "HDmalloc"); - rbuf = (uint8_t *)HDcalloc(sizeof(uint8_t), (size_t)(SPACE7_DIM1 * SPACE7_DIM2)); - CHECK_PTR(rbuf, "HDcalloc"); + wbuf = (uint8_t *)malloc(sizeof(uint8_t) * SPACE7_DIM1 * SPACE7_DIM2); + CHECK_PTR(wbuf, "malloc"); + rbuf = (uint8_t *)calloc(sizeof(uint8_t), (size_t)(SPACE7_DIM1 * SPACE7_DIM2)); + CHECK_PTR(rbuf, "calloc"); /* Initialize write buffer */ for (i = 0, tbuf = wbuf; i < SPACE7_DIM1; i++) @@ -4342,8 +4342,8 @@ test_select_hyper_offset2(void) CHECK(ret, FAIL, "H5Fclose"); /* Free memory buffers */ - HDfree(wbuf); - HDfree(rbuf); + free(wbuf); + free(rbuf); } /* test_select_hyper_offset2() */ /**************************************************************** @@ -4378,10 +4378,10 @@ test_select_point_offset(void) MESSAGE(5, ("Testing Element Selection Functions\n")); /* Allocate write & read buffers */ - wbuf = (uint8_t *)HDmalloc(sizeof(uint8_t) * SPACE2_DIM1 * SPACE2_DIM2); - CHECK_PTR(wbuf, "HDmalloc"); - rbuf = (uint8_t *)HDcalloc(sizeof(uint8_t), (size_t)(SPACE3_DIM1 * SPACE3_DIM2)); - CHECK_PTR(rbuf, "HDcalloc"); + wbuf = (uint8_t *)malloc(sizeof(uint8_t) * SPACE2_DIM1 * SPACE2_DIM2); + CHECK_PTR(wbuf, "malloc"); + rbuf = (uint8_t *)calloc(sizeof(uint8_t), (size_t)(SPACE3_DIM1 * SPACE3_DIM2)); + CHECK_PTR(rbuf, "calloc"); /* Initialize write buffer */ for (i = 0, tbuf = wbuf; i < SPACE2_DIM1; i++) @@ -4562,8 +4562,8 @@ test_select_point_offset(void) CHECK(ret, FAIL, "H5Fclose"); /* Free memory buffers */ - HDfree(wbuf); - HDfree(rbuf); + free(wbuf); + free(rbuf); } /* test_select_point_offset() */ /**************************************************************** @@ -4605,10 +4605,10 @@ test_select_hyper_union(void) MESSAGE(5, ("Testing Hyperslab Selection Functions with unions of hyperslabs\n")); /* Allocate write & read buffers */ - wbuf = (uint8_t *)HDmalloc(sizeof(uint8_t) * SPACE2_DIM1 * SPACE2_DIM2); - CHECK_PTR(wbuf, "HDmalloc"); - rbuf = (uint8_t *)HDcalloc(sizeof(uint8_t), (size_t)(SPACE3_DIM1 * SPACE3_DIM2)); - CHECK_PTR(rbuf, "HDcalloc"); + wbuf = (uint8_t *)malloc(sizeof(uint8_t) * SPACE2_DIM1 * SPACE2_DIM2); + CHECK_PTR(wbuf, "malloc"); + rbuf = (uint8_t *)calloc(sizeof(uint8_t), (size_t)(SPACE3_DIM1 * SPACE3_DIM2)); + CHECK_PTR(rbuf, "calloc"); /* Initialize write buffer */ for (i = 0, tbuf = wbuf; i < SPACE2_DIM1; i++) @@ -5188,8 +5188,8 @@ test_select_hyper_union(void) CHECK(ret, FAIL, "H5Fclose"); /* Free memory buffers */ - HDfree(wbuf); - HDfree(rbuf); + free(wbuf); + free(rbuf); } /* test_select_hyper_union() */ /**************************************************************** @@ -5383,10 +5383,10 @@ test_select_hyper_union_3d(void) MESSAGE(5, ("Testing Hyperslab Selection Functions with unions of 3-D hyperslabs\n")); /* Allocate write & read buffers */ - wbuf = (uint8_t *)HDmalloc(sizeof(uint8_t) * SPACE4_DIM1 * SPACE4_DIM2 * SPACE4_DIM3); - CHECK_PTR(wbuf, "HDmalloc"); - rbuf = (uint8_t *)HDcalloc(sizeof(uint8_t), SPACE3_DIM1 * SPACE3_DIM2); - CHECK_PTR(rbuf, "HDcalloc"); + wbuf = (uint8_t *)malloc(sizeof(uint8_t) * SPACE4_DIM1 * SPACE4_DIM2 * SPACE4_DIM3); + CHECK_PTR(wbuf, "malloc"); + rbuf = (uint8_t *)calloc(sizeof(uint8_t), SPACE3_DIM1 * SPACE3_DIM2); + CHECK_PTR(rbuf, "calloc"); /* Initialize write buffer */ for (i = 0, tbuf = wbuf; i < SPACE4_DIM1; i++) @@ -5527,8 +5527,8 @@ test_select_hyper_union_3d(void) CHECK(ret, FAIL, "H5Fclose"); /* Free memory buffers */ - HDfree(wbuf); - HDfree(rbuf); + free(wbuf); + free(rbuf); } /* test_select_hyper_union_3d() */ /**************************************************************** @@ -5707,10 +5707,10 @@ test_select_hyper_and_2d(void) MESSAGE(5, ("Testing Hyperslab Selection Functions with intersection of 2-D hyperslabs\n")); /* Allocate write & read buffers */ - wbuf = (uint8_t *)HDmalloc(sizeof(uint8_t) * SPACE2_DIM1 * SPACE2_DIM2); - CHECK_PTR(wbuf, "HDmalloc"); - rbuf = (uint8_t *)HDcalloc(sizeof(uint8_t), (size_t)(SPACE2_DIM1 * SPACE2_DIM2)); - CHECK_PTR(rbuf, "HDcalloc"); + wbuf = (uint8_t *)malloc(sizeof(uint8_t) * SPACE2_DIM1 * SPACE2_DIM2); + CHECK_PTR(wbuf, "malloc"); + rbuf = (uint8_t *)calloc(sizeof(uint8_t), (size_t)(SPACE2_DIM1 * SPACE2_DIM2)); + CHECK_PTR(rbuf, "calloc"); /* Initialize write buffer */ for (i = 0, tbuf = wbuf; i < SPACE2_DIM1; i++) @@ -5812,8 +5812,8 @@ test_select_hyper_and_2d(void) CHECK(ret, FAIL, "H5Fclose"); /* Free memory buffers */ - HDfree(wbuf); - HDfree(rbuf); + free(wbuf); + free(rbuf); } /* test_select_hyper_and_2d() */ /**************************************************************** @@ -5846,10 +5846,10 @@ test_select_hyper_xor_2d(void) MESSAGE(5, ("Testing Hyperslab Selection Functions with XOR of 2-D hyperslabs\n")); /* Allocate write & read buffers */ - wbuf = (uint8_t *)HDmalloc(sizeof(uint8_t) * SPACE2_DIM1 * SPACE2_DIM2); - CHECK_PTR(wbuf, "HDmalloc"); - rbuf = (uint8_t *)HDcalloc(sizeof(uint8_t), (size_t)(SPACE2_DIM1 * SPACE2_DIM2)); - CHECK_PTR(rbuf, "HDcalloc"); + wbuf = (uint8_t *)malloc(sizeof(uint8_t) * SPACE2_DIM1 * SPACE2_DIM2); + CHECK_PTR(wbuf, "malloc"); + rbuf = (uint8_t *)calloc(sizeof(uint8_t), (size_t)(SPACE2_DIM1 * SPACE2_DIM2)); + CHECK_PTR(rbuf, "calloc"); /* Initialize write buffer */ for (i = 0, tbuf = wbuf; i < SPACE2_DIM1; i++) @@ -5953,8 +5953,8 @@ test_select_hyper_xor_2d(void) CHECK(ret, FAIL, "H5Fclose"); /* Free memory buffers */ - HDfree(wbuf); - HDfree(rbuf); + free(wbuf); + free(rbuf); } /* test_select_hyper_xor_2d() */ /**************************************************************** @@ -5987,10 +5987,10 @@ test_select_hyper_notb_2d(void) MESSAGE(5, ("Testing Hyperslab Selection Functions with NOTB of 2-D hyperslabs\n")); /* Allocate write & read buffers */ - wbuf = (uint8_t *)HDmalloc(sizeof(uint8_t) * SPACE2_DIM1 * SPACE2_DIM2); - CHECK_PTR(wbuf, "HDmalloc"); - rbuf = (uint8_t *)HDcalloc(sizeof(uint8_t), (size_t)(SPACE2_DIM1 * SPACE2_DIM2)); - CHECK_PTR(rbuf, "HDcalloc"); + wbuf = (uint8_t *)malloc(sizeof(uint8_t) * SPACE2_DIM1 * SPACE2_DIM2); + CHECK_PTR(wbuf, "malloc"); + rbuf = (uint8_t *)calloc(sizeof(uint8_t), (size_t)(SPACE2_DIM1 * SPACE2_DIM2)); + CHECK_PTR(rbuf, "calloc"); /* Initialize write buffer */ for (i = 0, tbuf = wbuf; i < SPACE2_DIM1; i++) @@ -6092,8 +6092,8 @@ test_select_hyper_notb_2d(void) CHECK(ret, FAIL, "H5Fclose"); /* Free memory buffers */ - HDfree(wbuf); - HDfree(rbuf); + free(wbuf); + free(rbuf); } /* test_select_hyper_notb_2d() */ /**************************************************************** @@ -6126,10 +6126,10 @@ test_select_hyper_nota_2d(void) MESSAGE(5, ("Testing Hyperslab Selection Functions with NOTA of 2-D hyperslabs\n")); /* Allocate write & read buffers */ - wbuf = (uint8_t *)HDmalloc(sizeof(uint8_t) * SPACE2_DIM1 * SPACE2_DIM2); - CHECK_PTR(wbuf, "HDmalloc"); - rbuf = (uint8_t *)HDcalloc(sizeof(uint8_t), (size_t)(SPACE2_DIM1 * SPACE2_DIM2)); - CHECK_PTR(rbuf, "HDcalloc"); + wbuf = (uint8_t *)malloc(sizeof(uint8_t) * SPACE2_DIM1 * SPACE2_DIM2); + CHECK_PTR(wbuf, "malloc"); + rbuf = (uint8_t *)calloc(sizeof(uint8_t), (size_t)(SPACE2_DIM1 * SPACE2_DIM2)); + CHECK_PTR(rbuf, "calloc"); /* Initialize write buffer */ for (i = 0, tbuf = wbuf; i < SPACE2_DIM1; i++) @@ -6232,8 +6232,8 @@ test_select_hyper_nota_2d(void) CHECK(ret, FAIL, "H5Fclose"); /* Free memory buffers */ - HDfree(wbuf); - HDfree(rbuf); + free(wbuf); + free(rbuf); } /* test_select_hyper_nota_2d() */ /**************************************************************** @@ -6297,11 +6297,11 @@ test_select_hyper_union_random_5d(hid_t read_plist) MESSAGE(5, ("Testing Hyperslab Selection Functions with random unions of 5-D hyperslabs\n")); /* Allocate write & read buffers */ - wbuf = (int *)HDmalloc(sizeof(int) * SPACE5_DIM1 * SPACE5_DIM2 * SPACE5_DIM3 * SPACE5_DIM4 * SPACE5_DIM5); - CHECK_PTR(wbuf, "HDmalloc"); - rbuf = (int *)HDcalloc(sizeof(int), - (size_t)(SPACE5_DIM1 * SPACE5_DIM2 * SPACE5_DIM3 * SPACE5_DIM4 * SPACE5_DIM5)); - CHECK_PTR(rbuf, "HDcalloc"); + wbuf = (int *)malloc(sizeof(int) * SPACE5_DIM1 * SPACE5_DIM2 * SPACE5_DIM3 * SPACE5_DIM4 * SPACE5_DIM5); + CHECK_PTR(wbuf, "malloc"); + rbuf = (int *)calloc(sizeof(int), + (size_t)(SPACE5_DIM1 * SPACE5_DIM2 * SPACE5_DIM3 * SPACE5_DIM4 * SPACE5_DIM5)); + CHECK_PTR(rbuf, "calloc"); /* Initialize write buffer */ for (i = 0, tbuf = wbuf; i < SPACE5_DIM1; i++) @@ -6410,8 +6410,8 @@ test_select_hyper_union_random_5d(hid_t read_plist) CHECK(ret, FAIL, "H5Fclose"); /* Free memory buffers */ - HDfree(wbuf); - HDfree(rbuf); + free(wbuf); + free(rbuf); } /* test_select_hyper_union_random_5d() */ /**************************************************************** @@ -6452,10 +6452,10 @@ test_select_hyper_chunk(hid_t fapl_plist, hid_t xfer_plist) MESSAGE(5, ("Testing Hyperslab I/O on Large Chunks\n")); /* Allocate the transfer buffers */ - data = (short *)HDmalloc(sizeof(short) * X * Y * Z); - CHECK_PTR(data, "HDmalloc"); - data_out = (short *)HDcalloc((size_t)(NX * NY * NZ), sizeof(short)); - CHECK_PTR(data_out, "HDcalloc"); + data = (short *)malloc(sizeof(short) * X * Y * Z); + CHECK_PTR(data, "malloc"); + data_out = (short *)calloc((size_t)(NX * NY * NZ), sizeof(short)); + CHECK_PTR(data_out, "calloc"); /* * Data buffer initialization. @@ -6636,8 +6636,8 @@ test_select_hyper_chunk(hid_t fapl_plist, hid_t xfer_plist) CHECK(status, FAIL, "H5Sclose"); status = H5Fclose(file); CHECK(status, FAIL, "H5Fclose"); - HDfree(data); - HDfree(data_out); + free(data); + free(data_out); } /* test_select_hyper_chunk() */ /**************************************************************** @@ -6678,10 +6678,10 @@ test_select_point_chunk(void) MESSAGE(5, ("Testing Point Selections on Chunked Datasets\n")); /* Allocate the transfer buffers */ - data = (unsigned *)HDmalloc(sizeof(unsigned) * SPACE7_DIM1 * SPACE7_DIM2); - CHECK_PTR(data, "HDmalloc"); - data_out = (unsigned *)HDcalloc((size_t)(SPACE7_DIM1 * SPACE7_DIM2), sizeof(unsigned)); - CHECK_PTR(data_out, "HDcalloc"); + data = (unsigned *)malloc(sizeof(unsigned) * SPACE7_DIM1 * SPACE7_DIM2); + CHECK_PTR(data, "malloc"); + data_out = (unsigned *)calloc((size_t)(SPACE7_DIM1 * SPACE7_DIM2), sizeof(unsigned)); + CHECK_PTR(data_out, "calloc"); /* * Data buffer initialization. @@ -6834,8 +6834,8 @@ test_select_point_chunk(void) ret = H5Fclose(file); CHECK(ret, FAIL, "H5Fclose"); - HDfree(data); - HDfree(data_out); + free(data); + free(data_out); } /* test_select_point_chunk() */ /**************************************************************** @@ -7457,8 +7457,8 @@ test_select_fill_all(void) MESSAGE(5, ("Testing Filling 'all' Selections\n")); /* Allocate memory buffer */ - wbuf = (unsigned *)HDmalloc(sizeof(unsigned) * SPACE7_DIM1 * SPACE7_DIM2); - CHECK_PTR(wbuf, "HDmalloc"); + wbuf = (unsigned *)malloc(sizeof(unsigned) * SPACE7_DIM1 * SPACE7_DIM2); + CHECK_PTR(wbuf, "malloc"); /* Initialize memory buffer */ for (u = 0, tbuf = wbuf; u < SPACE7_DIM1; u++) @@ -7505,7 +7505,7 @@ test_select_fill_all(void) CHECK(ret, FAIL, "H5Sclose"); /* Free memory buffers */ - HDfree(wbuf); + free(wbuf); } /* test_select_fill_all() */ /**************************************************************** @@ -7533,8 +7533,8 @@ test_select_fill_point(hssize_t *offset) MESSAGE(5, ("Testing Filling 'point' Selections\n")); /* Allocate memory buffer */ - wbuf = (unsigned *)HDmalloc(sizeof(unsigned) * SPACE7_DIM1 * SPACE7_DIM2); - CHECK_PTR(wbuf, "HDmalloc"); + wbuf = (unsigned *)malloc(sizeof(unsigned) * SPACE7_DIM1 * SPACE7_DIM2); + CHECK_PTR(wbuf, "malloc"); /* Initialize memory buffer */ for (u = 0, tbuf = wbuf; u < SPACE7_DIM1; u++) @@ -7603,7 +7603,7 @@ test_select_fill_point(hssize_t *offset) CHECK(ret, FAIL, "H5Sclose"); /* Free memory buffers */ - HDfree(wbuf); + free(wbuf); } /* test_select_fill_point() */ /**************************************************************** @@ -7633,8 +7633,8 @@ test_select_fill_hyper_simple(hssize_t *offset) MESSAGE(5, ("Testing Filling Simple 'hyperslab' Selections\n")); /* Allocate memory buffer */ - wbuf = (unsigned *)HDmalloc(sizeof(unsigned) * SPACE7_DIM1 * SPACE7_DIM2); - CHECK_PTR(wbuf, "HDmalloc"); + wbuf = (unsigned *)malloc(sizeof(unsigned) * SPACE7_DIM1 * SPACE7_DIM2); + CHECK_PTR(wbuf, "malloc"); /* Initialize memory buffer */ for (u = 0, tbuf = wbuf; u < SPACE7_DIM1; u++) @@ -7709,7 +7709,7 @@ test_select_fill_hyper_simple(hssize_t *offset) CHECK(ret, FAIL, "H5Sclose"); /* Free memory buffers */ - HDfree(wbuf); + free(wbuf); } /* test_select_fill_hyper_simple() */ /**************************************************************** @@ -7744,8 +7744,8 @@ test_select_fill_hyper_regular(hssize_t *offset) MESSAGE(5, ("Testing Filling Regular 'hyperslab' Selections\n")); /* Allocate memory buffer */ - wbuf = (unsigned *)HDmalloc(sizeof(unsigned) * SPACE7_DIM1 * SPACE7_DIM2); - CHECK_PTR(wbuf, "HDmalloc"); + wbuf = (unsigned *)malloc(sizeof(unsigned) * SPACE7_DIM1 * SPACE7_DIM2); + CHECK_PTR(wbuf, "malloc"); /* Initialize memory buffer */ for (u = 0, tbuf = wbuf; u < SPACE7_DIM1; u++) @@ -7822,7 +7822,7 @@ test_select_fill_hyper_regular(hssize_t *offset) CHECK(ret, FAIL, "H5Sclose"); /* Free memory buffers */ - HDfree(wbuf); + free(wbuf); } /* test_select_fill_hyper_regular() */ /**************************************************************** @@ -7864,8 +7864,8 @@ test_select_fill_hyper_irregular(hssize_t *offset) MESSAGE(5, ("Testing Filling Irregular 'hyperslab' Selections\n")); /* Allocate memory buffer */ - wbuf = (unsigned *)HDmalloc(sizeof(unsigned) * SPACE7_DIM1 * SPACE7_DIM2); - CHECK_PTR(wbuf, "HDmalloc"); + wbuf = (unsigned *)malloc(sizeof(unsigned) * SPACE7_DIM1 * SPACE7_DIM2); + CHECK_PTR(wbuf, "malloc"); /* Initialize memory buffer */ for (u = 0, tbuf = wbuf; u < SPACE7_DIM1; u++) @@ -7946,7 +7946,7 @@ test_select_fill_hyper_irregular(hssize_t *offset) CHECK(ret, FAIL, "H5Sclose"); /* Free memory buffers */ - HDfree(wbuf); + free(wbuf); } /* test_select_fill_hyper_irregular() */ /**************************************************************** @@ -7973,10 +7973,10 @@ test_select_none(void) MESSAGE(5, ("Testing I/O on 0-sized Selections\n")); /* Allocate write & read buffers */ - wbuf = (uint8_t *)HDmalloc(sizeof(uint8_t) * SPACE7_DIM1 * SPACE7_DIM2); - CHECK_PTR(wbuf, "HDmalloc"); - rbuf = (uint8_t *)HDcalloc(sizeof(uint8_t), SPACE7_DIM1 * SPACE7_DIM2); - CHECK_PTR(rbuf, "HDcalloc"); + wbuf = (uint8_t *)malloc(sizeof(uint8_t) * SPACE7_DIM1 * SPACE7_DIM2); + CHECK_PTR(wbuf, "malloc"); + rbuf = (uint8_t *)calloc(sizeof(uint8_t), SPACE7_DIM1 * SPACE7_DIM2); + CHECK_PTR(rbuf, "calloc"); /* Initialize write buffer */ for (i = 0, tbuf = wbuf; i < SPACE7_DIM1; i++) @@ -8043,8 +8043,8 @@ test_select_none(void) CHECK(ret, FAIL, "H5Fclose"); /* Free memory buffers */ - HDfree(wbuf); - HDfree(rbuf); + free(wbuf); + free(rbuf); } /* test_select_none() */ /**************************************************************** @@ -8076,10 +8076,10 @@ test_scalar_select(void) MESSAGE(5, ("Testing I/O on Selections in Scalar Dataspaces\n")); /* Allocate write & read buffers */ - wbuf_uint8 = (uint8_t *)HDmalloc(sizeof(uint8_t) * SPACE7_DIM1 * SPACE7_DIM2); - CHECK_PTR(wbuf_uint8, "HDmalloc"); - wbuf_ushort = (unsigned short *)HDmalloc(sizeof(unsigned short) * SPACE7_DIM1 * SPACE7_DIM2); - CHECK_PTR(wbuf_ushort, "HDmalloc"); + wbuf_uint8 = (uint8_t *)malloc(sizeof(uint8_t) * SPACE7_DIM1 * SPACE7_DIM2); + CHECK_PTR(wbuf_uint8, "malloc"); + wbuf_ushort = (unsigned short *)malloc(sizeof(unsigned short) * SPACE7_DIM1 * SPACE7_DIM2); + CHECK_PTR(wbuf_ushort, "malloc"); /* Initialize write buffers */ for (i = 0, tbuf_uint8 = wbuf_uint8, tbuf_ushort = wbuf_ushort; i < SPACE7_DIM1; i++) @@ -8202,8 +8202,8 @@ test_scalar_select(void) CHECK(ret, FAIL, "H5Fclose"); /* Free memory buffers */ - HDfree(wbuf_uint8); - HDfree(wbuf_ushort); + free(wbuf_uint8); + free(wbuf_ushort); } /* test_scalar_select() */ /**************************************************************** @@ -13560,10 +13560,10 @@ test_select_hyper_chunk_offset(void) MESSAGE(6, ("Testing hyperslab selections using offsets in chunked datasets\n")); /* Allocate buffers */ - wbuf = (int *)HDmalloc(sizeof(int) * SPACE10_DIM1); - CHECK_PTR(wbuf, "HDmalloc"); - rbuf = (int *)HDcalloc(sizeof(int), SPACE10_DIM1); - CHECK_PTR(rbuf, "HDcalloc"); + wbuf = (int *)malloc(sizeof(int) * SPACE10_DIM1); + CHECK_PTR(wbuf, "malloc"); + rbuf = (int *)calloc(sizeof(int), SPACE10_DIM1); + CHECK_PTR(rbuf, "calloc"); /* Initialize the write buffer */ for (i = 0; i < SPACE10_DIM1; i++) @@ -13743,8 +13743,8 @@ test_select_hyper_chunk_offset(void) CHECK(ret, FAIL, "H5Fclose"); /* Free the buffers */ - HDfree(wbuf); - HDfree(rbuf); + free(wbuf); + free(rbuf); } /* test_select_hyper_chunk_offset() */ /**************************************************************** |