diff options
Diffstat (limited to 'Simulator/include/modeling/machine')
| -rw-r--r-- | Simulator/include/modeling/machine/CPU.h | 27 | ||||
| -rw-r--r-- | Simulator/include/modeling/machine/Machine.h | 5 |
2 files changed, 20 insertions, 12 deletions
diff --git a/Simulator/include/modeling/machine/CPU.h b/Simulator/include/modeling/machine/CPU.h index dce4d2c5..95af1c86 100644 --- a/Simulator/include/modeling/machine/CPU.h +++ b/Simulator/include/modeling/machine/CPU.h @@ -5,27 +5,30 @@ namespace Modeling class CPU { public: + /** + * \brief Creates a CPU with the given speed/core, number of cores, energy consumption, and failure model id. + */ CPU(int speed, int cores, int energyConsumption, int failureModelId); - /* - Returns the speed of this CPU. + /** + * \return the speed of this CPU. */ - int getSpeed(); + int getSpeed() const; - /* - Returns the nr of cores of this CPU. + /** + * \return The nr of cores of this CPU. */ - int getCores(); + int getCores() const; - /* - Returns the energy consumed by this CPU. + /** + * \return The energy consumed by this CPU. */ - int getEnergyConsumption(); + int getEnergyConsumption() const; - /* - Returns the failure model id of this CPU. + /** + * \return The failure model id of this CPU. */ - int getFailureModelId(); + int getFailureModelId() const; private: diff --git a/Simulator/include/modeling/machine/Machine.h b/Simulator/include/modeling/machine/Machine.h index c89d32d1..f18f8352 100644 --- a/Simulator/include/modeling/machine/Machine.h +++ b/Simulator/include/modeling/machine/Machine.h @@ -76,6 +76,11 @@ namespace Modeling */ float getLoad() const; + /** + * \return The number of cores in this machine. + */ + uint32_t getNumberOfCores() const; + private: // A list of cpus in this machine. std::vector<CPU> cpus; |
