From cc5c5a7eac0ebcf97c283e1e0dd1674c855a261a Mon Sep 17 00:00:00 2001 From: Matthijs Bijman Date: Mon, 27 Feb 2017 13:55:50 +0100 Subject: Implement logging of cores_used in task_states --- Simulator/src/modeling/machine/Machine.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'Simulator/src/modeling/machine/Machine.cpp') 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; + } } -- cgit v1.2.3