X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/e8353121ed52ca33c1788d0aef412fcd5c0db125..96cedde3cdbc0b8ffc3f096a1b65d021b0226f99:/src/surf/cpu_ti.hpp diff --git a/src/surf/cpu_ti.hpp b/src/surf/cpu_ti.hpp index df031110a3..457ebcca43 100644 --- a/src/surf/cpu_ti.hpp +++ b/src/surf/cpu_ti.hpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2013-2018. The SimGrid Team. All rights reserved. */ +/* Copyright (c) 2013-2019. The SimGrid Team. All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ @@ -41,12 +41,13 @@ public: }; class CpuTiTmgr { -public: enum class Type { FIXED, /*< Trace fixed, no availability file */ DYNAMIC /*< Dynamic, have an availability file */ }; - CpuTiTmgr(Type type, double value) : type_(type), value_(value){}; + +public: + explicit CpuTiTmgr(double value) : type_(Type::FIXED), value_(value){}; CpuTiTmgr(tmgr_trace_t speed_trace, double value); CpuTiTmgr(const CpuTiTmgr&) = delete; CpuTiTmgr& operator=(const CpuTiTmgr&) = delete; @@ -56,6 +57,7 @@ public: double solve(double a, double amount); double get_power_scale(double a); +private: Type type_; double value_; /*< Percentage of cpu speed available. Value fixed between 0 and 1 */