summaryrefslogtreecommitdiff
path: root/Simulator/src/modeling/machine/Machine.cpp
diff options
context:
space:
mode:
authorMatthijs Bijman <matthijs@bijman.org>2017-02-27 13:55:50 +0100
committerMatthijs Bijman <matthijs@bijman.org>2017-02-27 13:55:50 +0100
commitcc5c5a7eac0ebcf97c283e1e0dd1674c855a261a (patch)
tree841f95e14a00cb6d23d4e357c9e0cfcbdc3c9a2a /Simulator/src/modeling/machine/Machine.cpp
parent0709a81231b695caecb2269fe23d8dadeb764892 (diff)
Implement logging of cores_used in task_states
Diffstat (limited to 'Simulator/src/modeling/machine/Machine.cpp')
-rw-r--r--Simulator/src/modeling/machine/Machine.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/Simulator/src/modeling/machine/Machine.cpp b/Simulator/src/modeling/machine/Machine.cpp
index d7d4fac7..db336dd8 100644
--- a/Simulator/src/modeling/machine/Machine.cpp
+++ b/Simulator/src/modeling/machine/Machine.cpp
@@ -77,4 +77,13 @@ namespace Modeling
{
return this->load;
}
+
+ uint32_t Machine::getNumberOfCores() const
+ {
+ uint32_t cores = 0;
+ for (auto& processor : cpus) {
+ cores += processor.getCores();
+ }
+ return cores;
+ }
}