+/* Copyright (c) 2013-2015. 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. */
+
+#include <xbt/base.h>
+
+#include "cpu_interface.hpp"
-class CpuCas01Model;
-typedef CpuCas01Model *CpuCas01ModelPtr;
-
-class CpuCas01Lmm;
-typedef CpuCas01Lmm *CpuCas01LmmPtr;
-
-class CpuCas01ActionLmm;
-typedef CpuCas01ActionLmm *CpuCas01ActionLmmPtr;
+class XBT_PRIVATE CpuCas01Model;
+class XBT_PRIVATE CpuCas01;
+class XBT_PRIVATE CpuCas01Action;
double (CpuCas01Model::*shareResources)(double now);
void (CpuCas01Model::*updateActionsState)(double now, double delta);
double (CpuCas01Model::*shareResources)(double now);
void (CpuCas01Model::*updateActionsState)(double now, double delta);
- void parseInit(sg_platf_host_cbarg_t host);
- CpuCas01LmmPtr createResource(const char *name, double power_peak, double power_scale,
+ Cpu *createCpu(const char *name, xbt_dynar_t power_peak, int pstate,
+ double power_scale,
tmgr_trace_t power_trace, int core,
e_surf_resource_state_t state_initial,
tmgr_trace_t state_trace,
xbt_dict_t cpu_properties);
tmgr_trace_t power_trace, int core,
e_surf_resource_state_t state_initial,
tmgr_trace_t state_trace,
xbt_dict_t cpu_properties);
- CpuCas01Lmm(CpuCas01ModelPtr model, const char *name, double powerPeak,
- double powerScale, tmgr_trace_t powerTrace, int core,
+ CpuCas01(CpuCas01Model *model, const char *name, xbt_dynar_t power_peak,
+ int pstate, double powerScale, tmgr_trace_t powerTrace, int core,
- CpuCas01ActionLmm() {};
- CpuCas01ActionLmm(ModelPtr model, double cost, bool failed): Action(model, cost, failed), CpuActionLmm(model, cost, failed) {};
+ CpuCas01Action(Model *model, double cost, bool failed, double power,
+ lmm_constraint_t constraint);
+
+ ~CpuCas01Action() {};