summaryrefslogtreecommitdiffstats
path: root/src/H5C.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2014-04-25 19:54:57 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2014-04-25 19:54:57 (GMT)
commit4257a32de13576155efc6df64aa0282bdf074ff1 (patch)
tree4da2d29685eb8c88e804d6daed0b59830cdbbffa /src/H5C.c
parentb018ba48ced579975e60362e3acfb6afb1f1d384 (diff)
downloadhdf5-4257a32de13576155efc6df64aa0282bdf074ff1.zip
hdf5-4257a32de13576155efc6df64aa0282bdf074ff1.tar.gz
hdf5-4257a32de13576155efc6df64aa0282bdf074ff1.tar.bz2
[svn-r25109] Description:
Bring r25084, 25088, 25092, 25097 from trunk to 1.8 branch: r25084: Begin process of migrating from using property list IDs internally to the library to using the internal generic property list data structure. r25088: Introduce "file I/O info" struct, to hold file & dxpl pointers, and start propagating up through library. r25092: More migration to using H5F_io_info_t pointers and away from using property list IDs internally. Also, clean up some compiler warnings in the cache code. r25097: Make progress toward moving from DXPL IDs to property list structures within the library. Also move the signature location code from the H5F package to the H5FD package, where it's a better fit. Also, clean up some more compiler warnings along the way. Tested: Mac OSX/64 10.9.2 (amazon) w/C++, FORTRAN & parallel (h5committested on trunk)
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 85c00f1..fa28584 100644
--- a/src/H5C.c
+++ b/src/H5C.c
@@ -1090,8 +1090,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;
@@ -2236,7 +2236,7 @@ H5C_get_cache_hit_rate(H5C_t * cache_ptr,
} else {
- *hit_rate_ptr = 0.0;
+ *hit_rate_ptr = 0.0f;
}
done:
@@ -3994,8 +3994,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 ) ) ) {
@@ -4019,8 +4019,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 ) ) ) {
@@ -4030,7 +4030,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 ) ) ) {
@@ -4040,10 +4040,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;
}
@@ -5517,8 +5517,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]");
@@ -5546,14 +5546,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");
@@ -5578,15 +5578,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]");
@@ -5614,14 +5614,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]");
@@ -5656,8 +5656,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]");
@@ -5670,8 +5670,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]");
@@ -5757,8 +5757,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 ) {
@@ -5773,7 +5773,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 )
{