summaryrefslogtreecommitdiffhomepage
path: root/ir/stat
diff options
context:
space:
mode:
authorChristoph Mallon <mallon@cs.uni-saarland.de>2015-07-16 08:45:36 +0200
committerChristoph Mallon <mallon@cs.uni-saarland.de>2015-07-16 08:59:10 +0200
commit21aa2a4cd48b2b1778355d393e262c525270197d (patch)
tree871fd7254bc6cd4a7a7763f491c3634024a16aec /ir/stat
parent8822a309481e7c62b363a4ce787b75bb0977f3c1 (diff)
Remove the unused function stat_calc_mean_distrib_tbl().
Diffstat (limited to 'ir/stat')
-rw-r--r--ir/stat/distrib.c40
-rw-r--r--ir/stat/firmstat_t.h5
2 files changed, 0 insertions, 45 deletions
diff --git a/ir/stat/distrib.c b/ir/stat/distrib.c
index 9b29c1c..ff7664d 100644
--- a/ir/stat/distrib.c
+++ b/ir/stat/distrib.c
@@ -130,46 +130,6 @@ void stat_inc_int_distrib_tbl(distrib_tbl_t *tbl, int key)
stat_inc_distrib_tbl(tbl, INT_TO_PTR(key));
}
-/*
- * calculates the mean value of a distribution
- */
-double stat_calc_mean_distrib_tbl(distrib_tbl_t *tbl)
-{
- size_t count;
- double sum;
-
- if (tbl->int_dist) {
- /* integer distribution, need min, max */
- if (pset_count(tbl->hash_map) == 0)
- return 0.0;
-
- int min = INT_MAX;
- int max = INT_MIN;
- sum = 0.0;
-
- foreach_pset(tbl->hash_map, distrib_entry_t, entry) {
- int value = PTR_TO_INT(entry->object);
-
- if (value < min)
- min = value;
- if (value > max)
- max = value;
-
- sum += cnt_to_dbl(&entry->cnt);
- }
- count = max - min + 1;
- } else {
- sum = 0.0;
- count = 0;
- foreach_pset(tbl->hash_map, distrib_entry_t, entry) {
- sum += cnt_to_dbl(&entry->cnt);
- ++count;
- }
- }
-
- return count ? sum / (double)count : 0.0;
-}
-
/**
* iterates over all entries in a distribution table
*/
diff --git a/ir/stat/firmstat_t.h b/ir/stat/firmstat_t.h
index b1dbc00..59b7764 100644
--- a/ir/stat/firmstat_t.h
+++ b/ir/stat/firmstat_t.h
@@ -472,11 +472,6 @@ void stat_inc_distrib_tbl(distrib_tbl_t *tbl, const void *object);
*/
void stat_inc_int_distrib_tbl(distrib_tbl_t *tbl, int key);
-/**
- * calculates the mean value of a distribution.
- */
-double stat_calc_mean_distrib_tbl(distrib_tbl_t *tbl);
-
/** evaluates each entry of a distribution table. */
typedef void (*eval_distrib_entry_fun)(const distrib_entry_t *entry, void *env);