summaryrefslogtreecommitdiffstats
path: root/tools/test/misc/h5perf_gentest.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/test/misc/h5perf_gentest.c')
-rw-r--r--tools/test/misc/h5perf_gentest.c54
1 files changed, 27 insertions, 27 deletions
diff --git a/tools/test/misc/h5perf_gentest.c b/tools/test/misc/h5perf_gentest.c
index 24d0581..7756914 100644
--- a/tools/test/misc/h5perf_gentest.c
+++ b/tools/test/misc/h5perf_gentest.c
@@ -103,7 +103,7 @@ main(int argc, char *argv[])
}
if (strlen(fname) <= 0)
- HDsnprintf(fname, sizeof(fname), FNAME);
+ snprintf(fname, sizeof(fname), FNAME);
create_perf_test_file(fname, ngrps, ndsets, nattrs, (hsize_t)nrows, (hsize_t)dim0, (hsize_t)chunk, vlen,
z, l);
@@ -322,7 +322,7 @@ create_perf_test_file(const char *fname, int ngrps, int ndsets, int nattrs, hsiz
fid = H5Fcreate(fname, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
add_attrs(fid, 0);
- HDsnprintf(name, sizeof(name), "a cmp ds of %d rows", nrows);
+ snprintf(name, sizeof(name), "a cmp ds of %d rows", nrows);
did = H5Dcreate(fid, name, cmp_tid, sid_large, H5P_DEFAULT, dcpl, H5P_DEFAULT);
H5Dwrite(did, cmp_tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf_comp_large);
add_attrs(did, 0);
@@ -342,7 +342,7 @@ create_perf_test_file(const char *fname, int ngrps, int ndsets, int nattrs, hsiz
add_attrs(gid1, 0);
for (i = 0; i < ngrps; i++) {
/* create sub groups */
- HDsnprintf(name, sizeof(name), "g%02d", i);
+ snprintf(name, sizeof(name), "g%02d", i);
gid2 = H5Gcreate(gid1, name, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (i < 10)
add_attrs(gid2, 0);
@@ -355,14 +355,14 @@ create_perf_test_file(const char *fname, int ngrps, int ndsets, int nattrs, hsiz
add_attrs(gid1, 0);
for (j = 0; j < ndsets; j += 12) {
/* 1 add a null dataset */
- HDsnprintf(name, sizeof(name), "%05d null dataset", j);
+ snprintf(name, sizeof(name), "%05d null dataset", j);
did = H5Dcreate(gid1, name, H5T_STD_I32LE, sid_null, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (!j)
add_attrs(did, j);
H5Dclose(did);
/* 2 add scalar int point */
- HDsnprintf(name, sizeof(name), "%05d scalar int point", j);
+ snprintf(name, sizeof(name), "%05d scalar int point", j);
did = H5Dcreate(gid1, name, H5T_NATIVE_INT, sid_scalar, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
H5Dwrite(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, &j);
if (!j)
@@ -370,7 +370,7 @@ create_perf_test_file(const char *fname, int ngrps, int ndsets, int nattrs, hsiz
H5Dclose(did);
/* 3 scalar vlen string */
- HDsnprintf(name, sizeof(name), "%05d scalar vlen string", j);
+ snprintf(name, sizeof(name), "%05d scalar vlen string", j);
did = H5Dcreate(gid1, name, tid_vlen_s, sid_scalar, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
H5Dwrite(did, tid_vlen_s, H5S_ALL, H5S_ALL, H5P_DEFAULT, &buf_vlen_s[0]);
if (!j)
@@ -378,7 +378,7 @@ create_perf_test_file(const char *fname, int ngrps, int ndsets, int nattrs, hsiz
H5Dclose(did);
/* 4 add fixed-length float array */
- HDsnprintf(name, sizeof(name), "%05d fixed-length float array", j);
+ snprintf(name, sizeof(name), "%05d fixed-length float array", j);
did = H5Dcreate(gid1, name, tid_array_f, sid_1d, H5P_DEFAULT, dcpl, H5P_DEFAULT);
H5Dwrite(did, tid_array_f, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf_float_a);
if (!j)
@@ -386,7 +386,7 @@ create_perf_test_file(const char *fname, int ngrps, int ndsets, int nattrs, hsiz
H5Dclose(did);
/* 5 add fixed-length strings */
- HDsnprintf(name, sizeof(name), "%05d fixed-length strings", j);
+ snprintf(name, sizeof(name), "%05d fixed-length strings", j);
did = H5Dcreate(gid1, name, tid_str, sid_1d, H5P_DEFAULT, dcpl, H5P_DEFAULT);
H5Dwrite(did, tid_str, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf_str);
if (!j)
@@ -394,7 +394,7 @@ create_perf_test_file(const char *fname, int ngrps, int ndsets, int nattrs, hsiz
H5Dclose(did);
/* 6 add compound data */
- HDsnprintf(name, sizeof(name), "%05d compound data", j);
+ snprintf(name, sizeof(name), "%05d compound data", j);
did = H5Dcreate(gid1, name, cmp_tid, sid_1d, H5P_DEFAULT, dcpl, H5P_DEFAULT);
H5Dwrite(did, cmp_tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf_comp);
if (!j)
@@ -402,7 +402,7 @@ create_perf_test_file(const char *fname, int ngrps, int ndsets, int nattrs, hsiz
H5Dclose(did);
/* 7 add 2D double */
- HDsnprintf(name, sizeof(name), "%05d 2D double", j);
+ snprintf(name, sizeof(name), "%05d 2D double", j);
strcpy(tmp_name1, name);
did = H5Dcreate(gid1, name, H5T_NATIVE_DOUBLE, sid_2d, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
H5Dwrite(did, H5T_NATIVE_DOUBLE, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf_double2d[0]);
@@ -411,7 +411,7 @@ create_perf_test_file(const char *fname, int ngrps, int ndsets, int nattrs, hsiz
H5Dclose(did);
/* 8 add 1D int array */
- HDsnprintf(name, sizeof(name), "%05d 1D int array", j);
+ snprintf(name, sizeof(name), "%05d 1D int array", j);
did = H5Dcreate(gid1, name, H5T_NATIVE_INT, sid_1d, H5P_DEFAULT, dcpl, H5P_DEFAULT);
H5Dwrite(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf_int);
if (!j)
@@ -419,7 +419,7 @@ create_perf_test_file(const char *fname, int ngrps, int ndsets, int nattrs, hsiz
H5Dclose(did);
/* 9 add vlen int array */
- HDsnprintf(name, sizeof(name), "%05d vlen int array", j);
+ snprintf(name, sizeof(name), "%05d vlen int array", j);
strcpy(tmp_name2, name);
did = H5Dcreate(gid1, name, tid_vlen_i, sid_1d, H5P_DEFAULT, dcpl, H5P_DEFAULT);
H5Dwrite(did, tid_vlen_i, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf_vlen_i);
@@ -428,7 +428,7 @@ create_perf_test_file(const char *fname, int ngrps, int ndsets, int nattrs, hsiz
H5Dclose(did);
/* 10 add vlen strings */
- HDsnprintf(name, sizeof(name), "%05d vlen strings", j);
+ snprintf(name, sizeof(name), "%05d vlen strings", j);
strcpy(tmp_name3, name);
did = H5Dcreate(gid1, name, tid_vlen_s, sid_1d, H5P_DEFAULT, dcpl, H5P_DEFAULT);
H5Dwrite(did, tid_vlen_s, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf_vlen_s);
@@ -439,7 +439,7 @@ create_perf_test_file(const char *fname, int ngrps, int ndsets, int nattrs, hsiz
/* 11 add object refs */
H5Rcreate(&buf_ref[0], gid1, ".", H5R_OBJECT, (hid_t)-1);
H5Rcreate(&buf_ref[1], gid1, tmp_name3, H5R_OBJECT, (hid_t)-1);
- HDsnprintf(name, sizeof(name), "%05d obj refs", j);
+ snprintf(name, sizeof(name), "%05d obj refs", j);
did = H5Dcreate(gid1, name, H5T_STD_REF_OBJ, sid_2, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
H5Dwrite(did, H5T_STD_REF_OBJ, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf_ref);
if (!j)
@@ -454,7 +454,7 @@ create_perf_test_file(const char *fname, int ngrps, int ndsets, int nattrs, hsiz
H5Sselect_hyperslab(sid_1d, H5S_SELECT_SET, &start, &stride, &count, NULL);
H5Rcreate(&buf_reg_ref[1], gid1, tmp_name2, H5R_DATASET_REGION, sid_1d);
H5Sselect_none(sid_1d);
- HDsnprintf(name, sizeof(name), "%05d region refs", j);
+ snprintf(name, sizeof(name), "%05d region refs", j);
did = H5Dcreate(gid1, name, H5T_STD_REF_DSETREG, sid_2, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
H5Dwrite(did, H5T_STD_REF_DSETREG, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf_reg_ref);
if (!j)
@@ -570,11 +570,11 @@ add_attrs(hid_t oid, int idx)
/* 1 scalar point */
sid = H5Screate(H5S_SCALAR);
- HDsnprintf(name, sizeof(name), "%05d scalar int", idx);
+ snprintf(name, sizeof(name), "%05d scalar int", idx);
nattrs += add_attr(oid, name, H5T_NATIVE_UINT, sid, &i);
- HDsnprintf(name, sizeof(name), "%05d scalar ulong", idx);
+ snprintf(name, sizeof(name), "%05d scalar ulong", idx);
nattrs += add_attr(oid, name, H5T_NATIVE_INT64, sid, &l);
- HDsnprintf(name, sizeof(name), "%05d scalar str", idx);
+ snprintf(name, sizeof(name), "%05d scalar str", idx);
tid = H5Tcopy(H5T_C_S1);
H5Tset_size(tid, H5T_VARIABLE);
nattrs += add_attr(oid, name, tid, sid, &s[2]);
@@ -584,24 +584,24 @@ add_attrs(hid_t oid, int idx)
/* 4 single point */
sid = H5Screate_simple(1, dims1, NULL);
H5Rcreate(&ref, oid, ".", H5R_OBJECT, (hid_t)-1);
- HDsnprintf(name, sizeof(name), "%05d single float", idx);
+ snprintf(name, sizeof(name), "%05d single float", idx);
nattrs += add_attr(oid, name, H5T_NATIVE_FLOAT, sid, &f);
- HDsnprintf(name, sizeof(name), "%05d single double", idx);
+ snprintf(name, sizeof(name), "%05d single double", idx);
nattrs += add_attr(oid, name, H5T_NATIVE_DOUBLE, sid, &d);
- HDsnprintf(name, sizeof(name), "%05d single obj_ref", idx);
+ snprintf(name, sizeof(name), "%05d single obj_ref", idx);
nattrs += add_attr(oid, name, H5T_STD_REF_OBJ, sid, &ref);
H5Sclose(sid);
/* 7 fixed length 1D array */
sid = H5Screate_simple(1, dims1, NULL);
tid = H5Tarray_create(H5T_NATIVE_FLOAT, 1, dims2);
- HDsnprintf(name, sizeof(name), "%05d array float", idx);
+ snprintf(name, sizeof(name), "%05d array float", idx);
nattrs += add_attr(oid, name, tid, sid, &f_array[0]);
H5Tclose(tid);
tid = H5Tcopy(H5T_C_S1);
H5Tset_size(tid, strlen(s[0]) + 1);
tid1 = H5Tarray_create(tid, 1, dims2);
- HDsnprintf(name, sizeof(name), "%05d array str", idx);
+ snprintf(name, sizeof(name), "%05d array str", idx);
nattrs += add_attr(oid, name, tid1, sid, s);
H5Tclose(tid1);
H5Tclose(tid);
@@ -610,7 +610,7 @@ add_attrs(hid_t oid, int idx)
/* 9 fixed length 2D int arrays */
sid = H5Screate_simple(1, dims2, NULL);
tid = H5Tarray_create(H5T_NATIVE_INT, 2, dims3);
- HDsnprintf(name, sizeof(name), "%05d array int 2D", idx);
+ snprintf(name, sizeof(name), "%05d array int 2D", idx);
nattrs += add_attr(oid, name, tid, sid, int3d[0][0]);
H5Tclose(tid);
H5Sclose(sid);
@@ -619,12 +619,12 @@ add_attrs(hid_t oid, int idx)
sid = H5Screate_simple(1, dims2, NULL);
tid = H5Tcopy(H5T_C_S1);
H5Tset_size(tid, H5T_VARIABLE);
- HDsnprintf(name, sizeof(name), "%05d vlen strings", idx);
+ snprintf(name, sizeof(name), "%05d vlen strings", idx);
nattrs += add_attr(oid, name, tid, sid, s_vlen);
H5Tclose(tid);
tid = H5Tvlen_create(H5T_NATIVE_INT);
;
- HDsnprintf(name, sizeof(name), "%05d vlen int array", idx);
+ snprintf(name, sizeof(name), "%05d vlen int array", idx);
nattrs += add_attr(oid, name, tid, sid, i_vlen);
H5Tclose(tid);
H5Sclose(sid);
@@ -638,7 +638,7 @@ add_attrs(hid_t oid, int idx)
offset += sizeof(H5T_NATIVE_INT);
H5Tinsert(tid, "City", offset, tid1);
offset += sizeof(char *);
- HDsnprintf(name, sizeof(name), "%05d compound data", idx);
+ snprintf(name, sizeof(name), "%05d compound data", idx);
nattrs += add_attr(oid, name, tid, sid, cmp_data);
H5Tclose(tid1);
H5Tclose(tid);