diff options
Diffstat (limited to 'Simulator/src/modeling/machine/Machine.cpp')
| -rw-r--r-- | Simulator/src/modeling/machine/Machine.cpp | 9 |
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; + } } |
