aboutsummaryrefslogtreecommitdiffstats
path: root/include/adaptive.h
diff options
context:
space:
mode:
authorBjoern B. Brandenburg <bbb@cs.unc.edu>2007-10-28 22:08:32 -0400
committerBjoern B. Brandenburg <bbb@cs.unc.edu>2007-10-28 22:08:32 -0400
commit99d81fbfc86fae7f5709e66a6c213195017f5627 (patch)
tree39ed130e765b417ee5d95af243e22e369f8d42da /include/adaptive.h
parent8574756fb52c5feff4c552bdae6c2d8dfab4a0ba (diff)
add stdump filter for adaptive systems2007.2
Diffstat (limited to 'include/adaptive.h')
-rw-r--r--include/adaptive.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/adaptive.h b/include/adaptive.h
index 8902da5..360b13e 100644
--- a/include/adaptive.h
+++ b/include/adaptive.h
@@ -12,6 +12,12 @@ static inline fp_t f2fp(double f)
12 return (fp_t) {f * (1 << FP_SHIFT)}; 12 return (fp_t) {f * (1 << FP_SHIFT)};
13} 13}
14 14
15static inline double fp2f(fp_t f)
16{
17 return ((double) f.val) / (1 << FP_SHIFT);
18}
19
20
15#define MAX_SERVICE_LEVELS 10 21#define MAX_SERVICE_LEVELS 10
16typedef struct { 22typedef struct {
17 fp_t weight; 23 fp_t weight;