summaryrefslogtreecommitdiffstats
path: root/c++/test/trefer.cpp
diff options
context:
space:
mode:
authorDana Robinson <43805+derobins@users.noreply.github.com>2023-07-27 18:21:30 (GMT)
committerGitHub <noreply@github.com>2023-07-27 18:21:30 (GMT)
commit6ab73579f801a95a33359bf6f81d62fea99333d4 (patch)
tree8f5577ac3ad3918d3fd8ee9dd79dae4d4a47482f /c++/test/trefer.cpp
parent576aed793157c2c07a623f317ca65421fc2e73b4 (diff)
downloadhdf5-6ab73579f801a95a33359bf6f81d62fea99333d4.zip
hdf5-6ab73579f801a95a33359bf6f81d62fea99333d4.tar.gz
hdf5-6ab73579f801a95a33359bf6f81d62fea99333d4.tar.bz2
Normalize C++ w/ develop (#3279)
Diffstat (limited to 'c++/test/trefer.cpp')
-rw-r--r--c++/test/trefer.cpp52
1 files changed, 26 insertions, 26 deletions
diff --git a/c++/test/trefer.cpp b/c++/test/trefer.cpp
index fc7931f..31c5022 100644
--- a/c++/test/trefer.cpp
+++ b/c++/test/trefer.cpp
@@ -80,9 +80,9 @@ test_reference_params()
// Allocate write & read buffers
size_t temp_size = MAX(sizeof(unsigned), sizeof(hobj_ref_t));
- wbuf = static_cast<hobj_ref_t *>(HDmalloc(temp_size * SPACE1_DIM1));
- rbuf = static_cast<hobj_ref_t *>(HDmalloc(temp_size * SPACE1_DIM1));
- tbuf = static_cast<hobj_ref_t *>(HDmalloc(temp_size * SPACE1_DIM1));
+ wbuf = static_cast<hobj_ref_t *>(malloc(temp_size * SPACE1_DIM1));
+ rbuf = static_cast<hobj_ref_t *>(malloc(temp_size * SPACE1_DIM1));
+ tbuf = static_cast<hobj_ref_t *>(malloc(temp_size * SPACE1_DIM1));
// Create file FILE1
file1 = new H5File(FILE1, H5F_ACC_TRUNC);
@@ -168,9 +168,9 @@ test_reference_params()
// Let sid1 go out of scope
// Free memory buffers
- HDfree(wbuf);
- HDfree(rbuf);
- HDfree(tbuf);
+ free(wbuf);
+ free(rbuf);
+ free(tbuf);
PASSED();
} // end try
@@ -206,9 +206,9 @@ test_reference_obj()
// Allocate write & read buffers
size_t temp_size = MAX(sizeof(unsigned), sizeof(hobj_ref_t));
- wbuf = static_cast<hobj_ref_t *>(HDmalloc(temp_size * SPACE1_DIM1));
- rbuf = static_cast<hobj_ref_t *>(HDmalloc(temp_size * SPACE1_DIM1));
- tbuf = static_cast<hobj_ref_t *>(HDmalloc(temp_size * SPACE1_DIM1));
+ wbuf = static_cast<hobj_ref_t *>(malloc(temp_size * SPACE1_DIM1));
+ rbuf = static_cast<hobj_ref_t *>(malloc(temp_size * SPACE1_DIM1));
+ tbuf = static_cast<hobj_ref_t *>(malloc(temp_size * SPACE1_DIM1));
// Create file FILE1
file1 = new H5File(FILE1, H5F_ACC_TRUNC);
@@ -368,9 +368,9 @@ test_reference_obj()
file1->close();
// Free allocated buffers
- HDfree(wbuf);
- HDfree(rbuf);
- HDfree(tbuf);
+ free(wbuf);
+ free(rbuf);
+ free(tbuf);
PASSED();
} // end try
@@ -488,14 +488,14 @@ test_reference_group()
// Check object type using Group::getObjinfo()
H5O_info2_t oinfo;
- HDmemset(&oinfo, 0, sizeof(oinfo));
+ memset(&oinfo, 0, sizeof(oinfo));
group.getObjinfo(".", H5_INDEX_NAME, H5_ITER_INC, 0, oinfo);
verify_val(static_cast<long>(oinfo.type), static_cast<long>(H5O_TYPE_DATASET), "Group::getObjinfo",
__LINE__, __FILE__);
// Check for out of bound query by index
try {
- HDmemset(&oinfo, 0, sizeof(oinfo));
+ memset(&oinfo, 0, sizeof(oinfo));
group.getObjinfo(".", H5_INDEX_NAME, H5_ITER_INC, 9, oinfo);
// Should FAIL but didn't, so throw an invalid action exception
@@ -555,10 +555,10 @@ test_reference_region_1D()
*drbuf; // Buffer for reading numeric data from disk
// Allocate write & read buffers
- wbuf = static_cast<hdset_reg_ref_t *>(HDcalloc(sizeof(hdset_reg_ref_t), SPACE1_DIM1));
- rbuf = static_cast<hdset_reg_ref_t *>(HDmalloc(sizeof(hdset_reg_ref_t) * SPACE1_DIM1));
- dwbuf = static_cast<uint8_t *>(HDmalloc(sizeof(uint8_t) * SPACE3_DIM1));
- drbuf = static_cast<uint8_t *>(HDcalloc(sizeof(uint8_t), SPACE3_DIM1));
+ wbuf = static_cast<hdset_reg_ref_t *>(calloc(sizeof(hdset_reg_ref_t), SPACE1_DIM1));
+ rbuf = static_cast<hdset_reg_ref_t *>(malloc(sizeof(hdset_reg_ref_t) * SPACE1_DIM1));
+ dwbuf = static_cast<uint8_t *>(malloc(sizeof(uint8_t) * SPACE3_DIM1));
+ drbuf = static_cast<uint8_t *>(calloc(sizeof(uint8_t), SPACE3_DIM1));
// Create file FILE1
H5File file1(FILE2, H5F_ACC_TRUNC);
@@ -714,7 +714,7 @@ test_reference_region_1D()
/* Allocate space for the hyperslab blocks */
coords =
- static_cast<hsize_t *>(HDmalloc(static_cast<size_t>(nelms) * SPACE3_RANK * sizeof(hsize_t) * 2));
+ static_cast<hsize_t *>(malloc(static_cast<size_t>(nelms) * SPACE3_RANK * sizeof(hsize_t) * 2));
// Get the list of hyperslab blocks currently selected
reg_sp.getSelectHyperBlocklist(0, static_cast<hsize_t>(nelms), coords);
@@ -751,7 +751,7 @@ test_reference_region_1D()
verify_val(static_cast<long>(coords[28]), 72, "Hyperslab Coordinates", __LINE__, __FILE__);
verify_val(static_cast<long>(coords[29]), 73, "Hyperslab Coordinates", __LINE__, __FILE__);
- HDfree(coords);
+ free(coords);
// Check boundaries
reg_sp.getSelectBounds(low, high);
@@ -774,7 +774,7 @@ test_reference_region_1D()
/* Allocate space for the hyperslab blocks */
coords =
- static_cast<hsize_t *>(HDmalloc(static_cast<size_t>(nelmspts) * SPACE3_RANK * sizeof(hsize_t)));
+ static_cast<hsize_t *>(malloc(static_cast<size_t>(nelmspts) * SPACE3_RANK * sizeof(hsize_t)));
// Get the list of element points currently selected
elm_sp.getSelectElemPointlist(0, static_cast<hsize_t>(nelmspts), coords);
@@ -791,7 +791,7 @@ test_reference_region_1D()
verify_val(coords[8], coord1[8][0], "Element Coordinates", __LINE__, __FILE__);
verify_val(coords[9], coord1[9][0], "Element Coordinates", __LINE__, __FILE__);
- HDfree(coords);
+ free(coords);
// Check boundaries
elm_sp.getSelectBounds(low, high);
@@ -808,10 +808,10 @@ test_reference_region_1D()
file1.close();
// Free memory buffers
- HDfree(wbuf);
- HDfree(rbuf);
- HDfree(dwbuf);
- HDfree(drbuf);
+ free(wbuf);
+ free(rbuf);
+ free(dwbuf);
+ free(drbuf);
PASSED();
} // end try