summaryrefslogtreecommitdiffstats
path: root/src/H5C.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5C.c')
-rw-r--r--src/H5C.c58
1 files changed, 29 insertions, 29 deletions
diff --git a/src/H5C.c b/src/H5C.c
index a63f98e..445e4bf 100644
--- a/src/H5C.c
+++ b/src/H5C.c
@@ -1240,8 +1240,8 @@ H5C_create(size_t max_cache_size,
(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 = 1.0;
- (cache_ptr->resize_ctl).flash_threshold = 0.25;
+ (cache_ptr->resize_ctl).flash_multiple = 1.0f;
+ (cache_ptr->resize_ctl).flash_threshold = 0.25f;
(cache_ptr->resize_ctl).decr_mode = H5C_decr__off;
(cache_ptr->resize_ctl).upper_hr_threshold = H5C__DEF_AR_UPPER_THRESHHOLD;
@@ -2392,7 +2392,7 @@ H5C_get_cache_hit_rate(H5C_t * cache_ptr,
} else {
- *hit_rate_ptr = 0.0;
+ *hit_rate_ptr = 0.0f;
}
done:
@@ -4273,8 +4273,8 @@ H5C_set_cache_auto_resize_config(H5C_t *cache_ptr,
break;
case H5C_incr__threshold:
- if ( ( config_ptr->lower_hr_threshold <= 0.0 ) ||
- ( config_ptr->increment <= 1.0 ) ||
+ if ( ( config_ptr->lower_hr_threshold <= (double)0.0f ) ||
+ ( config_ptr->increment <= (double)1.0f ) ||
( ( config_ptr->apply_max_increment ) &&
( config_ptr->max_increment <= 0 ) ) ) {
@@ -4298,8 +4298,8 @@ H5C_set_cache_auto_resize_config(H5C_t *cache_ptr,
break;
case H5C_decr__threshold:
- if ( ( config_ptr->upper_hr_threshold >= 1.0 ) ||
- ( config_ptr->decrement >= 1.0 ) ||
+ if ( ( config_ptr->upper_hr_threshold >= (double)1.0f ) ||
+ ( config_ptr->decrement >= (double)1.0f ) ||
( ( config_ptr->apply_max_decrement ) &&
( config_ptr->max_decrement <= 0 ) ) ) {
@@ -4309,7 +4309,7 @@ H5C_set_cache_auto_resize_config(H5C_t *cache_ptr,
case H5C_decr__age_out:
if ( ( ( config_ptr->apply_empty_reserve ) &&
- ( config_ptr->empty_reserve >= 1.0 ) ) ||
+ ( config_ptr->empty_reserve >= (double)1.0f ) ) ||
( ( config_ptr->apply_max_decrement ) &&
( config_ptr->max_decrement <= 0 ) ) ) {
@@ -4319,10 +4319,10 @@ H5C_set_cache_auto_resize_config(H5C_t *cache_ptr,
case H5C_decr__age_out_with_threshold:
if ( ( ( config_ptr->apply_empty_reserve ) &&
- ( config_ptr->empty_reserve >= 1.0 ) ) ||
+ ( config_ptr->empty_reserve >= (double)1.0f ) ) ||
( ( config_ptr->apply_max_decrement ) &&
( config_ptr->max_decrement <= 0 ) ) ||
- ( config_ptr->upper_hr_threshold >= 1.0 ) ) {
+ ( config_ptr->upper_hr_threshold >= (double)1.0f ) ) {
cache_ptr->size_decrease_possible = FALSE;
}
@@ -5814,8 +5814,8 @@ H5C_validate_resize_config(H5C_auto_size_ctl_t * config_ptr,
"initial_size must be in the interval [min_size, max_size]");
}
- if ( ( config_ptr->min_clean_fraction < 0.0 ) ||
- ( config_ptr->min_clean_fraction > 1.0 ) ) {
+ if ( ( config_ptr->min_clean_fraction < (double)0.0f ) ||
+ ( config_ptr->min_clean_fraction > (double)1.0f ) ) {
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, \
"min_clean_fraction must be in the interval [0.0, 1.0]");
@@ -5843,14 +5843,14 @@ H5C_validate_resize_config(H5C_auto_size_ctl_t * config_ptr,
if ( config_ptr->incr_mode == H5C_incr__threshold ) {
- if ( ( config_ptr->lower_hr_threshold < 0.0 ) ||
- ( config_ptr->lower_hr_threshold > 1.0 ) ) {
+ if ( ( config_ptr->lower_hr_threshold < (double)0.0f ) ||
+ ( config_ptr->lower_hr_threshold > (double)1.0f ) ) {
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, \
"lower_hr_threshold must be in the range [0.0, 1.0]");
}
- if ( config_ptr->increment < 1.0 ) {
+ if ( config_ptr->increment < (double)1.0f ) {
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, \
"increment must be greater than or equal to 1.0");
@@ -5875,15 +5875,15 @@ H5C_validate_resize_config(H5C_auto_size_ctl_t * config_ptr,
break;
case H5C_flash_incr__add_space:
- if ( ( config_ptr->flash_multiple < 0.1 ) ||
- ( config_ptr->flash_multiple > 10.0 ) ) {
+ if ( ( config_ptr->flash_multiple < (double)0.1f ) ||
+ ( config_ptr->flash_multiple > (double)10.0f ) ) {
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, \
"flash_multiple must be in the range [0.1, 10.0]");
}
- if ( ( config_ptr->flash_threshold < 0.1 ) ||
- ( config_ptr->flash_threshold > 1.0 ) ) {
+ if ( ( config_ptr->flash_threshold < (double)0.1f ) ||
+ ( config_ptr->flash_threshold > (double)1.0f ) ) {
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, \
"flash_threshold must be in the range [0.1, 1.0]");
@@ -5911,14 +5911,14 @@ H5C_validate_resize_config(H5C_auto_size_ctl_t * config_ptr,
if ( config_ptr->decr_mode == H5C_decr__threshold ) {
- if ( config_ptr->upper_hr_threshold > 1.0 ) {
+ if ( config_ptr->upper_hr_threshold > (double)1.0f ) {
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, \
"upper_hr_threshold must be <= 1.0");
}
- if ( ( config_ptr->decrement > 1.0 ) ||
- ( config_ptr->decrement < 0.0 ) ) {
+ if ( ( config_ptr->decrement > (double)1.0f ) ||
+ ( config_ptr->decrement < (double)0.0f ) ) {
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, \
"decrement must be in the interval [0.0, 1.0]");
@@ -5953,8 +5953,8 @@ H5C_validate_resize_config(H5C_auto_size_ctl_t * config_ptr,
}
if ( ( config_ptr->apply_empty_reserve ) &&
- ( ( config_ptr->empty_reserve > 1.0 ) ||
- ( config_ptr->empty_reserve < 0.0 ) ) ) {
+ ( ( config_ptr->empty_reserve > (double)1.0f ) ||
+ ( config_ptr->empty_reserve < (double)0.0f ) ) ) {
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, \
"empty_reserve must be in the interval [0.0, 1.0]");
@@ -5967,8 +5967,8 @@ H5C_validate_resize_config(H5C_auto_size_ctl_t * config_ptr,
if ( config_ptr->decr_mode == H5C_decr__age_out_with_threshold ) {
- if ( ( config_ptr->upper_hr_threshold > 1.0 ) ||
- ( config_ptr->upper_hr_threshold < 0.0 ) ) {
+ if ( ( config_ptr->upper_hr_threshold > (double)1.0f ) ||
+ ( config_ptr->upper_hr_threshold < (double)0.0f ) ) {
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, \
"upper_hr_threshold must be in the interval [0.0, 1.0]");
@@ -6399,8 +6399,8 @@ H5C__auto_adjust_cache_size(H5F_t * f,
HDassert( cache_ptr->magic == H5C__H5C_T_MAGIC );
HDassert( cache_ptr->cache_accesses >=
(cache_ptr->resize_ctl).epoch_length );
- HDassert( 0.0 <= (cache_ptr->resize_ctl).min_clean_fraction );
- HDassert( (cache_ptr->resize_ctl).min_clean_fraction <= 100.0 );
+ HDassert( (double)0.0f <= (cache_ptr->resize_ctl).min_clean_fraction );
+ HDassert( (cache_ptr->resize_ctl).min_clean_fraction <= (double)100.0f );
if ( !cache_ptr->resize_enabled ) {
@@ -6415,7 +6415,7 @@ H5C__auto_adjust_cache_size(H5F_t * f,
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Can't get hit rate.")
}
- HDassert( ( 0.0 <= hit_rate ) && ( hit_rate <= 1.0 ) );
+ HDassert( ( (double)0.0f <= hit_rate ) && ( hit_rate <= (double)1.0f ) );
switch ( (cache_ptr->resize_ctl).incr_mode )
{