From a19923d07aec07eb7ce1be81374aa3693594480a Mon Sep 17 00:00:00 2001 From: Allen Byrne <50328838+byrnHDF@users.noreply.github.com> Date: Mon, 18 Oct 2021 22:32:30 -0500 Subject: 1.8 Merge Remove clang warnings from develop (#1099) * Merge Remove clang warnings from develop * revert HD prefix --- hl/test/test_ds.c | 32 ++++---- hl/test/test_file_image.c | 12 +-- hl/test/test_image.c | 11 +-- hl/test/test_lite.c | 34 +++++---- hl/test/test_packet.c | 8 +- hl/test/test_table.c | 46 ++++++------ hl/tools/gif2h5/h52gifgentst.c | 2 +- src/H5ACprivate.h | 40 +++++----- test/cache_api.c | 130 ++++++++++++++++---------------- tools/h5diff/h5diffgentest.c | 164 ++++++++++++++++++++--------------------- tools/h5dump/h5dumpgentest.c | 44 +++++------ tools/lib/h5diff_array.c | 14 ++-- tools/perform/chunk.c | 16 ++-- tools/perform/overhead.c | 2 +- tools/perform/zip_perf.c | 13 ++-- 15 files changed, 285 insertions(+), 283 deletions(-) diff --git a/hl/test/test_ds.c b/hl/test/test_ds.c index 941b44a..119040c 100644 --- a/hl/test/test_ds.c +++ b/hl/test/test_ds.c @@ -406,10 +406,10 @@ create_int_dataset(hid_t fid, const char *dsidx, int fulldims) herr_t create_long_dataset(hid_t fid, const char *dsname, const char *dsidx, int fulldims) { - int rank = 4; - int rankds = 1; - hsize_t dims[4] = {DIM1_SIZE, DIM2_SIZE, DIM3_SIZE, DIM4_SIZE}; - long * buf; + int rank = 4; + int rankds = 1; + hsize_t dims[4] = {DIM1_SIZE, DIM2_SIZE, DIM3_SIZE, DIM4_SIZE}; + long * buf = NULL; hsize_t s1_dim[1] = {DIM1_SIZE}; hsize_t s2_dim[1] = {DIM2_SIZE}; hsize_t s3_dim[1] = {DIM3_SIZE}; @@ -3554,9 +3554,9 @@ verify_scale(hid_t dset, unsigned dim, hid_t scale_id, void *visitor_data) int ret = 0; /* unused */ - dset = dset; - dim = dim; - visitor_data = visitor_data; + (void)dset; + (void)dim; + (void)visitor_data; /* define a positive value for return value. This will cause the iterator to immediately return that positive value, indicating short-circuit success @@ -3602,8 +3602,8 @@ read_scale(hid_t dset, unsigned dim, hid_t scale_id, void *visitor_data) char * data = (char *)visitor_data; /* unused */ - dset = dset; - dim = dim; + (void)dset; + (void)dim; /* get space */ if ((sid = H5Dget_space(scale_id)) < 0) @@ -3691,7 +3691,7 @@ match_dim_scale(hid_t did, unsigned dim, hid_t dsid, void *visitor_data) hsize_t storage_size; /* Stop compiler from whining about "unused parameters" */ - visitor_data = visitor_data; + (void)visitor_data; /*------------------------------------------------------------------------- * get DID (dataset) space info @@ -3769,9 +3769,9 @@ static herr_t op_continue(hid_t dset, unsigned dim, hid_t scale_id, void *visitor_data) { /* Stop compiler from whining about "unused parameters" */ - dset = dset; - dim = dim; - scale_id = scale_id; + (void)dset; + (void)dim; + (void)scale_id; if (visitor_data != NULL) { (*(int *)visitor_data)++; @@ -3802,9 +3802,9 @@ static herr_t op_stop(hid_t dset, unsigned dim, hid_t scale_id, void *visitor_data) { /* Stop compiler from whining about "unused parameters" */ - dset = dset; - dim = dim; - scale_id = scale_id; + (void)dset; + (void)dim; + (void)scale_id; if (visitor_data != NULL) { (*(int *)visitor_data)++; diff --git a/hl/test/test_file_image.c b/hl/test/test_file_image.c index 545d759..cc53b07 100644 --- a/hl/test/test_file_image.c +++ b/hl/test/test_file_image.c @@ -47,8 +47,8 @@ static int test_file_image(size_t open_images, size_t nflags, unsigned *flags) { - hid_t * file_id, *dset_id, file_space, plist; /* HDF5 ids */ - hsize_t dims1[RANK] = {2, 3}; /* original dimension of datasets */ + hid_t * file_id = NULL, *dset_id = NULL, file_space, plist; /* HDF5 ids */ + hsize_t dims1[RANK] = {2, 3}; /* original dimension of datasets */ hsize_t max_dims[RANK] = {H5S_UNLIMITED, H5S_UNLIMITED}; int data1[6] = {1, 2, 3, 4, 5, 6}; /* original contents of dataset */ int data2[6] = {7, 8, 9, 10, 11, 12}; /* "wrong" contents of dataset */ @@ -57,10 +57,10 @@ test_file_image(size_t open_images, size_t nflags, unsigned *flags) hsize_t dims4[RANK] = {3, 5}; /* extended dimensions of datasets */ int data4[15] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15}; /* extended contents of dataset */ - ssize_t * buf_size; /* pointer to array of buffer sizes */ - void ** buf_ptr; /* pointer to array of pointers to image buffers */ - char ** filename; /* pointer to array of pointers to filenames */ - unsigned * input_flags; /* pointer to array of flag combinations */ + ssize_t * buf_size = NULL; /* pointer to array of buffer sizes */ + void ** buf_ptr = NULL; /* pointer to array of pointers to image buffers */ + char ** filename = NULL; /* pointer to array of pointers to filenames */ + unsigned * input_flags = NULL; /* pointer to array of flag combinations */ size_t i, j, k, nrow, n_values; herr_t status1; void * handle_ptr = NULL; /* pointers to driver buffer */ diff --git a/hl/test/test_image.c b/hl/test/test_image.c index 0c7d511..dc1be96 100644 --- a/hl/test/test_image.c +++ b/hl/test/test_image.c @@ -650,10 +650,10 @@ test_generate(void) HL_TESTING2("make indexed image from land data"); for (i = 0; i < n_elements; i++) { - if (data[i] < 0) + if (data[i] < 0.0f) image_data[i] = 0; else - image_data[i] = (unsigned char)((255 * (data[i])) / xmax); + image_data[i] = (unsigned char)((255 * data[i]) / xmax); } /* make the image */ @@ -671,10 +671,11 @@ test_generate(void) HL_TESTING2("make indexed image from sea data"); for (i = 0; i < n_elements; i++) { - if (data[i] > 0) + if (data[i] > 0.0f) image_data[i] = 0; - else - image_data[i] = (unsigned char)((255 * (data[i] - xmin)) / xmin); + else { + image_data[i] = (unsigned char)((255.0f * (data[i] - xmin)) / (xmax - xmin)); + } } /* make the image */ diff --git a/hl/test/test_lite.c b/hl/test/test_lite.c index 3ecc79a..655778f 100644 --- a/hl/test/test_lite.c +++ b/hl/test/test_lite.c @@ -1054,7 +1054,7 @@ test_integers(void) HDfree(dt_str); goto out; } - if (HDstrcmp(dt_str, "H5T_STD_I8BE")) { + if (HDstrcmp(dt_str, "H5T_STD_I8BE") != 0) { HDfree(dt_str); goto out; } @@ -1112,7 +1112,7 @@ test_fps(void) HDfree(dt_str); goto out; } - if (HDstrcmp(dt_str, "H5T_IEEE_F32BE")) { + if (HDstrcmp(dt_str, "H5T_IEEE_F32BE") != 0) { HDfree(dt_str); goto out; } @@ -1184,7 +1184,7 @@ test_strings(void) goto out; } if (HDstrcmp(dt_str, "H5T_STRING {\n STRSIZE 13;\n STRPAD H5T_STR_NULLTERM;\n CSET " - "H5T_CSET_ASCII;\n CTYPE H5T_C_S1;\n }")) { + "H5T_CSET_ASCII;\n CTYPE H5T_C_S1;\n }") != 0) { HDprintf("dt=\n%s\n", dt_str); HDfree(dt_str); goto out; @@ -1219,7 +1219,7 @@ test_strings(void) goto out; } if (HDstrcmp(dt_str, "H5T_STRING {\n STRSIZE H5T_VARIABLE;\n STRPAD H5T_STR_NULLPAD;\n " - "CSET H5T_CSET_ASCII;\n CTYPE H5T_C_S1;\n }")) { + "CSET H5T_CSET_ASCII;\n CTYPE H5T_C_S1;\n }") != 0) { HDprintf("dt=\n%s\n", dt_str); HDfree(dt_str); goto out; @@ -1238,7 +1238,7 @@ test_strings(void) if (HDstrncmp(dt_str, "H5T_STRING {\n STRSIZE H5T_VARIABLE;\n STRPAD H5T_STR_NULLPAD;\n CSET " "H5T_CSET_ASCII;\n CTYPE H5T_C_S1;\n }", - str_len - 1)) { + str_len - 1) != 0) { HDprintf("dt=\n%s\n", dt_str); HDfree(dt_str); goto out; @@ -1261,7 +1261,7 @@ test_strings(void) if (HDstrncmp(dt_str, "H5T_STRING {\n STRSIZE H5T_VARIABLE;\n STRPAD H5T_STR_NULLPAD;\n CSET " "H5T_CSET_ASCII;\n CTYPE H5T_C_S1;\n }", - str_len)) { + str_len) != 0) { HDprintf("dt=\n%s\n", dt_str); HDfree(dt_str); goto out; @@ -1322,7 +1322,8 @@ test_opaques(void) } if (HDstrcmp( dt_str, - "H5T_OPAQUE {\n OPQ_SIZE 19;\n OPQ_TAG \"This is a tag for opaque type\";\n }")) { + "H5T_OPAQUE {\n OPQ_SIZE 19;\n OPQ_TAG \"This is a tag for opaque type\";\n }") != + 0) { HDprintf("dt=\n%s\n", dt_str); HDfree(dt_str); goto out; @@ -1376,7 +1377,7 @@ test_enums(void) if (H5Tenum_nameof(dtype, &value1, name1, size) < 0) goto out; - if (HDstrcmp(name1, "BLUE")) + if (HDstrcmp(name1, "BLUE") != 0) goto out; if (H5Tenum_valueof(dtype, name2, &value2) < 0) @@ -1399,8 +1400,9 @@ test_enums(void) HDfree(dt_str); goto out; } - if (HDstrcmp(dt_str, "H5T_ENUM {\n H5T_STD_I32LE;\n \"RED\" 5;\n \"GREEN\" " - " 6;\n \"BLUE\" 7;\n \"WHITE\" 8;\n }")) { + if (HDstrcmp(dt_str, + "H5T_ENUM {\n H5T_STD_I32LE;\n \"RED\" 5;\n \"GREEN\" " + " 6;\n \"BLUE\" 7;\n \"WHITE\" 8;\n }") != 0) { HDprintf("dt=\n%s\n", dt_str); HDfree(dt_str); @@ -1462,7 +1464,7 @@ test_variables(void) HDfree(dt_str); goto out; } - if (HDstrcmp(dt_str, "H5T_VLEN {\n H5T_VLEN {\n H5T_STD_I32BE\n }\n }")) { + if (HDstrcmp(dt_str, "H5T_VLEN {\n H5T_VLEN {\n H5T_STD_I32BE\n }\n }") != 0) { HDprintf("dt=\n%s\n", dt_str); HDfree(dt_str); goto out; @@ -1526,7 +1528,7 @@ test_arrays(void) } if (HDstrcmp(dt_str, "H5T_ARRAY {\n [5][7][13] H5T_ARRAY {\n [17][19] H5T_COMPOUND {\n " " H5T_STD_I8BE \"arr_compound_1\" : 0;\n H5T_STD_I32BE " - "\"arr_compound_2\" : 1;\n }\n }\n }")) { + "\"arr_compound_2\" : 1;\n }\n }\n }") != 0) { HDprintf("dt=\n%s\n", dt_str); HDfree(dt_str); goto out; @@ -1586,7 +1588,7 @@ test_compounds(void) goto out; } if (HDstrcmp(dt_str, "H5T_COMPOUND {\n H5T_STD_I16BE \"one_field\" : 2;\n H5T_STD_U8LE " - "\"two_field\" : 6;\n }")) { + "\"two_field\" : 6;\n }") != 0) { HDprintf("dt=\n%s\n", dt_str); HDfree(dt_str); goto out; @@ -1605,7 +1607,7 @@ test_compounds(void) if ((memb_name = H5Tget_member_name(dtype, 1)) == NULL) goto out; - if (HDstrcmp(memb_name, "i16_field")) { + if (HDstrcmp(memb_name, "i16_field") != 0) { H5free_memory(memb_name); goto out; } @@ -1683,7 +1685,7 @@ test_compound_bug(void) if ((memb_name = H5Tget_member_name(dtype, 2)) == NULL) goto out; - if (HDstrcmp(memb_name, "sub")) { + if (HDstrcmp(memb_name, "sub") != 0) { H5free_memory(memb_name); goto out; } @@ -1720,7 +1722,7 @@ test_compound_bug(void) if ((memb_name = H5Tget_member_name(dtype, 1)) == NULL) goto out; if (HDstrcmp(memb_name, "desc____________________________________________________________________________" - "_____________")) { + "_____________") != 0) { H5free_memory(memb_name); goto out; } diff --git a/hl/test/test_packet.c b/hl/test/test_packet.c index 1d3a569..e8b90f7 100644 --- a/hl/test/test_packet.c +++ b/hl/test/test_packet.c @@ -45,10 +45,10 @@ typedef struct particle_t { * a static array of particles for writing and checking reads *------------------------------------------------------------------------- */ -static particle_t testPart[NRECORDS] = {{"zero", 0, 0, 0.0f, 0.0f}, {"one", 10, 10, 1.0f, 10.0f}, - {"two", 20, 20, 2.0f, 20.0f}, {"three", 30, 30, 3.0f, 30.0f}, - {"four", 40, 40, 4.0f, 40.0f}, {"five", 50, 50, 5.0f, 50.0f}, - {"six", 60, 60, 6.0f, 60.0f}, {"seven", 70, 70, 7.0f, 70.0f}}; +static particle_t testPart[NRECORDS] = {{"zero", 0, 0, 0.0F, 0.0}, {"one", 10, 10, 1.0F, 10.0}, + {"two", 20, 20, 2.0F, 20.0}, {"three", 30, 30, 3.0F, 30.0}, + {"four", 40, 40, 4.0F, 40.0}, {"five", 50, 50, 5.0F, 50.0}, + {"six", 60, 60, 6.0F, 60.0}, {"seven", 70, 70, 7.0F, 70.0}}; /*------------------------------------------------------------------------- * function that compares one particle diff --git a/hl/test/test_table.c b/hl/test/test_table.c index 0d4a72a..6199e27 100644 --- a/hl/test/test_table.c +++ b/hl/test/test_table.c @@ -199,7 +199,7 @@ test_table(hid_t fid, int do_write) hsize_t chunk_size = 10; int compress = 0; int * fill = NULL; - particle_t fill1[1] = {{"no data", -1, -99.0f, -99.0f, -1}}; + particle_t fill1[1] = {{"no data", -1, -99.0, -99.0, -1}}; int fill1_new[1] = {-100}; hsize_t position; char tname[20]; @@ -227,25 +227,25 @@ test_table(hid_t fid, int do_write) particle2_t rbuf2[NRECORDS]; particle3_t rbuf3[NRECORDS]; particle_t rbufc[NRECORDS * 2]; - particle_t abuf[2] = {{"eight", 80, 8.0f, 80.0f, 80}, {"nine", 90, 9.0f, 90.0f, 90}}; - particle_t ibuf[2] = {{"zero", 0, 0.0f, 0.0f, 0}, {"zero", 0, 0.0f, 0.0f, 0}}; + particle_t abuf[2] = {{"eight", 80, 8.0, 80.0, 80}, {"nine", 90, 9.0, 90.0, 90}}; + particle_t ibuf[2] = {{"zero", 0, 0.0, 0.0, 0}, {"zero", 0, 0.0, 0.0, 0}}; particle_t wbufd[NRECORDS]; particle_t wbuf[NRECORDS] = {{ "zero", 0, - 0.0f, - 0.0f, + 0.0, + 0.0, 0, }, - {"one", 10, 1.0f, 10.0f, 10}, - {"two", 20, 2.0f, 20.0f, 20}, - {"three", 30, 3.0f, 30.0f, 30}, - {"four", 40, 4.0f, 40.0f, 40}, - {"five", 50, 5.0f, 50.0f, 50}, - {"six", 60, 6.0f, 60.0f, 60}, - {"seven", 70, 7.0f, 70.0f, 70}}; + {"one", 10, 1.0, 10.0, 10}, + {"two", 20, 2.0, 20.0, 20}, + {"three", 30, 3.0, 30.0, 30}, + {"four", 40, 4.0, 40.0, 40}, + {"five", 50, 5.0, 50.0, 50}, + {"six", 60, 6.0, 60.0, 60}, + {"seven", 70, 7.0, 70.0, 70}}; /* buffers for the field "Pressure" and "New_field" */ - float pressure_in[NRECORDS] = {0.0f, 1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f}; + float pressure_in[NRECORDS] = {0.0F, 1.0F, 2.0F, 3.0F, 4.0F, 5.0F, 6.0F, 7.0F}; float pressure_out[NRECORDS]; int buf_new[NRECORDS] = {0, 1, 2, 3, 4, 5, 6, 7}; /* buffers for the fields "Latitude,Longitude" */ @@ -254,8 +254,8 @@ test_table(hid_t fid, int do_write) /* buffers for the fields "Name,Pressure" */ namepressure_t namepre_out[NRECORDS]; namepressure_t namepre_in[NRECORDS] = { - {"zero", 0.0f}, {"one", 1.0f}, {"two", 2.0f}, {"three", 3.0f}, - {"four", 4.0f}, {"five", 5.0f}, {"six", 6.0f}, {"seven", 7.0f}, + {"zero", 0.0F}, {"one", 1.0F}, {"two", 2.0F}, {"three", 3.0F}, + {"four", 4.0F}, {"five", 5.0F}, {"six", 6.0F}, {"seven", 7.0F}, }; /*------------------------------------------------------------------------- @@ -332,14 +332,14 @@ test_table(hid_t fid, int do_write) HOFFSET(particle4_t, aty), HOFFSET(particle4_t, rro)}; /* Define an array of Particles */ - particle4_t p_data[NRECORDS] = {{12112, 1.4f, 2.5f, {1, 2, 3}, {4, 5, 6}, {99, 100}}, - {12113, 1.4f, 2.5f, {1, 2, 3}, {4, 5, 6}, {99, 100}}, - {12114, 1.4f, 2.5f, {1, 2, 3}, {4, 5, 6}, {99, 100}}, - {12115, 1.4f, 2.5f, {1, 2, 3}, {4, 5, 6}, {99, 100}}, - {12116, 1.4f, 2.5f, {1, 2, 3}, {4, 5, 6}, {99, 100}}, - {12117, 1.4f, 2.5f, {1, 2, 3}, {4, 5, 6}, {99, 100}}, - {12118, 1.4f, 2.5f, {1, 2, 3}, {4, 5, 6}, {99, 100}}, - {12119, 1.4f, 2.5f, {1, 2, 3}, {4, 5, 6}, {99, 100}}}; + particle4_t p_data[NRECORDS] = {{12112, 1.4, 2.5, {1, 2, 3}, {4, 5, 6}, {99, 100}}, + {12113, 1.4, 2.5, {1, 2, 3}, {4, 5, 6}, {99, 100}}, + {12114, 1.4, 2.5, {1, 2, 3}, {4, 5, 6}, {99, 100}}, + {12115, 1.4, 2.5, {1, 2, 3}, {4, 5, 6}, {99, 100}}, + {12116, 1.4, 2.5, {1, 2, 3}, {4, 5, 6}, {99, 100}}, + {12117, 1.4, 2.5, {1, 2, 3}, {4, 5, 6}, {99, 100}}, + {12118, 1.4, 2.5, {1, 2, 3}, {4, 5, 6}, {99, 100}}, + {12119, 1.4, 2.5, {1, 2, 3}, {4, 5, 6}, {99, 100}}}; /*------------------------------------------------------------------------- * initialize table parameters diff --git a/hl/tools/gif2h5/h52gifgentst.c b/hl/tools/gif2h5/h52gifgentst.c index 62dbd71..ba2e4f5 100644 --- a/hl/tools/gif2h5/h52gifgentst.c +++ b/hl/tools/gif2h5/h52gifgentst.c @@ -22,7 +22,7 @@ * * Purpose: generate files for h52gif testing * - * Programmer: Pedro Vicente, pvn@hdfgroup.org + * Programmer: Pedro Vicente * * Date: March 15, 2007 * diff --git a/src/H5ACprivate.h b/src/H5ACprivate.h index 1713e11..166ba8d 100644 --- a/src/H5ACprivate.h +++ b/src/H5ACprivate.h @@ -196,29 +196,29 @@ extern hid_t H5AC_ind_dxpl_id; /* hbool_t evictions_enabled = */ TRUE, \ /* hbool_t set_initial_size = */ TRUE, \ /* size_t initial_size = */ ( 2 * 1024 * 1024), \ - /* double min_clean_fraction = */ 0.3f, \ + /* double min_clean_fraction = */ 0.3, \ /* size_t max_size = */ (32 * 1024 * 1024), \ /* size_t min_size = */ (1 * 1024 * 1024), \ /* long int epoch_length = */ 50000, \ /* enum H5C_cache_incr_mode incr_mode = */ H5C_incr__threshold, \ - /* double lower_hr_threshold = */ 0.9f, \ - /* double increment = */ 2.0f, \ + /* double lower_hr_threshold = */ 0.9, \ + /* double increment = */ 2.0, \ /* hbool_t apply_max_increment = */ TRUE, \ /* size_t max_increment = */ (4 * 1024 * 1024), \ /* enum H5C_cache_flash_incr_mode */ \ /* flash_incr_mode = */ H5C_flash_incr__add_space, \ - /* double flash_multiple = */ 1.0f, \ - /* double flash_threshold = */ 0.25f, \ + /* double flash_multiple = */ 1.0, \ + /* double flash_threshold = */ 0.25, \ /* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__age_out_with_threshold, \ - /* double upper_hr_threshold = */ 0.999f, \ - /* double decrement = */ 0.9f, \ + /* double upper_hr_threshold = */ 0.999, \ + /* double decrement = */ 0.9, \ /* hbool_t apply_max_decrement = */ TRUE, \ /* size_t max_decrement = */ (1 * 1024 * 1024), \ /* int epochs_before_eviction = */ 3, \ /* hbool_t apply_empty_reserve = */ TRUE, \ - /* double empty_reserve = */ 0.1f, \ - /* int dirty_bytes_threshold = */ (256 * 1024), \ - /* int metadata_write_strategy = */ \ + /* double empty_reserve = */ 0.1, \ + /* size_t dirty_bytes_threshold = */ (256 * 1024), \ + /* int metadata_write_strategy = */ \ H5AC__DEFAULT_METADATA_WRITE_STRATEGY \ } #else /* H5_HAVE_PARALLEL */ @@ -232,29 +232,29 @@ extern hid_t H5AC_ind_dxpl_id; /* hbool_t evictions_enabled = */ TRUE, \ /* hbool_t set_initial_size = */ TRUE, \ /* size_t initial_size = */ ( 2 * 1024 * 1024), \ - /* double min_clean_fraction = */ 0.01f, \ + /* double min_clean_fraction = */ 0.01, \ /* size_t max_size = */ (32 * 1024 * 1024), \ /* size_t min_size = */ ( 1 * 1024 * 1024), \ /* long int epoch_length = */ 50000, \ /* enum H5C_cache_incr_mode incr_mode = */ H5C_incr__threshold, \ - /* double lower_hr_threshold = */ 0.9f, \ - /* double increment = */ 2.0f, \ + /* double lower_hr_threshold = */ 0.9, \ + /* double increment = */ 2.0, \ /* hbool_t apply_max_increment = */ TRUE, \ /* size_t max_increment = */ (4 * 1024 * 1024), \ /* enum H5C_cache_flash_incr_mode */ \ /* flash_incr_mode = */ H5C_flash_incr__add_space, \ - /* double flash_multiple = */ 1.4f, \ - /* double flash_threshold = */ 0.25f, \ + /* double flash_multiple = */ 1.4, \ + /* double flash_threshold = */ 0.25, \ /* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__age_out_with_threshold,\ - /* double upper_hr_threshold = */ 0.999f, \ - /* double decrement = */ 0.9f, \ + /* double upper_hr_threshold = */ 0.999, \ + /* double decrement = */ 0.9, \ /* hbool_t apply_max_decrement = */ TRUE, \ /* size_t max_decrement = */ (1 * 1024 * 1024), \ /* int epochs_before_eviction = */ 3, \ /* hbool_t apply_empty_reserve = */ TRUE, \ - /* double empty_reserve = */ 0.1f, \ - /* int dirty_bytes_threshold = */ (256 * 1024), \ - /* int metadata_write_strategy = */ \ + /* double empty_reserve = */ 0.1, \ + /* size_t dirty_bytes_threshold = */ (256 * 1024), \ + /* int metadata_write_strategy = */ \ H5AC__DEFAULT_METADATA_WRITE_STRATEGY \ } #endif /* H5_HAVE_PARALLEL */ diff --git a/test/cache_api.c b/test/cache_api.c index eddf39e..a9b2a83 100644 --- a/test/cache_api.c +++ b/test/cache_api.c @@ -81,27 +81,27 @@ check_fapl_mdc_api_calls(void) /* hbool_t evictions_enabled = */ TRUE, /* hbool_t set_initial_size = */ TRUE, /* size_t initial_size = */ (1 * 1024 * 1024 + 1), - /* double min_clean_fraction = */ 0.2f, + /* double min_clean_fraction = */ 0.2, /* size_t max_size = */ (16 * 1024 * 1024 + 1), /* size_t min_size = */ (1 * 1024 * 1024 + 1), /* long int epoch_length = */ 50001, /* enum H5C_cache_incr_mode incr_mode = */ H5C_incr__threshold, - /* double lower_hr_threshold = */ 0.91f, - /* double increment = */ 2.1f, + /* double lower_hr_threshold = */ 0.91, + /* double increment = */ 2.1, /* hbool_t apply_max_increment = */ TRUE, /* size_t max_increment = */ (4 * 1024 * 1024 + 1), /* enum H5C_cache_flash_incr_mode */ /* flash_incr_mode = */ H5C_flash_incr__off, - /* double flash_multiple = */ 2.0f, - /* double flash_threshold = */ 0.5f, + /* double flash_multiple = */ 2.0, + /* double flash_threshold = */ 0.5, /* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__age_out, - /* double upper_hr_threshold = */ 0.998f, - /* double decrement = */ 0.91f, + /* double upper_hr_threshold = */ 0.998, + /* double decrement = */ 0.91, /* hbool_t apply_max_decrement = */ TRUE, /* size_t max_decrement = */ (1 * 1024 * 1024 - 1), /* int epochs_before_eviction = */ 4, /* hbool_t apply_empty_reserve = */ TRUE, - /* double empty_reserve = */ 0.05f, + /* double empty_reserve = */ 0.05, /* int dirty_bytes_threshold = */ (256 * 1024), /* int metadata_write_strategy = */ H5AC__DEFAULT_METADATA_WRITE_STRATEGY}; @@ -519,27 +519,27 @@ check_file_mdc_api_calls(void) /* hbool_t evictions_enabled = */ TRUE, /* hbool_t set_initial_size = */ TRUE, /* size_t initial_size = */ (1 * 1024 * 1024 + 1), - /* double min_clean_fraction = */ 0.2f, + /* double min_clean_fraction = */ 0.2, /* size_t max_size = */ (16 * 1024 * 1024 + 1), /* size_t min_size = */ (1 * 1024 * 1024 + 1), /* long int epoch_length = */ 50001, /* enum H5C_cache_incr_mode incr_mode = */ H5C_incr__threshold, - /* double lower_hr_threshold = */ 0.91f, - /* double increment = */ 2.1f, + /* double lower_hr_threshold = */ 0.91, + /* double increment = */ 2.1, /* hbool_t apply_max_increment = */ TRUE, /* size_t max_increment = */ (4 * 1024 * 1024 + 1), /* enum H5C_cache_flash_incr_mode */ /* flash_incr_mode = */ H5C_flash_incr__off, - /* double flash_multiple = */ 2.0f, - /* double flash_threshold = */ 0.5f, + /* double flash_multiple = */ 2.0, + /* double flash_threshold = */ 0.5, /* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__age_out, - /* double upper_hr_threshold = */ 0.998f, - /* double decrement = */ 0.91f, + /* double upper_hr_threshold = */ 0.998, + /* double decrement = */ 0.91, /* hbool_t apply_max_decrement = */ TRUE, /* size_t max_decrement = */ (1 * 1024 * 1024 - 1), /* int epochs_before_eviction = */ 4, /* hbool_t apply_empty_reserve = */ TRUE, - /* double empty_reserve = */ 0.05f, + /* double empty_reserve = */ 0.05, /* int dirty_bytes_threshold = */ (256 * 1024), /* int metadata_write_strategy = */ H5AC__DEFAULT_METADATA_WRITE_STRATEGY}; @@ -552,27 +552,27 @@ check_file_mdc_api_calls(void) /* hbool_t evictions_enabled = */ TRUE, /* hbool_t set_initial_size = */ TRUE, /* size_t initial_size = */ (512 * 1024), - /* double min_clean_fraction = */ 0.1f, + /* double min_clean_fraction = */ 0.1, /* size_t max_size = */ (8 * 1024 * 1024), /* size_t min_size = */ (512 * 1024), /* long int epoch_length = */ 25000, /* enum H5C_cache_incr_mode incr_mode = */ H5C_incr__threshold, - /* double lower_hr_threshold = */ 0.9f, - /* double increment = */ 2.0f, + /* double lower_hr_threshold = */ 0.9, + /* double increment = */ 2.0, /* hbool_t apply_max_increment = */ TRUE, /* size_t max_increment = */ (2 * 1024 * 1024), /* enum H5C_cache_flash_incr_mode */ /* flash_incr_mode = */ H5C_flash_incr__off, - /* double flash_multiple = */ 1.5f, - /* double flash_threshold = */ 0.4f, + /* double flash_multiple = */ 1.5, + /* double flash_threshold = */ 0.4, /* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__threshold, - /* double upper_hr_threshold = */ 0.9995f, - /* double decrement = */ 0.95f, + /* double upper_hr_threshold = */ 0.9995, + /* double decrement = */ 0.95, /* hbool_t apply_max_decrement = */ TRUE, /* size_t max_decrement = */ (512 * 1024), /* int epochs_before_eviction = */ 4, /* hbool_t apply_empty_reserve = */ TRUE, - /* double empty_reserve = */ 0.05f, + /* double empty_reserve = */ 0.05, /* int dirty_bytes_threshold = */ (256 * 1024), /* int metadata_write_strategy = */ H5AC__DEFAULT_METADATA_WRITE_STRATEGY}; @@ -585,27 +585,27 @@ check_file_mdc_api_calls(void) /* hbool_t evictions_enabled = */ TRUE, /* hbool_t set_initial_size = */ TRUE, /* size_t initial_size = */ (1 * 1024 * 1024), - /* double min_clean_fraction = */ 0.2f, + /* double min_clean_fraction = */ 0.2, /* size_t max_size = */ (16 * 1024 * 1024), /* size_t min_size = */ (1 * 1024 * 1024), /* long int epoch_length = */ 50000, /* enum H5C_cache_incr_mode incr_mode = */ H5C_incr__off, - /* double lower_hr_threshold = */ 0.90f, - /* double increment = */ 2.0f, + /* double lower_hr_threshold = */ 0.90, + /* double increment = */ 2.0, /* hbool_t apply_max_increment = */ TRUE, /* size_t max_increment = */ (4 * 1024 * 1024), /* enum H5C_cache_flash_incr_mode */ /* flash_incr_mode = */ H5C_flash_incr__off, - /* double flash_multiple = */ 2.1f, - /* double flash_threshold = */ 0.6f, + /* double flash_multiple = */ 2.1, + /* double flash_threshold = */ 0.6, /* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__off, - /* double upper_hr_threshold = */ 0.999f, - /* double decrement = */ 0.9f, + /* double upper_hr_threshold = */ 0.999, + /* double decrement = */ 0.9, /* hbool_t apply_max_decrement = */ FALSE, /* size_t max_decrement = */ (1 * 1024 * 1024 - 1), /* int epochs_before_eviction = */ 3, /* hbool_t apply_empty_reserve = */ FALSE, - /* double empty_reserve = */ 0.05f, + /* double empty_reserve = */ 0.05, /* int dirty_bytes_threshold = */ (256 * 1024), /* int metadata_write_strategy = */ H5AC__DEFAULT_METADATA_WRITE_STRATEGY}; @@ -618,28 +618,28 @@ check_file_mdc_api_calls(void) /* hbool_t evictions_enabled = */ TRUE, /* hbool_t set_initial_size = */ TRUE, /* size_t initial_size = */ (1 * 1024 * 1024), - /* double min_clean_fraction = */ 0.15f, + /* double min_clean_fraction = */ 0.15, /* size_t max_size = */ (20 * 1024 * 1024), /* size_t min_size = */ (1 * 1024 * 1024), /* long int epoch_length = */ 75000, /* enum H5C_cache_incr_mode incr_mode = */ H5C_incr__threshold, - /* double lower_hr_threshold = */ 0.9f, - /* double increment = */ 2.0f, + /* double lower_hr_threshold = */ 0.9, + /* double increment = */ 2.0, /* hbool_t apply_max_increment = */ TRUE, /* size_t max_increment = */ (2 * 1024 * 1024), /* enum H5C_cache_flash_incr_mode */ /* flash_incr_mode = */ H5C_flash_incr__off, - /* double flash_multiple = */ 1.1f, - /* double flash_threshold = */ 0.3f, + /* double flash_multiple = */ 1.1, + /* double flash_threshold = */ 0.3, /* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__age_out_with_threshold, - /* double upper_hr_threshold = */ 0.999f, - /* double decrement = */ 0.9f, + /* double upper_hr_threshold = */ 0.999, + /* double decrement = */ 0.9, /* hbool_t apply_max_decrement = */ TRUE, /* size_t max_decrement = */ (1 * 1024 * 1024), /* int epochs_before_eviction = */ 3, /* hbool_t apply_empty_reserve = */ TRUE, - /* double empty_reserve = */ 0.1f, + /* double empty_reserve = */ 0.1, /* int dirty_bytes_threshold = */ (256 * 1024), /* int metadata_write_strategy = */ H5AC__DEFAULT_METADATA_WRITE_STRATEGY}; @@ -842,7 +842,7 @@ mdc_api_call_smoke_check(int express_test) hbool_t valid_chunk; hbool_t dump_hit_rate = FALSE; int64_t min_accesses = 1000; - double min_hit_rate = 0.90f; + double min_hit_rate = 0.90; hbool_t dump_cache_size = FALSE; hid_t file_id = -1; hid_t dataspace_id = -1; @@ -868,27 +868,27 @@ mdc_api_call_smoke_check(int express_test) /* hbool_t evictions_enabled = */ TRUE, /* hbool_t set_initial_size = */ TRUE, /* size_t initial_size = */ 500000, - /* double min_clean_fraction = */ 0.1f, + /* double min_clean_fraction = */ 0.1, /* size_t max_size = */ 16000000, /* size_t min_size = */ 250000, /* long int epoch_length = */ 50000, /* enum H5C_cache_incr_mode incr_mode = */ H5C_incr__off, - /* double lower_hr_threshold = */ 0.95f, - /* double increment = */ 2.0f, + /* double lower_hr_threshold = */ 0.95, + /* double increment = */ 2.0, /* hbool_t apply_max_increment = */ FALSE, /* size_t max_increment = */ 4000000, /* enum H5C_cache_flash_incr_mode */ /* flash_incr_mode = */ H5C_flash_incr__off, - /* double flash_multiple = */ 2.0f, - /* double flash_threshold = */ 0.5f, + /* double flash_multiple = */ 2.0, + /* double flash_threshold = */ 0.5, /* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__off, - /* double upper_hr_threshold = */ 0.999f, - /* double decrement = */ 0.9f, + /* double upper_hr_threshold = */ 0.999, + /* double decrement = */ 0.9, /* hbool_t apply_max_decrement = */ FALSE, /* size_t max_decrement = */ 1000000, /* int epochs_before_eviction = */ 2, /* hbool_t apply_empty_reserve = */ TRUE, - /* double empty_reserve = */ 0.05f, + /* double empty_reserve = */ 0.05, /* int dirty_bytes_threshold = */ (256 * 1024), /* int metadata_write_strategy = */ H5AC__DEFAULT_METADATA_WRITE_STRATEGY}; @@ -901,27 +901,27 @@ mdc_api_call_smoke_check(int express_test) /* hbool_t evictions_enabled = */ TRUE, /* hbool_t set_initial_size = */ TRUE, /* size_t initial_size = */ 12000000, - /* double min_clean_fraction = */ 0.1f, + /* double min_clean_fraction = */ 0.1, /* size_t max_size = */ 16000000, /* size_t min_size = */ 250000, /* long int epoch_length = */ 50000, /* enum H5C_cache_incr_mode incr_mode = */ H5C_incr__off, - /* double lower_hr_threshold = */ 0.95f, - /* double increment = */ 2.0f, + /* double lower_hr_threshold = */ 0.95, + /* double increment = */ 2.0, /* hbool_t apply_max_increment = */ FALSE, /* size_t max_increment = */ 4000000, /* enum H5C_cache_flash_incr_mode */ /* flash_incr_mode = */ H5C_flash_incr__off, - /* double flash_multiple = */ 2.0f, - /* double flash_threshold = */ 0.5f, + /* double flash_multiple = */ 2.0, + /* double flash_threshold = */ 0.5, /* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__off, - /* double upper_hr_threshold = */ 0.999f, - /* double decrement = */ 0.9f, + /* double upper_hr_threshold = */ 0.999, + /* double decrement = */ 0.9, /* hbool_t apply_max_decrement = */ FALSE, /* size_t max_decrement = */ 1000000, /* int epochs_before_eviction = */ 2, /* hbool_t apply_empty_reserve = */ TRUE, - /* double empty_reserve = */ 0.05f, + /* double empty_reserve = */ 0.05, /* int dirty_bytes_threshold = */ (256 * 1024), /* int metadata_write_strategy = */ H5AC__DEFAULT_METADATA_WRITE_STRATEGY}; @@ -934,27 +934,27 @@ mdc_api_call_smoke_check(int express_test) /* hbool_t evictions_enabled = */ TRUE, /* hbool_t set_initial_size = */ TRUE, /* size_t initial_size = */ 2000000, - /* double min_clean_fraction = */ 0.1f, + /* double min_clean_fraction = */ 0.1, /* size_t max_size = */ 16000000, /* size_t min_size = */ 250000, /* long int epoch_length = */ 50000, /* enum H5C_cache_incr_mode incr_mode = */ H5C_incr__off, - /* double lower_hr_threshold = */ 0.95f, - /* double increment = */ 2.0f, + /* double lower_hr_threshold = */ 0.95, + /* double increment = */ 2.0, /* hbool_t apply_max_increment = */ FALSE, /* size_t max_increment = */ 4000000, /* enum H5C_cache_flash_incr_mode */ /* flash_incr_mode = */ H5C_flash_incr__off, - /* double flash_multiple = */ 2.0f, - /* double flash_threshold = */ 0.5f, + /* double flash_multiple = */ 2.0, + /* double flash_threshold = */ 0.5, /* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__off, - /* double upper_hr_threshold = */ 0.999f, - /* double decrement = */ 0.9f, + /* double upper_hr_threshold = */ 0.999, + /* double decrement = */ 0.9, /* hbool_t apply_max_decrement = */ FALSE, /* size_t max_decrement = */ 1000000, /* int epochs_before_eviction = */ 2, /* hbool_t apply_empty_reserve = */ TRUE, - /* double empty_reserve = */ 0.05f, + /* double empty_reserve = */ 0.05, /* int dirty_bytes_threshold = */ (256 * 1024), /* int metadata_write_strategy = */ H5AC__DEFAULT_METADATA_WRITE_STRATEGY}; diff --git a/tools/h5diff/h5diffgentest.c b/tools/h5diff/h5diffgentest.c index eb967e1..3015883 100644 --- a/tools/h5diff/h5diffgentest.c +++ b/tools/h5diff/h5diffgentest.c @@ -345,10 +345,10 @@ test_basic(const char *fname1, const char *fname2, const char *fname3) */ { - double data1[3][2] = {{1.0F, 1.0F}, {1.00F, 1.000F}, {0.0F, 0.0F}}; - double data2[3][2] = {{0.0F, 1.1F}, {1.01F, 1.001F}, {0.0F, 1.0F}}; - double data3[3][2] = {{100.0F, 100.0F}, {100.00F, 100.000F}, {100.0F, 100.0F}}; - double data4[3][2] = {{105.0F, 120.0F}, {160.00F, 95.000F}, {80.0F, 40.0F}}; + double data1[3][2] = {{1.0, 1.0}, {1.00, 1.000}, {0.0, 0.0}}; + double data2[3][2] = {{0.0, 1.1}, {1.01, 1.001}, {0.0, 1.0}}; + double data3[3][2] = {{100.0, 100.0}, {100.00, 100.000}, {100.0, 100.0}}; + double data4[3][2] = {{105.0, 120.0}, {160.00, 95.000}, {80.0, 40.0}}; write_dset(gid1, 2, dims2, "dset1", H5T_NATIVE_DOUBLE, data1); write_dset(gid2, 2, dims2, "dset2", H5T_NATIVE_DOUBLE, data2); @@ -396,8 +396,8 @@ test_basic(const char *fname1, const char *fname2, const char *fname3) *------------------------------------------------------------------------- */ { - double data9[3][2] = {{100.0F, 100.0F}, {100.0F, 0.0F}, {0.0F, 100.0F}}; - double data10[3][2] = {{120.0F, 80.0F}, {0.0F, 100.0F}, {0.0F, 50.0F}}; + double data9[3][2] = {{100.0, 100.0}, {100.0, 0.0}, {0.0, 100.0}}; + double data10[3][2] = {{120.0, 80.0}, {0.0, 100.0}, {0.0, 50.0}}; write_dset(gid1, 2, dims2, "dset9", H5T_NATIVE_DOUBLE, data9); write_dset(gid1, 2, dims2, "dset10", H5T_NATIVE_DOUBLE, data10); @@ -452,19 +452,19 @@ test_basic(const char *fname1, const char *fname2, const char *fname3) float data15[6]; float data16[6]; - data15[0] = (float)HDsqrt(-1.0F); - data15[1] = 1.0F; - data15[2] = (float)HDsqrt(-1.0F); - data15[3] = 1.0F; - data15[4] = 1.0F; - data15[5] = 1.0F; + data15[0] = (float)HDsqrt(-1.0); + data15[1] = 1.0; + data15[2] = (float)HDsqrt(-1.0); + data15[3] = 1.0; + data15[4] = 1.0; + data15[5] = 1.0; - data16[0] = (float)HDsqrt(-1.0F); - data16[1] = (float)HDsqrt(-1.0F); - data16[2] = 1.0F; - data16[3] = 1.0F; - data16[4] = 1.0F; - data16[5] = 1.0F; + data16[0] = (float)HDsqrt(-1.0); + data16[1] = (float)HDsqrt(-1.0); + data16[2] = 1.0; + data16[3] = 1.0; + data16[4] = 1.0; + data16[5] = 1.0; write_dset(gid1, 1, dims1, "fp15", H5T_NATIVE_FLOAT, data15); write_dset(gid1, 1, dims1, "fp16", H5T_NATIVE_FLOAT, data16); @@ -479,19 +479,19 @@ test_basic(const char *fname1, const char *fname2, const char *fname3) double data17[6]; double data18[6]; - data17[0] = HDsqrt(-1.0F); - data17[1] = 1.0F; - data17[2] = HDsqrt(-1.0F); - data17[3] = 1.0F; - data17[4] = 1.0F; - data17[5] = 1.0F; + data17[0] = HDsqrt(-1.0); + data17[1] = 1.0; + data17[2] = HDsqrt(-1.0); + data17[3] = 1.0; + data17[4] = 1.0; + data17[5] = 1.0; - data18[0] = HDsqrt(-1.0F); - data18[1] = HDsqrt(-10000.0F); - data18[2] = 1.0F; - data18[3] = 1.0F; - data18[4] = 1.0F; - data18[5] = 1.0F; + data18[0] = HDsqrt(-1.0); + data18[1] = HDsqrt(-10000.0); + data18[2] = 1.0; + data18[3] = 1.0; + data18[4] = 1.0; + data18[5] = 1.0; write_dset(gid1, 1, dims1, "fp17", H5T_NATIVE_DOUBLE, data17); write_dset(gid1, 1, dims1, "fp18", H5T_NATIVE_DOUBLE, data18); @@ -506,11 +506,11 @@ test_basic(const char *fname1, const char *fname2, const char *fname3) float data19[6]; double data20[6]; - data19[0] = data19[1] = data19[2] = (float)HDlog(0.0F); - data19[3] = data19[4] = data19[5] = (float)-HDlog(0.0F); + data19[0] = data19[1] = data19[2] = (float)HDlog(0.0); + data19[3] = data19[4] = data19[5] = (float)-HDlog(0.0); - data20[0] = data20[1] = data20[2] = HDlog(0.0F); - data20[3] = data20[4] = data20[5] = -HDlog(0.0F); + data20[0] = data20[1] = data20[2] = HDlog(0.0); + data20[3] = data20[4] = data20[5] = -HDlog(0.0); write_dset(gid1, 1, dims1, "fp19", H5T_NATIVE_FLOAT, data19); write_dset(gid1, 1, dims1, "fp19_COPY", H5T_NATIVE_FLOAT, data19); @@ -534,15 +534,15 @@ test_basic(const char *fname1, const char *fname2, const char *fname3) size_t type_size; hid_t tid; - buf1[0].d = HDsqrt(-1.0F); - buf1[0].f = (float)HDsqrt(-1.0F); - buf2[0].d = HDsqrt(-1.0F); - buf2[0].f = (float)HDsqrt(-1.0F); + buf1[0].d = HDsqrt(-1.0); + buf1[0].f = (float)HDsqrt(-1.0); + buf2[0].d = HDsqrt(-1.0); + buf2[0].f = (float)HDsqrt(-1.0); - buf1[1].d = HDsqrt(-1.0F); - buf1[1].f = (float)HDsqrt(-1.0F); - buf2[1].d = 0.0F; - buf2[1].f = 0.0F; + buf1[1].d = HDsqrt(-1.0); + buf1[1].f = (float)HDsqrt(-1.0); + buf2[1].d = 0.0; + buf2[1].f = 0.0; type_size = sizeof(cmp1_t); tid = H5Tcreate(H5T_COMPOUND, type_size); @@ -570,13 +570,13 @@ test_basic(const char *fname1, const char *fname2, const char *fname3) int i; } cmp3_t; - double data2[6] = {0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F}; + double data2[6] = {0.0, 0.0, 0.0, 0.0, 0.0, 0.0}; int data3[6] = {0, 0, 0, 0, 0, 0}; int data4[3][2] = {{0, 0}, {0, 0}, {0, 0}}; int data5[2][2] = {{0, 0}, {0, 0}}; unsigned int data6[3][2] = {{0, 0}, {0, 0}, {0, 0}}; - cmp1_t data7[1] = {{1.0f, 2}}; - cmp2_t data8[1] = {{1, 2.0f}}; + cmp1_t data7[1] = {{1.0, 2}}; + cmp2_t data8[1] = {{1, 2.0}}; hsize_t dims3[2] = {2, 2}; hsize_t dims4[1] = {1}; size_t type_size; @@ -776,10 +776,10 @@ test_datatypes(const char *fname) int buf3b[3][2] = {{1, 1}, {3, 4}, {5, 6}}; long buf4a[3][2] = {{1, 1}, {1, 1}, {1, 1}}; long buf4b[3][2] = {{1, 1}, {3, 4}, {5, 6}}; - float buf5a[3][2] = {{1.0F, 1.0F}, {1.0F, 1.0F}, {1.0F, 1.0F}}; - float buf5b[3][2] = {{1.0F, 1.0F}, {3.0F, 4.0F}, {5.0F, 6.0F}}; - double buf6a[3][2] = {{1.0F, 1.0F}, {1.0F, 1.0F}, {1.0F, 1.0F}}; - double buf6b[3][2] = {{1.0F, 1.0F}, {3.0F, 4.0F}, {5.0F, 6.0F}}; + float buf5a[3][2] = {{1.0, 1.0}, {1.0, 1.0}, {1.0, 1.0}}; + float buf5b[3][2] = {{1.0, 1.0}, {3.0, 4.0}, {5.0, 6.0}}; + double buf6a[3][2] = {{1.0, 1.0}, {1.0, 1.0}, {1.0, 1.0}}; + double buf6b[3][2] = {{1.0, 1.0}, {3.0, 4.0}, {5.0, 6.0}}; /*unsigned/signed test signed char -128 to 127 @@ -5111,27 +5111,27 @@ write_attr_strings(hid_t loc_id, const char *dset_name, hid_t fid, char buf1[2][STR_SIZE] = {"ab", "de"}; /* string */ char * buf1a[2]; /* VL string */ char buf2[2] = {1, 2}; /* bitfield, opaque */ - s_t buf3[2] = {{1, 2.0F}, {3, 4.0F}}; /* compound */ + s_t buf3[2] = {{1, 2.0}, {3, 4.0}}; /* compound */ hobj_ref_t buf4[2]; /* reference */ e_t buf45[2] = {RED, RED}; /* enum */ hvl_t buf5[2]; /* vlen */ hsize_t dimarray[1] = {3}; /* array dimension */ int buf6[2][3] = {{1, 2, 3}, {4, 5, 6}}; /* array */ int buf7[2] = {1, 2}; /* integer */ - float buf8[2] = {1.0F, 2.0F}; /* float */ + float buf8[2] = {1.0, 2.0}; /* float */ /* create 2D attributes with dimension [3][2], 6 elements */ - hsize_t dims2[2] = {3, 2}; - char buf12[3][2][STR_SIZE] = {{"ab", "cd"}, {"ef", "gh"}, {"ij", "kl"}}; /* string */ - char * buf12a[3][2]; /* VL string */ - char buf22[3][2] = {{1, 2}, {3, 4}, {5, 6}}; /* bitfield, opaque */ - s_t buf32[6] = {{1, 2.0F}, {3, 4.0F}, {5, 6.0F}, {7, 8.0F}, {9, 10.0F}, {11, 12.0F}}; /* compound */ + hsize_t dims2[2] = {3, 2}; + char buf12[3][2][STR_SIZE] = {{"ab", "cd"}, {"ef", "gh"}, {"ij", "kl"}}; /* string */ + char * buf12a[3][2]; /* VL string */ + char buf22[3][2] = {{1, 2}, {3, 4}, {5, 6}}; /* bitfield, opaque */ + s_t buf32[6] = {{1, 2.0}, {3, 4.0}, {5, 6.0}, {7, 8.0}, {9, 10.0}, {11, 12.0}}; /* compound */ hobj_ref_t buf42[3][2]; /* reference */ e_t buf452[3][2]; /* enum */ hvl_t buf52[3][2]; /* vlen */ int buf62[6][3] = {{1, 2, 3}, {4, 5, 6}, {7, 8, 9}, {10, 11, 12}, {13, 14, 15}, {16, 17, 18}}; /* array */ - int buf72[3][2] = {{1, 2}, {3, 4}, {5, 6}}; /* integer */ - float buf82[3][2] = {{1.0F, 2.0F}, {3.0F, 4.0F}, {5.0F, 6.0F}}; /* float */ + int buf72[3][2] = {{1, 2}, {3, 4}, {5, 6}}; /* integer */ + float buf82[3][2] = {{1.0, 2.0}, {3.0, 4.0}, {5.0, 6.0}}; /* float */ /* create 3D attributes with dimension [4][3][2], 24 elements */ hsize_t dims3[3] = {4, 3, 2}; @@ -5832,7 +5832,7 @@ write_attr_strings(hid_t loc_id, const char *dset_name, hid_t fid, for (k = 0; k < 2; k++) if (make_diffs) { buf33[i][j][k].a = 0; - buf33[i][j][k].b = 0.0F; + buf33[i][j][k].b = 0.0; } else { buf33[i][j][k].a = (char)n++; @@ -6042,7 +6042,7 @@ write_attr_strings(hid_t loc_id, const char *dset_name, hid_t fid, for (k = 0; k < 2; k++) { if (make_diffs) { buf73[i][j][k] = 0; - buf83[i][j][k] = 0.0F; + buf83[i][j][k] = 0.0; } else { buf73[i][j][k] = n++; @@ -6100,27 +6100,27 @@ write_attr_in(hid_t loc_id, const char *dset_name, hid_t fid, char buf1[2][STR_SIZE] = {"ab", "de"}; /* string */ char * buf1a[2]; /* VL string */ char buf2[2] = {1, 2}; /* bitfield, opaque */ - s_t buf3[2] = {{1, 2.0F}, {3, 4.0F}}; /* compound */ + s_t buf3[2] = {{1, 2.0}, {3, 4.0}}; /* compound */ hobj_ref_t buf4[2]; /* reference */ e_t buf45[2] = {RED, RED}; /* enum */ hvl_t buf5[2]; /* vlen */ hsize_t dimarray[1] = {3}; /* array dimension */ int buf6[2][3] = {{1, 2, 3}, {4, 5, 6}}; /* array */ int buf7[2] = {1, 2}; /* integer */ - float buf8[2] = {1.0F, 2.0F}; /* float */ + float buf8[2] = {1.0, 2.0}; /* float */ /* create 2D attributes with dimension [3][2], 6 elements */ - hsize_t dims2[2] = {3, 2}; - char buf12[3][2][STR_SIZE] = {{"ab", "cd"}, {"ef", "gh"}, {"ij", "kl"}}; /* string */ - char * buf12a[3][2]; /* VL string */ - char buf22[3][2] = {{1, 2}, {3, 4}, {5, 6}}; /* bitfield, opaque */ - s_t buf32[6] = {{1, 2.0F}, {3, 4.0F}, {5, 6.0F}, {7, 8.0F}, {9, 10.0F}, {11, 12.0F}}; /* compound */ + hsize_t dims2[2] = {3, 2}; + char buf12[3][2][STR_SIZE] = {{"ab", "cd"}, {"ef", "gh"}, {"ij", "kl"}}; /* string */ + char * buf12a[3][2]; /* VL string */ + char buf22[3][2] = {{1, 2}, {3, 4}, {5, 6}}; /* bitfield, opaque */ + s_t buf32[6] = {{1, 2.0}, {3, 4.0}, {5, 6.0}, {7, 8.0}, {9, 10.0}, {11, 12.0}}; /* compound */ hobj_ref_t buf42[3][2]; /* reference */ e_t buf452[3][2]; /* enum */ hvl_t buf52[3][2]; /* vlen */ int buf62[6][3] = {{1, 2, 3}, {4, 5, 6}, {7, 8, 9}, {10, 11, 12}, {13, 14, 15}, {16, 17, 18}}; /* array */ - int buf72[3][2] = {{1, 2}, {3, 4}, {5, 6}}; /* integer */ - float buf82[3][2] = {{1.0F, 2.0F}, {3.0F, 4.0F}, {5.0F, 6.0F}}; /* float */ + int buf72[3][2] = {{1, 2}, {3, 4}, {5, 6}}; /* integer */ + float buf82[3][2] = {{1.0, 2.0}, {3.0, 4.0}, {5.0, 6.0}}; /* float */ /* create 3D attributes with dimension [4][3][2], 24 elements */ hsize_t dims3[3] = {4, 3, 2}; @@ -6821,7 +6821,7 @@ write_attr_in(hid_t loc_id, const char *dset_name, hid_t fid, for (k = 0; k < 2; k++) { if (make_diffs) { buf33[i][j][k].a = 0; - buf33[i][j][k].b = 0.0F; + buf33[i][j][k].b = 0.0; } else { buf33[i][j][k].a = (char)n++; @@ -7031,7 +7031,7 @@ write_attr_in(hid_t loc_id, const char *dset_name, hid_t fid, for (k = 0; k < 2; k++) { if (make_diffs) { buf73[i][j][k] = 0; - buf83[i][j][k] = 0.0F; + buf83[i][j][k] = 0.0; } else { buf73[i][j][k] = n++; @@ -7092,26 +7092,26 @@ write_dset_in(hid_t loc_id, const char *dset_name, hid_t fid, char buf1[2][STR_SIZE] = {"ab", "de"}; /* string */ char * buf1a[2]; /* VL string */ char buf2[2] = {1, 2}; /* bitfield, opaque */ - s_t buf3[2] = {{1, 2.0F}, {3, 4.0F}}; /* compound */ + s_t buf3[2] = {{1, 2.0}, {3, 4.0}}; /* compound */ hobj_ref_t buf4[2]; /* reference */ e_t buf45[2] = {RED, GREEN}; /* enum */ hvl_t buf5[2]; /* vlen */ hsize_t dimarray[1] = {3}; /* array dimension */ int buf6[2][3] = {{1, 2, 3}, {4, 5, 6}}; /* array */ int buf7[2] = {1, 2}; /* integer */ - float buf8[2] = {1.0F, 2.0F}; /* float */ + float buf8[2] = {1.0, 2.0}; /* float */ /* create 2D attributes with dimension [3][2], 6 elements */ - hsize_t dims2[2] = {3, 2}; - char buf12[3][2][STR_SIZE] = {{"ab", "cd"}, {"ef", "gh"}, {"ij", "kl"}}; /* string */ - char * buf12a[3][2]; /* VL string */ - char buf22[3][2] = {{1, 2}, {3, 4}, {5, 6}}; /* bitfield, opaque */ - s_t buf32[6] = {{1, 2.0F}, {3, 4.0F}, {5, 6.0F}, {7, 8.0F}, {9, 10.0F}, {11, 12.0F}}; /* compound */ + hsize_t dims2[2] = {3, 2}; + char buf12[3][2][STR_SIZE] = {{"ab", "cd"}, {"ef", "gh"}, {"ij", "kl"}}; /* string */ + char * buf12a[3][2]; /* VL string */ + char buf22[3][2] = {{1, 2}, {3, 4}, {5, 6}}; /* bitfield, opaque */ + s_t buf32[6] = {{1, 2.0}, {3, 4.0}, {5, 6.0}, {7, 8.0}, {9, 10.0}, {11, 12.0}}; /* compound */ hobj_ref_t buf42[3][2]; /* reference */ hvl_t buf52[3][2]; /* vlen */ int buf62[6][3] = {{1, 2, 3}, {4, 5, 6}, {7, 8, 9}, {10, 11, 12}, {13, 14, 15}, {16, 17, 18}}; /* array */ - int buf72[3][2] = {{1, 2}, {3, 4}, {5, 6}}; /* integer */ - float buf82[3][2] = {{1.0F, 2.0F}, {3.0F, 4.0F}, {5.0F, 6.0F}}; /* float */ + int buf72[3][2] = {{1, 2}, {3, 4}, {5, 6}}; /* integer */ + float buf82[3][2] = {{1.0, 2.0}, {3.0, 4.0}, {5.0, 6.0}}; /* float */ /* create 3D attributes with dimension [4][3][2], 24 elements */ hsize_t dims3[3] = {4, 3, 2}; @@ -7579,7 +7579,7 @@ write_dset_in(hid_t loc_id, const char *dset_name, hid_t fid, for (k = 0; k < 2; k++) { if (make_diffs) { buf33[i][j][k].a = 0; - buf33[i][j][k].b = 0.0F; + buf33[i][j][k].b = 0.0; } else { buf33[i][j][k].a = (char)n++; @@ -7677,7 +7677,7 @@ write_dset_in(hid_t loc_id, const char *dset_name, hid_t fid, for (k = 0; k < 2; k++) { if (make_diffs) { buf73[i][j][k] = 0; - buf83[i][j][k] = 0.0F; + buf83[i][j][k] = 0.0; } else { buf73[i][j][k] = n++; diff --git a/tools/h5dump/h5dumpgentest.c b/tools/h5dump/h5dumpgentest.c index 062e895..1272ba2 100644 --- a/tools/h5dump/h5dumpgentest.c +++ b/tools/h5dump/h5dumpgentest.c @@ -196,8 +196,8 @@ const H5L_class_t UD_link_class[1] = {{ #define DIM1 20 #define DIM2 10 -#define CDIM1 DIM1 / 2 -#define CDIM2 DIM2 / 2 +#define CDIM1 (DIM1 / 2) +#define CDIM2 (DIM2 / 2) #define RANK 2 /* Dataspace of 0 dimension size */ @@ -476,7 +476,7 @@ gent_dataset(void) for (i = 0; i < 30; i++) for (j = 0; j < 20; j++) - dset2[i][j] = 0.0001F * (float)j + (float)i; + dset2[i][j] = 0.0001 * (double)j + (double)i; H5Dwrite(dataset, H5T_NATIVE_DOUBLE, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset2_data); @@ -583,7 +583,7 @@ gent_attribute(void) attr = H5Acreate2(root, "attr3", H5T_IEEE_F64BE, space, H5P_DEFAULT, H5P_DEFAULT); for (i = 0; i < 10; i++) - d[i] = 0.1F * (float)i; + d[i] = 0.1 * (double)i; H5Awrite(attr, H5T_NATIVE_DOUBLE, d); H5Sclose(space); @@ -997,7 +997,7 @@ gent_compound_dt(void) for (i = 0; i < (int)sdim; i++) { dset1[i].a = i; dset1[i].b = (float)(i * i); - dset1[i].c = (float)(1.0F / (float)(i + 1)); + dset1[i].c = (double)(1.0 / (double)(i + 1)); dset2[i].a = i; dset2[i].b = (float)((float)i + (float)i * 0.1F); @@ -1184,7 +1184,7 @@ gent_compound_dt2(void) for (i = 0; i < (int)sdim; i++) { dset1[i].a = i; dset1[i].b = (float)(i * i); - dset1[i].c = (float)(1.0F / (float)(i + 1)); + dset1[i].c = (double)(1.0 / (double)(i + 1)); dset2[i].a = i; dset2[i].b = (float)((float)i + (float)i * 0.1F); @@ -1624,7 +1624,7 @@ gent_many(void) space2 = H5Screate_simple(1, dims, NULL); attr = H5Acreate2(dataset, "attr3", H5T_IEEE_F64BE, space2, H5P_DEFAULT, H5P_DEFAULT); for (i = 0; i < 10; i++) - d[i] = 0.1F * (float)i; + d[i] = 0.1 * (double)i; H5Awrite(attr, H5T_NATIVE_DOUBLE, d); H5Sclose(space2); H5Aclose(attr); @@ -2476,7 +2476,7 @@ gent_nestcomp(void) for (i = 0; i < 10; i++) { s1[i].a = i; s1[i].b = (float)(i * i); - s1[i].c = 1.0F / (float)(i + 1); + s1[i].c = 1.0 / (double)(i + 1); s1[i].d.a = (char)(65 + i); s1[i].d.b[0] = -100.0F; s1[i].d.b[1] = 100.0F; @@ -5017,7 +5017,7 @@ gent_compound_complex(void) Array1[m].e = (float)((float)m * 0.96F); for (n = 0; n < F41_ARRAY_DIMf; n++) - Array1[m].f[n] = ((float)m * 1024.9637F); + Array1[m].f[n] = ((double)m * 1024.9637); Array1[m].g = 'm'; } @@ -6286,7 +6286,7 @@ gent_ldouble_scalar(void) hid_t tid; hid_t sid; hsize_t dims[1] = {6}; - long double buf[6] = {0.0, 1.0, 2.0, 3.0, 4.0, 5.0}; + long double buf[6] = {0.0L, 1.0L, 2.0L, 3.0L, 4.0L, 5.0L}; if ((fid = H5Fcreate(FILE88, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) goto error; @@ -6946,7 +6946,7 @@ gent_fpformat(void) { hid_t fid, sid, did; hsize_t dims[1] = {6}; - double dbuf[6] = {-0.1234567f, 0.1234567f, 0, 0, 0, 0}; + double dbuf[6] = {-0.1234567, 0.1234567, 0, 0, 0, 0}; float fbuf[6] = {-0.1234567f, 0.1234567f, 0, 0, 0, 0}; fid = H5Fcreate(FILE60, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); @@ -7236,7 +7236,7 @@ gent_packedbits(void) for (i = 0; i < dims[0]; i++) for (j = 0; j < dims[1]; j++) - dsetdbl[i][j] = 0.0001F * (float)j + (float)i; + dsetdbl[i][j] = 0.0001 * (double)j + (double)i; H5Dwrite(dataset, H5T_NATIVE_DOUBLE, H5S_ALL, H5S_ALL, H5P_DEFAULT, dsetdbl); @@ -7435,7 +7435,7 @@ gent_attr_intsize(void) for (i = 0; i < dims[0]; i++) for (j = 0; j < dims[1]; j++) - dsetdbl[i][j] = 0.0001F * (float)j + (float)i; + dsetdbl[i][j] = 0.0001 * (double)j + (double)i; H5Awrite(attr, H5T_NATIVE_DOUBLE, dsetdbl); @@ -7739,7 +7739,7 @@ gent_compound_intsizes(void) for (n = 0; n < (int)dims[0]; n++) for (o = 0; o < (int)dims[1]; o++) - Array1[m].dsetdbl[n][o] = 0.0001F * (float)o + (float)n; + Array1[m].dsetdbl[n][o] = 0.0001 * (double)o + (double)n; } /* Create the array data type for the 8 bits signed int array */ @@ -8025,7 +8025,7 @@ gent_compound_attr_intsizes(void) for (n = 0; n < (int)dims[0]; n++) for (o = 0; o < (int)dims[1]; o++) - Array1[m].dsetdbl[n][o] = 0.0001F * (float)o + (float)n; + Array1[m].dsetdbl[n][o] = 0.0001 * (double)o + (double)n; } /* Create the array data type for the 8 bits signed int array */ @@ -8528,7 +8528,7 @@ gent_intscalars(void) for (i = 0; i < dims[0]; i++) for (j = 0; j < dims[1]; j++) - dsetdbl[i][j] = 0.0001F * (float)j + (float)i; + dsetdbl[i][j] = 0.0001 * (double)j + (double)i; H5Dwrite(dataset, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, dsetdbl[0]); @@ -8772,7 +8772,7 @@ gent_attr_intscalars(void) for (i = 0; i < dims[0]; i++) for (j = 0; j < dims[1]; j++) - dsetdbl[i][j] = 0.0001F * (float)j + (float)i; + dsetdbl[i][j] = 0.0001 * (double)j + (double)i; H5Awrite(attr, tid, dsetdbl[0]); @@ -8971,7 +8971,7 @@ gent_compound_int_array(void) dims[0] = F76_DIM8; for (n = 0; n < (int)dims[0]; n++) - Cmpd1[m].dsetdbl[n] = 0.0001F + (float)n; + Cmpd1[m].dsetdbl[n] = 0.0001 + (double)n; } /* Create the array data type for the 8 bits signed int array */ @@ -9204,8 +9204,8 @@ gent_compound_ints(void) val64bits <<= 1; /* Double Dummy set for failure tests */ - Cmpd1[m].dsetdbl = 0.0001F + (float)m; - Cmpd2[m].dsetdbl = 0.0001F + (float)m; + Cmpd1[m].dsetdbl = 0.0001 + (double)m; + Cmpd2[m].dsetdbl = 0.0001 + (double)m; } /* Create the dataspace */ @@ -9577,7 +9577,7 @@ gent_intattrscalars(void) for (i = 0; i < dims[0]; i++) for (j = 0; j < dims[1]; j++) - dsetdbl[i][j] = 0.0001F * (float)j + (float)i; + dsetdbl[i][j] = 0.0001 * (double)j + (double)i; H5Dwrite(dataset, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, dsetdbl); /* Attribute of double */ @@ -9906,7 +9906,7 @@ gent_intsattrs(void) for (i = 0; i < dims[0]; i++) for (j = 0; j < dims[1]; j++) { - dsetdbl[i][j] = 0.0001F * (float)j + (float)i; + dsetdbl[i][j] = 0.0001 * (double)j + (double)i; asetdbl[i * dims[1] + j] = dsetdbl[i][j]; } diff --git a/tools/lib/h5diff_array.c b/tools/lib/h5diff_array.c index 8d31bfc..57b8a5c 100644 --- a/tools/lib/h5diff_array.c +++ b/tools/lib/h5diff_array.c @@ -104,9 +104,9 @@ static hbool_t not_comparable; per = -1; \ not_comparable = FALSE; \ both_zero = FALSE; \ - if (H5_DBL_ABS_EQUAL(0, (double)A) && H5_DBL_ABS_EQUAL(0, (double)B)) \ + if (H5_DBL_ABS_EQUAL(0, (double)(A)) && H5_DBL_ABS_EQUAL(0, (double)(B))) \ both_zero = TRUE; \ - if (!H5_DBL_ABS_EQUAL(0, (double)A)) \ + if (!H5_DBL_ABS_EQUAL(0, (double)(A))) \ per = (double)ABS((double)((B) - (A)) / (double)(A)); \ else \ not_comparable = TRUE; \ @@ -117,9 +117,9 @@ static hbool_t not_comparable; per = -1; \ not_comparable = FALSE; \ both_zero = FALSE; \ - if (H5_DBL_ABS_EQUAL(0, (double)A) && H5_DBL_ABS_EQUAL(0, (double)B)) \ + if (H5_DBL_ABS_EQUAL(0, (double)(A)) && H5_DBL_ABS_EQUAL(0, (double)(B))) \ both_zero = TRUE; \ - if (!H5_DBL_ABS_EQUAL(0, (double)A)) \ + if (!H5_DBL_ABS_EQUAL(0, (double)(A))) \ per = ABS((double)((TYPE)((B) - (A))) / (double)(A)); \ else \ not_comparable = TRUE; \ @@ -1838,7 +1838,7 @@ diff_ldouble_element(unsigned char *mem1, unsigned char *mem2, hsize_t elem_idx, /* both not NaN, do the comparison */ if (!isnan1 && !isnan2) { - if (ABS(temp1_double - temp2_double) > opts->delta) { + if ((double)ABS(temp1_double - temp2_double) > opts->delta) { opts->print_percentage = 0; print_pos(opts, elem_idx, 0); if (print_data(opts)) { @@ -1931,7 +1931,7 @@ diff_ldouble_element(unsigned char *mem1, unsigned char *mem2, hsize_t elem_idx, } nfound++; } - else if (per > opts->percent && ABS(temp1_double - temp2_double) > opts->delta) { + else if (per > opts->percent && (double)ABS(temp1_double - temp2_double) > opts->delta) { opts->print_percentage = 1; print_pos(opts, elem_idx, 0); if (print_data(opts)) { @@ -2887,7 +2887,7 @@ ull2float(unsigned long long ull_value, float *f_value) size_t dst_size; int ret_value = 0; - H5TOOLS_START_DEBUG(""); + H5TOOLS_START_DEBUG(" "); if ((dxpl_id = H5Pcreate(H5P_DATASET_XFER)) < 0) H5TOOLS_GOTO_ERROR(FAIL, "H5Pcreate failed"); diff --git a/tools/perform/chunk.c b/tools/perform/chunk.c index ada2ed3..1b6793a 100644 --- a/tools/perform/chunk.c +++ b/tools/perform/chunk.c @@ -55,20 +55,20 @@ #define RM_CACHE_STRT 25 #define RM_CACHE_END 25 #define RM_CACHE_DELT 5 -#define RM_START (double)0.50F -#define RM_END (double)5.00F -#define RM_DELTA (double)0.50F -#define RM_W0 0.0F +#define RM_START 0.50 +#define RM_END 5.00 +#define RM_DELTA 0.50 +#define RM_W0 0.0 #define RM_NRDCC 521 /* Diagonal test */ #define DIAG_CACHE_STRT 25 #define DIAG_CACHE_END 25 #define DIAG_CACHE_DELT 5 -#define DIAG_START (double)0.50F -#define DIAG_END (double)5.00F -#define DIAG_DELTA (double)0.50F -/* #define DIAG_W0 0.65F */ +#define DIAG_START 0.50 +#define DIAG_END 5.00 +#define DIAG_DELTA 0.50 +/* #define DIAG_W0 0.65 */ /* #define DIAG_NRDCC 521 */ static size_t nio_g; diff --git a/tools/perform/overhead.c b/tools/perform/overhead.c index dba8220..2687ce9 100644 --- a/tools/perform/overhead.c +++ b/tools/perform/overhead.c @@ -193,7 +193,7 @@ test(fill_t fill_style, const double splits[], hbool_t verbose, hbool_t use_rdcc if (!use_rdcc) { if (H5Pget_cache(fapl, &mdc_nelmts, NULL, NULL, NULL) < 0) goto error; - if (H5Pset_cache(fapl, mdc_nelmts, 0, 0, 0.0F) < 0) + if (H5Pset_cache(fapl, mdc_nelmts, 0, 0, 0.0) < 0) goto error; } if ((file = H5Fcreate(FILE_NAME_1, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) diff --git a/tools/perform/zip_perf.c b/tools/perform/zip_perf.c index ba9788d..53a9678 100644 --- a/tools/perform/zip_perf.c +++ b/tools/perform/zip_perf.c @@ -32,11 +32,10 @@ #define ONE_MB (ONE_KB * ONE_KB) #define ONE_GB (ONE_MB * ONE_KB) -#define MICROSECOND 1000000.0F +#define MICROSECOND 1000000.0 /* report 0.0 in case t is zero too */ -#define MB_PER_SEC(bytes, t) \ - ((fabs(t) < (double)0.0000000001F) ? (double)0.0F : ((((double)bytes) / (double)ONE_MB) / (t))) +#define MB_PER_SEC(bytes, t) ((fabs(t) < 0.0000000001) ? 0.0 : ((((double)(bytes)) / (double)ONE_MB) / (t))) #ifndef TRUE #define TRUE 1 @@ -169,7 +168,7 @@ write_file(Bytef *source, uLongf sourceLen) /* destination buffer needs to be at least 0.1% larger than sourceLen * plus 12 bytes */ - destLen = (uLongf)((double)sourceLen + ((double)sourceLen * (double)0.1F)) + 12; + destLen = (uLongf)((double)sourceLen + ((double)sourceLen * 0.1)) + 12; dest = (Bytef *)HDmalloc(destLen); if (!dest) @@ -179,8 +178,8 @@ write_file(Bytef *source, uLongf sourceLen) compress_buffer(dest, &destLen, source, sourceLen); HDgettimeofday(&timer_stop, NULL); - compression_time += ((double)timer_stop.tv_sec + ((double)timer_stop.tv_usec) / (double)MICROSECOND) - - ((double)timer_start.tv_sec + ((double)timer_start.tv_usec) / (double)MICROSECOND); + compression_time += ((double)timer_stop.tv_sec + ((double)timer_stop.tv_usec) / MICROSECOND) - + ((double)timer_start.tv_sec + ((double)timer_start.tv_usec) / MICROSECOND); if (report_once_flag) { HDfprintf(stdout, "\tCompression Ratio: %g\n", ((double)destLen) / (double)sourceLen); @@ -448,7 +447,7 @@ do_write_test(unsigned long file_size, unsigned long min_buf_size, unsigned long error("out of memory"); } - compression_time = 0.0F; + compression_time = 0.0; if (random_test) fill_with_random_data(src, src_len); -- cgit v0.12