-/* 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. */
};
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;
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 */