X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/5397eadb7c0c0482c2a0e658f772d3c165f4a44a..b1da263522ee9c5ca0b60d0ce75d3f06a2e641ba:/src/surf/cpu_cas01.hpp diff --git a/src/surf/cpu_cas01.hpp b/src/surf/cpu_cas01.hpp index 46e9cafbb0..316df92b94 100644 --- a/src/surf/cpu_cas01.hpp +++ b/src/surf/cpu_cas01.hpp @@ -1,22 +1,19 @@ -/* Copyright (c) 2013-2014. The SimGrid Team. +/* 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 + #include "cpu_interface.hpp" /*********** * Classes * ***********/ -class CpuCas01Model; -typedef CpuCas01Model *CpuCas01ModelPtr; - -class CpuCas01; -typedef CpuCas01 *CpuCas01Ptr; - -class CpuCas01Action; -typedef CpuCas01Action *CpuCas01ActionPtr; +class XBT_PRIVATE CpuCas01Model; +class XBT_PRIVATE CpuCas01; +class XBT_PRIVATE CpuCas01Action; /********* * Model * @@ -29,7 +26,7 @@ public: double (CpuCas01Model::*shareResources)(double now); void (CpuCas01Model::*updateActionsState)(double now, double delta); - CpuPtr createCpu(const char *name, xbt_dynar_t power_peak, int pstate, + 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, @@ -37,7 +34,7 @@ public: xbt_dict_t cpu_properties); double shareResourcesFull(double now); void addTraces(); - ActionListPtr p_cpuRunningActionSetThatDoesNotNeedBeingChecked; + ActionList *p_cpuRunningActionSetThatDoesNotNeedBeingChecked; }; /************ @@ -46,19 +43,20 @@ public: class CpuCas01 : public Cpu { public: - CpuCas01(CpuCas01ModelPtr model, const char *name, xbt_dynar_t power_peak, + CpuCas01(CpuCas01Model *model, const char *name, xbt_dynar_t power_peak, int pstate, double powerScale, tmgr_trace_t powerTrace, int core, e_surf_resource_state_t stateInitial, tmgr_trace_t stateTrace, xbt_dict_t properties) ; ~CpuCas01(); void updateState(tmgr_trace_event_t event_type, double value, double date); - CpuActionPtr execute(double size); - CpuActionPtr sleep(double duration); + CpuAction *execute(double size); + CpuAction *sleep(double duration); double getCurrentPowerPeak(); double getPowerPeakAt(int pstate_index); int getNbPstates(); void setPstate(int pstate_index); + int getPstate(); bool isUsed(); void setStateEvent(tmgr_trace_event_t stateEvent); void setPowerEvent(tmgr_trace_event_t stateEvent); @@ -77,10 +75,10 @@ private: * Action * **********/ class CpuCas01Action: public CpuAction { - friend CpuActionPtr CpuCas01::execute(double size); - friend CpuActionPtr CpuCas01::sleep(double duration); + friend CpuAction *CpuCas01::execute(double size); + friend CpuAction *CpuCas01::sleep(double duration); public: - CpuCas01Action(ModelPtr model, double cost, bool failed, double power, + CpuCas01Action(Model *model, double cost, bool failed, double power, lmm_constraint_t constraint); ~CpuCas01Action() {};