diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2010-05-31 18:27:33 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2010-05-31 18:27:33 (GMT) |
commit | 7eb4441658717332e475e317570b58eb2cbd6f9f (patch) | |
tree | cada972fb27ac1d40c78cd4ebd686ab9ef7a2b94 /test/cache_common.h | |
parent | 9fc29cdd1c563aeab48952327e0910d83763236b (diff) | |
download | hdf5-7eb4441658717332e475e317570b58eb2cbd6f9f.zip hdf5-7eb4441658717332e475e317570b58eb2cbd6f9f.tar.gz hdf5-7eb4441658717332e475e317570b58eb2cbd6f9f.tar.bz2 |
[svn-r18926] Description:
Get down to just one "resize_configs_are_equal" comparison routine.
Tested on:
Mac OS X/32 10.6.3 (amazon)
(too minor to require h5committest)
Diffstat (limited to 'test/cache_common.h')
-rw-r--r-- | test/cache_common.h | 35 |
1 files changed, 6 insertions, 29 deletions
diff --git a/test/cache_common.h b/test/cache_common.h index 91fdd6c..f493239 100644 --- a/test/cache_common.h +++ b/test/cache_common.h @@ -445,35 +445,6 @@ if ( ( (cache_ptr) == NULL ) || \ ( (a).apply_empty_reserve == (b).apply_empty_reserve ) && \ ( (a).empty_reserve == (b).empty_reserve ) ) -#define RESIZE_CONFIGS_ARE_EQUAL(a, b, compare_init) \ -( ( (a).version == (b).version ) && \ - ( (a).rpt_fcn == (b).rpt_fcn ) && \ - ( ( ! compare_init ) || \ - ( (a).set_initial_size == (b).set_initial_size ) ) && \ - ( ( ! compare_init ) || \ - ( (a).initial_size == (b).initial_size ) ) && \ - ( DBL_REL_EQUAL((a).min_clean_fraction, (b).min_clean_fraction, 0.00001 ) ) && \ - ( (a).max_size == (b).max_size ) && \ - ( (a).min_size == (b).min_size ) && \ - ( (a).epoch_length == (b).epoch_length ) && \ - ( (a).incr_mode == (b).incr_mode ) && \ - ( DBL_REL_EQUAL((a).lower_hr_threshold, (b).lower_hr_threshold, 0.00001 ) ) && \ - ( DBL_REL_EQUAL((a).increment, (b).increment, 0.00001 ) ) && \ - ( (a).apply_max_increment == (b).apply_max_increment ) && \ - ( (a).max_increment == (b).max_increment ) && \ - ( (a).flash_incr_mode == (b).flash_incr_mode ) && \ - ( DBL_REL_EQUAL((a).flash_multiple, (b).flash_multiple, 0.00001 ) ) && \ - ( DBL_REL_EQUAL((a).flash_threshold, (b).flash_threshold, 0.00001 ) ) && \ - ( (a).decr_mode == (b).decr_mode ) && \ - ( DBL_REL_EQUAL((a).upper_hr_threshold, (b).upper_hr_threshold, 0.00001 ) ) && \ - ( DBL_REL_EQUAL((a).decrement, (b).decrement, 0.00001 ) ) && \ - ( (a).apply_max_decrement == (b).apply_max_decrement ) && \ - ( (a).max_decrement == (b).max_decrement ) && \ - ( (a).epochs_before_eviction == (b).epochs_before_eviction ) && \ - ( (a).apply_empty_reserve == (b).apply_empty_reserve ) && \ - ( DBL_REL_EQUAL((a).empty_reserve, (b).empty_reserve, 0.00001 ) ) ) - - #define XLATE_EXT_TO_INT_MDC_CONFIG(i, e) \ { \ (i).version = H5C__CURR_AUTO_SIZE_CTL_VER; \ @@ -508,6 +479,9 @@ if ( ( (cache_ptr) == NULL ) || \ (i).empty_reserve = (e).empty_reserve; \ } +/* Epsilon for floating-point comparisons */ +#define FP_EPSILON 0.000001 + /* misc type definitions */ @@ -760,6 +734,9 @@ void destroy_flush_dependency(int32_t parent_type, /*** H5AC level utility functions ***/ +hbool_t resize_configs_are_equal(const H5C_auto_size_ctl_t *a, + const H5C_auto_size_ctl_t *b, hbool_t compare_init); + void check_and_validate_cache_hit_rate(hid_t file_id, double * hit_rate_ptr, hbool_t dump_data, |