Skip to content

Commit

Permalink
Removes gratuitous (double)x.yF casts (#632)
Browse files Browse the repository at this point in the history
* Committing clang-format changes

* Removes gratuitous (double)x.yF casts

* Committing clang-format changes

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
  • Loading branch information
derobins and github-actions[bot] authored May 7, 2021
1 parent 1e572b1 commit 9023e98
Show file tree
Hide file tree
Showing 43 changed files with 291 additions and 300 deletions.
4 changes: 2 additions & 2 deletions c++/test/dsets.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1157,7 +1157,7 @@ test_chunk_cache(const FileAccPropList &fapl)
// Verify that chunk cache parameters are the same
int mdc_nelmts = 0;
size_t nslots_1 = 0, nslots_4 = 0, nbytes_1 = 0, nbytes_4 = 0;
double w0_1 = 0.0F, w0_4 = 0.0F;
double w0_1 = 0.0, w0_4 = 0.0;
fapl_def.getCache(mdc_nelmts, nslots_1, nbytes_1, w0_1);
dapl.getChunkCache(nslots_4, nbytes_4, w0_4);
verify_val(nslots_1, nslots_4, "DSetAccPropList::getChunkCache", __LINE__, __FILE__);
Expand All @@ -1175,7 +1175,7 @@ test_chunk_cache(const FileAccPropList &fapl)
// Set new rdcc settings on fapl local
size_t nslots_2 = nslots_1 * 2;
size_t nbytes_2 = nbytes_1 * 2;
double w0_2 = w0_1 / (double)2.0F;
double w0_2 = w0_1 / 2.0;
fapl_local.getCache(mdc_nelmts, nslots_2, nbytes_2, w0_2);

// Create a new file using default fcpl and the passed-in fapl
Expand Down
2 changes: 1 addition & 1 deletion hl/src/H5LT.c
Original file line number Diff line number Diff line change
Expand Up @@ -822,7 +822,7 @@ H5LTopen_file_image(void *buf_ptr, size_t buf_size, unsigned flags)
char file_name[64]; /* Filename buffer */
size_t alloc_incr; /* Buffer allocation increment */
size_t min_incr = 65536; /* Minimum buffer increment */
double buf_prcnt = 0.1f; /* Percentage of buffer size to set
double buf_prcnt = 0.1; /* Percentage of buffer size to set
as increment */
static long file_name_counter;
H5FD_file_image_callbacks_t callbacks = {&image_malloc, &image_memcpy, &image_realloc, &image_free,
Expand Down
49 changes: 22 additions & 27 deletions src/H5C.c
Original file line number Diff line number Diff line change
Expand Up @@ -445,17 +445,17 @@ H5C_create(size_t max_cache_size, size_t min_clean_size, int max_type_id,
(cache_ptr->resize_ctl).max_increment = H5C__DEF_AR_MAX_INCREMENT;

(cache_ptr->resize_ctl).flash_incr_mode = H5C_flash_incr__off;
(cache_ptr->resize_ctl).flash_multiple = (double)1.0f;
(cache_ptr->resize_ctl).flash_threshold = (double)0.25f;
(cache_ptr->resize_ctl).flash_multiple = 1.0;
(cache_ptr->resize_ctl).flash_threshold = 0.25;

(cache_ptr->resize_ctl).decr_mode = H5C_decr__off;
(cache_ptr->resize_ctl).upper_hr_threshold = (double)H5C__DEF_AR_UPPER_THRESHHOLD;
(cache_ptr->resize_ctl).decrement = (double)H5C__DEF_AR_DECREMENT;
(cache_ptr->resize_ctl).upper_hr_threshold = H5C__DEF_AR_UPPER_THRESHHOLD;
(cache_ptr->resize_ctl).decrement = H5C__DEF_AR_DECREMENT;
(cache_ptr->resize_ctl).apply_max_decrement = TRUE;
(cache_ptr->resize_ctl).max_decrement = H5C__DEF_AR_MAX_DECREMENT;
(cache_ptr->resize_ctl).epochs_before_eviction = H5C__DEF_AR_EPCHS_B4_EVICT;
(cache_ptr->resize_ctl).apply_empty_reserve = TRUE;
(cache_ptr->resize_ctl).empty_reserve = (double)H5C__DEF_AR_EMPTY_RESERVE;
(cache_ptr->resize_ctl).empty_reserve = H5C__DEF_AR_EMPTY_RESERVE;

cache_ptr->epoch_markers_active = 0;

Expand Down Expand Up @@ -2705,7 +2705,7 @@ H5C_set_cache_auto_resize_config(H5C_t *cache_ptr, H5C_auto_size_ctl_t *config_p
break;

case H5C_incr__threshold:
if ((config_ptr->lower_hr_threshold <= (double)0.0f) || (config_ptr->increment <= (double)1.0f) ||
if ((config_ptr->lower_hr_threshold <= 0.0) || (config_ptr->increment <= 1.0) ||
((config_ptr->apply_max_increment) && (config_ptr->max_increment <= 0)))
cache_ptr->size_increase_possible = FALSE;
break;
Expand All @@ -2725,21 +2725,21 @@ H5C_set_cache_auto_resize_config(H5C_t *cache_ptr, H5C_auto_size_ctl_t *config_p
break;

case H5C_decr__threshold:
if ((config_ptr->upper_hr_threshold >= (double)1.0f) || (config_ptr->decrement >= (double)1.0f) ||
if ((config_ptr->upper_hr_threshold >= 1.0) || (config_ptr->decrement >= 1.0) ||
((config_ptr->apply_max_decrement) && (config_ptr->max_decrement <= 0)))
cache_ptr->size_decrease_possible = FALSE;
break;

case H5C_decr__age_out:
if (((config_ptr->apply_empty_reserve) && (config_ptr->empty_reserve >= (double)1.0f)) ||
if (((config_ptr->apply_empty_reserve) && (config_ptr->empty_reserve >= 1.0)) ||
((config_ptr->apply_max_decrement) && (config_ptr->max_decrement <= 0)))
cache_ptr->size_decrease_possible = FALSE;
break;

case H5C_decr__age_out_with_threshold:
if (((config_ptr->apply_empty_reserve) && (config_ptr->empty_reserve >= (double)1.0f)) ||
if (((config_ptr->apply_empty_reserve) && (config_ptr->empty_reserve >= 1.0)) ||
((config_ptr->apply_max_decrement) && (config_ptr->max_decrement <= 0)) ||
(config_ptr->upper_hr_threshold >= (double)1.0f))
(config_ptr->upper_hr_threshold >= 1.0))
cache_ptr->size_decrease_possible = FALSE;
break;

Expand Down Expand Up @@ -3720,8 +3720,7 @@ H5C_validate_resize_config(H5C_auto_size_ctl_t *config_ptr, unsigned int tests)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL,
"initial_size must be in the interval [min_size, max_size]")

if ((config_ptr->min_clean_fraction < (double)0.0f) ||
(config_ptr->min_clean_fraction > (double)1.0f))
if ((config_ptr->min_clean_fraction < 0.0) || (config_ptr->min_clean_fraction > 1.0))
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "min_clean_fraction must be in the interval [0.0, 1.0]")

if (config_ptr->epoch_length < H5C__MIN_AR_EPOCH_LENGTH)
Expand All @@ -3736,12 +3735,11 @@ H5C_validate_resize_config(H5C_auto_size_ctl_t *config_ptr, unsigned int tests)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "Invalid incr_mode")

if (config_ptr->incr_mode == H5C_incr__threshold) {
if ((config_ptr->lower_hr_threshold < (double)0.0f) ||
(config_ptr->lower_hr_threshold > (double)1.0f))
if ((config_ptr->lower_hr_threshold < 0.0) || (config_ptr->lower_hr_threshold > 1.0))
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL,
"lower_hr_threshold must be in the range [0.0, 1.0]")

if (config_ptr->increment < (double)1.0f)
if (config_ptr->increment < 1.0)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "increment must be greater than or equal to 1.0")

/* no need to check max_increment, as it is a size_t,
Expand All @@ -3755,12 +3753,10 @@ H5C_validate_resize_config(H5C_auto_size_ctl_t *config_ptr, unsigned int tests)
break;

case H5C_flash_incr__add_space:
if ((config_ptr->flash_multiple < (double)0.1f) ||
(config_ptr->flash_multiple > (double)10.0f))
if ((config_ptr->flash_multiple < 0.1) || (config_ptr->flash_multiple > 10.0))
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL,
"flash_multiple must be in the range [0.1, 10.0]")
if ((config_ptr->flash_threshold < (double)0.1f) ||
(config_ptr->flash_threshold > (double)1.0f))
if ((config_ptr->flash_threshold < 0.1) || (config_ptr->flash_threshold > 1.0))
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL,
"flash_threshold must be in the range [0.1, 1.0]")
break;
Expand All @@ -3781,10 +3777,10 @@ H5C_validate_resize_config(H5C_auto_size_ctl_t *config_ptr, unsigned int tests)
}

if (config_ptr->decr_mode == H5C_decr__threshold) {
if (config_ptr->upper_hr_threshold > (double)1.0f)
if (config_ptr->upper_hr_threshold > 1.0)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "upper_hr_threshold must be <= 1.0")

if ((config_ptr->decrement > (double)1.0f) || (config_ptr->decrement < (double)0.0f))
if ((config_ptr->decrement > 1.0) || (config_ptr->decrement < 0.0))
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "decrement must be in the interval [0.0, 1.0]")

/* no need to check max_decrement as it is a size_t
Expand All @@ -3801,7 +3797,7 @@ H5C_validate_resize_config(H5C_auto_size_ctl_t *config_ptr, unsigned int tests)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "epochs_before_eviction too big")

if ((config_ptr->apply_empty_reserve) &&
((config_ptr->empty_reserve > (double)1.0f) || (config_ptr->empty_reserve < (double)0.0f)))
((config_ptr->empty_reserve > 1.0) || (config_ptr->empty_reserve < 0.0)))
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "empty_reserve must be in the interval [0.0, 1.0]")

/* no need to check max_decrement as it is a size_t
Expand All @@ -3810,8 +3806,7 @@ H5C_validate_resize_config(H5C_auto_size_ctl_t *config_ptr, unsigned int tests)
} /* H5C_decr__age_out || H5C_decr__age_out_with_threshold */

if (config_ptr->decr_mode == H5C_decr__age_out_with_threshold) {
if ((config_ptr->upper_hr_threshold > (double)1.0f) ||
(config_ptr->upper_hr_threshold < (double)0.0f))
if ((config_ptr->upper_hr_threshold > 1.0) || (config_ptr->upper_hr_threshold < 0.0))
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL,
"upper_hr_threshold must be in the interval [0.0, 1.0]")
} /* H5C_decr__age_out_with_threshold */
Expand Down Expand Up @@ -4279,8 +4274,8 @@ H5C__auto_adjust_cache_size(H5F_t *f, hbool_t write_permitted)
HDassert(cache_ptr);
HDassert(cache_ptr->magic == H5C__H5C_T_MAGIC);
HDassert(cache_ptr->cache_accesses >= (cache_ptr->resize_ctl).epoch_length);
HDassert((double)0.0f <= (cache_ptr->resize_ctl).min_clean_fraction);
HDassert((cache_ptr->resize_ctl).min_clean_fraction <= (double)100.0f);
HDassert(0.0 <= (cache_ptr->resize_ctl).min_clean_fraction);
HDassert((cache_ptr->resize_ctl).min_clean_fraction <= 100.0);

/* check to see if cache_ptr->resize_in_progress is TRUE. If it, this
* is a re-entrant call via a client callback called in the resize
Expand All @@ -4303,7 +4298,7 @@ H5C__auto_adjust_cache_size(H5F_t *f, hbool_t write_permitted)
if (H5C_get_cache_hit_rate(cache_ptr, &hit_rate) != SUCCEED)
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Can't get hit rate")

HDassert(((double)0.0f <= hit_rate) && (hit_rate <= (double)1.0f));
HDassert((0.0 <= hit_rate) && (hit_rate <= 1.0));

switch ((cache_ptr->resize_ctl).incr_mode) {
case H5C_incr__off:
Expand Down
23 changes: 11 additions & 12 deletions src/H5Cdbg.c
Original file line number Diff line number Diff line change
Expand Up @@ -429,11 +429,11 @@ H5C_stats(H5C_t *cache_ptr, const char *cache_name,
int32_t aggregate_max_pins = 0;
double hit_rate;
double prefetch_use_rate;
double average_successful_search_depth = 0.0f;
double average_failed_search_depth = 0.0f;
double average_entries_skipped_per_calls_to_msic = 0.0f;
double average_dirty_pf_entries_skipped_per_call_to_msic = 0.0f;
double average_entries_scanned_per_calls_to_msic = 0.0f;
double average_successful_search_depth = 0.0;
double average_failed_search_depth = 0.0;
double average_entries_skipped_per_calls_to_msic = 0.0;
double average_dirty_pf_entries_skipped_per_call_to_msic = 0.0;
double average_entries_scanned_per_calls_to_msic = 0.0;
#endif /* H5C_COLLECT_CACHE_STATS */
herr_t ret_value = SUCCEED; /* Return value */

Expand Down Expand Up @@ -492,9 +492,9 @@ H5C_stats(H5C_t *cache_ptr, const char *cache_name,
} /* end for */

if ((total_hits > 0) || (total_misses > 0))
hit_rate = (double)100.0f * ((double)(total_hits)) / ((double)(total_hits + total_misses));
hit_rate = 100.0 * ((double)(total_hits)) / ((double)(total_hits + total_misses));
else
hit_rate = 0.0f;
hit_rate = 0.0;

if (cache_ptr->successful_ht_searches > 0)
average_successful_search_depth = ((double)(cache_ptr->total_successful_ht_search_depth)) /
Expand Down Expand Up @@ -630,10 +630,9 @@ H5C_stats(H5C_t *cache_ptr, const char *cache_name,
(long long)(cache_ptr->evictions[H5AC_PREFETCHED_ENTRY_ID]));

if (cache_ptr->prefetches > 0)
prefetch_use_rate =
(double)100.0f * ((double)(cache_ptr->prefetch_hits)) / ((double)(cache_ptr->prefetches));
prefetch_use_rate = 100.0 * ((double)(cache_ptr->prefetch_hits)) / ((double)(cache_ptr->prefetches));
else
prefetch_use_rate = 0.0f;
prefetch_use_rate = 0.0;

HDfprintf(stdout, "%s prefetched entry use rate = %lf\n", cache_ptr->prefix, prefetch_use_rate);

Expand All @@ -658,10 +657,10 @@ H5C_stats(H5C_t *cache_ptr, const char *cache_name,
((cache_ptr->class_table_ptr))[i]->name);

if ((cache_ptr->hits[i] > 0) || (cache_ptr->misses[i] > 0))
hit_rate = (double)100.0f * ((double)(cache_ptr->hits[i])) /
hit_rate = 100.0 * ((double)(cache_ptr->hits[i])) /
((double)(cache_ptr->hits[i] + cache_ptr->misses[i]));
else
hit_rate = 0.0f;
hit_rate = 0.0;

HDfprintf(stdout, "%s hits / misses / hit_rate = %ld / %ld / %f\n", cache_ptr->prefix,
(long)(cache_ptr->hits[i]), (long)(cache_ptr->misses[i]), hit_rate);
Expand Down
9 changes: 4 additions & 5 deletions src/H5Cimage.c
Original file line number Diff line number Diff line change
Expand Up @@ -933,15 +933,14 @@ H5C_image_stats(H5C_t *cache_ptr, hbool_t H5_ATTR_UNUSED print_header)
} /* end for */

if ((total_hits > 0) || (total_misses > 0))
hit_rate = (double)100.0f * ((double)(total_hits)) / ((double)(total_hits + total_misses));
hit_rate = 100.0 * ((double)(total_hits)) / ((double)(total_hits + total_misses));
else
hit_rate = 0.0f;
hit_rate = 0.0;

if (cache_ptr->prefetches > 0)
prefetch_use_rate =
(double)100.0f * ((double)(cache_ptr->prefetch_hits)) / ((double)(cache_ptr->prefetches));
prefetch_use_rate = 100.0 * ((double)(cache_ptr->prefetch_hits)) / ((double)(cache_ptr->prefetches));
else
prefetch_use_rate = 0.0f;
prefetch_use_rate = 0.0;

if (print_header) {
HDfprintf(stdout, "\nhit prefetches prefetch image pf hit\n");
Expand Down
16 changes: 8 additions & 8 deletions src/H5Cprivate.h
Original file line number Diff line number Diff line change
Expand Up @@ -115,20 +115,20 @@
#define H5C__CURR_CACHE_IMAGE_CTL_VER 1

/* Default configuration settings */
#define H5C__DEF_AR_UPPER_THRESHHOLD 0.9999f
#define H5C__DEF_AR_LOWER_THRESHHOLD 0.9f
#define H5C__DEF_AR_UPPER_THRESHHOLD 0.9999
#define H5C__DEF_AR_LOWER_THRESHHOLD 0.9
#define H5C__DEF_AR_MAX_SIZE ((size_t)(16 * 1024 * 1024))
#define H5C__DEF_AR_INIT_SIZE ((size_t)(1 * 1024 * 1024))
#define H5C__DEF_AR_MIN_SIZE ((size_t)(1 * 1024 * 1024))
#define H5C__DEF_AR_MIN_CLEAN_FRAC 0.5f
#define H5C__DEF_AR_INCREMENT 2.0f
#define H5C__DEF_AR_MIN_CLEAN_FRAC 0.5
#define H5C__DEF_AR_INCREMENT 2.0
#define H5C__DEF_AR_MAX_INCREMENT ((size_t)(2 * 1024 * 1024))
#define H5C__DEF_AR_FLASH_MULTIPLE 1.0f
#define H5C__DEV_AR_FLASH_THRESHOLD 0.25f
#define H5C__DEF_AR_DECREMENT 0.9f
#define H5C__DEF_AR_FLASH_MULTIPLE 1.0
#define H5C__DEV_AR_FLASH_THRESHOLD 0.25
#define H5C__DEF_AR_DECREMENT 0.9
#define H5C__DEF_AR_MAX_DECREMENT ((size_t)(1 * 1024 * 1024))
#define H5C__DEF_AR_EPCHS_B4_EVICT 3
#define H5C__DEF_AR_EMPTY_RESERVE 0.05f
#define H5C__DEF_AR_EMPTY_RESERVE 0.05
#define H5C__MIN_AR_EPOCH_LENGTH 100
#define H5C__DEF_AR_EPOCH_LENGTH 50000
#define H5C__MAX_AR_EPOCH_LENGTH 1000000
Expand Down
2 changes: 1 addition & 1 deletion src/H5HFdbg.c
Original file line number Diff line number Diff line change
Expand Up @@ -543,7 +543,7 @@ H5HF_dblock_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth,
amount_free = 0;

HDfprintf(stream, "%*s%-*s %.2f%%\n", indent, "", fwidth, "Percent of available space for data used:",
((double)100.0f * (double)((dblock->size - blk_prefix_size) - amount_free) /
(100.0 * (double)((dblock->size - blk_prefix_size) - amount_free) /
(double)(dblock->size - blk_prefix_size)));

/*
Expand Down
2 changes: 1 addition & 1 deletion src/H5HLdbg.c
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ BEGIN_FUNC(PRIV, ERR, herr_t, SUCCEED, FAIL,

if (h->dblk_size)
HDfprintf(stream, "%*s%-*s %.2f%%\n", indent, "", fwidth, "Percent of heap used:",
((double)100.0f * (double)(h->dblk_size - amount_free) / (double)h->dblk_size));
(100.0 * (double)(h->dblk_size - amount_free) / (double)h->dblk_size));

/* Print the data in a VMS-style octal dump */
H5_buffer_dump(stream, indent, h->dblk_image, marker, (size_t)0, h->dblk_size);
Expand Down
2 changes: 1 addition & 1 deletion src/H5Pdapl.c
Original file line number Diff line number Diff line change
Expand Up @@ -768,7 +768,7 @@ H5Pset_chunk_cache(hid_t dapl_id, size_t rdcc_nslots, size_t rdcc_nbytes, double

/* Check arguments. Note that we allow negative values - they are
* considered to "unset" the property. */
if (rdcc_w0 > (double)1.0f)
if (rdcc_w0 > 1.0)
HGOTO_ERROR(
H5E_ARGS, H5E_BADVALUE, FAIL,
"raw data cache w0 value must be between 0.0 and 1.0 inclusive, or H5D_CHUNK_CACHE_W0_DEFAULT");
Expand Down
5 changes: 2 additions & 3 deletions src/H5Pdxpl.c
Original file line number Diff line number Diff line change
Expand Up @@ -1486,9 +1486,8 @@ H5Pset_btree_ratios(hid_t plist_id, double left, double middle, double right)
H5TRACE4("e", "iddd", plist_id, left, middle, right);

/* Check arguments */
if (left < (double)0.0f || left > (double)1.0f || middle < (double)0.0f || middle > (double)1.0f ||
right < (double)0.0f || right > (double)1.0f)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "split ratio must satisfy 0.0<=X<=1.0")
if (left < 0.0 || left > 1.0 || middle < 0.0 || middle > 1.0 || right < 0.0 || right > 1.0)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "split ratio must satisfy 0.0 <= X <= 1.0")

/* Get the plist structure */
if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER)))
Expand Down
2 changes: 1 addition & 1 deletion src/H5Pfapl.c
Original file line number Diff line number Diff line change
Expand Up @@ -1686,7 +1686,7 @@ H5Pset_cache(hid_t plist_id, int H5_ATTR_UNUSED mdc_nelmts, size_t rdcc_nslots,
H5TRACE5("e", "iIszzd", plist_id, mdc_nelmts, rdcc_nslots, rdcc_nbytes, rdcc_w0);

/* Check arguments */
if (rdcc_w0 < (double)0.0f || rdcc_w0 > (double)1.0f)
if (rdcc_w0 < 0.0 || rdcc_w0 > 1.0)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL,
"raw data cache w0 value must be between 0.0 and 1.0 inclusive")

Expand Down
4 changes: 2 additions & 2 deletions src/H5T.c
Original file line number Diff line number Diff line change
Expand Up @@ -562,8 +562,8 @@ size_t H5T_NATIVE_UINT_FAST64_ALIGN_g = 0;
/* (+/- Inf for all floating-point types) */
float H5T_NATIVE_FLOAT_POS_INF_g = 0.0f;
float H5T_NATIVE_FLOAT_NEG_INF_g = 0.0f;
double H5T_NATIVE_DOUBLE_POS_INF_g = (double)0.0f;
double H5T_NATIVE_DOUBLE_NEG_INF_g = (double)0.0f;
double H5T_NATIVE_DOUBLE_POS_INF_g = 0.0;
double H5T_NATIVE_DOUBLE_NEG_INF_g = 0.0;

/* Declare the free list for H5T_t's and H5T_shared_t's */
H5FL_DEFINE(H5T_t);
Expand Down
2 changes: 1 addition & 1 deletion src/H5Zdeflate.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ const H5Z_class2_t H5Z_DEFLATE[1] = {{
H5Z__filter_deflate, /* The actual filter function */
}};

#define H5Z_DEFLATE_SIZE_ADJUST(s) (HDceil(((double)(s)) * (double)1.001f) + 12)
#define H5Z_DEFLATE_SIZE_ADJUST(s) (HDceil(((double)(s)) * 1.001) + 12)

/*-------------------------------------------------------------------------
* Function: H5Z__filter_deflate
Expand Down
2 changes: 1 addition & 1 deletion src/H5Zscaleoffset.c
Original file line number Diff line number Diff line change
Expand Up @@ -1116,7 +1116,7 @@ H5Z__filter_scaleoffset(unsigned flags, size_t cd_nelmts, const unsigned cd_valu
unsigned filavail; /* flag indicating if fill value is defined or not */
H5Z_SO_scale_type_t scale_type = H5Z_SO_FLOAT_DSCALE; /* scale type */
int scale_factor = 0; /* scale factor */
double D_val = 0.0f; /* decimal scale factor */
double D_val = 0.0; /* decimal scale factor */
uint32_t minbits = 0; /* minimum number of bits to store values */
unsigned long long minval = 0; /* minimum value of input buffer */
enum H5Z_scaleoffset_t type; /* memory type corresponding to dataset datatype */
Expand Down
Loading

0 comments on commit 9023e98

Please sign in to comment.