diff options
Diffstat (limited to 'native/src/tasks.cpp')
| -rw-r--r-- | native/src/tasks.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/native/src/tasks.cpp b/native/src/tasks.cpp index 1d784bf..0d0624c 100644 --- a/native/src/tasks.cpp +++ b/native/src/tasks.cpp | |||
| @@ -152,6 +152,17 @@ unsigned long TaskSet::k_for_epsilon(unsigned int idx, | |||
| 152 | return (unsigned long) ceil(std::max(0.0, bound.get_d())); | 152 | return (unsigned long) ceil(std::max(0.0, bound.get_d())); |
| 153 | } | 153 | } |
| 154 | 154 | ||
| 155 | void TaskSet::bound_demand(const integral_t &time, integral_t &demand) const | ||
| 156 | { | ||
| 157 | integral_t task_demand; | ||
| 158 | demand = 0; | ||
| 159 | for (unsigned int i = 0; i < tasks.size(); i++) | ||
| 160 | { | ||
| 161 | tasks[i].bound_demand(time, task_demand); | ||
| 162 | demand += task_demand; | ||
| 163 | } | ||
| 164 | } | ||
| 165 | |||
| 155 | void TaskSet::approx_load(fractional_t &load, const fractional_t &epsilon) const | 166 | void TaskSet::approx_load(fractional_t &load, const fractional_t &epsilon) const |
| 156 | { | 167 | { |
| 157 | fractional_t density; | 168 | fractional_t density; |
