Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' of framagit.org:simgrid/simgrid
[simgrid.git] / src / surf / cpu_ti.hpp
index df03111..457ebcc 100644 (file)
@@ -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 */