Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
No vm when ptask on
[simgrid.git] / src / surf / cpu.hpp
index 5c69982..669578a 100644 (file)
@@ -46,11 +46,18 @@ public:
   virtual int getCore();
   virtual double getSpeed(double load);
   virtual double getAvailableSpeed();
+
+  virtual double getCurrentPowerPeak()=0;
+  virtual double getPowerPeakAt(int pstate_index)=0;
+  virtual int getNbPstates()=0;
+  virtual void setPowerPeakAt(int pstate_index)=0;
+  virtual double getConsumedEnergy()=0;
+
   void addTraces(void);
   double m_powerPeak;            /*< CPU power peak */
   double m_powerScale;           /*< Percentage of CPU disponible */
-protected:
   int m_core;
+protected:
 
   //virtual boost::shared_ptr<Action> execute(double size) = 0;
   //virtual boost::shared_ptr<Action> sleep(double duration) = 0;
@@ -60,7 +67,8 @@ class CpuLmm : public ResourceLmm, public Cpu {
 public:
   CpuLmm(){};
   CpuLmm(CpuModelPtr model, const char* name, xbt_dict_t properties) : ResourceLmm(), Cpu(model, name, properties) {};
-
+  /* Note (hypervisor): */
+  lmm_constraint_t *p_constraintCore;
 };
 
 /**********
@@ -79,6 +87,10 @@ public:
   CpuActionLmm(ModelPtr model, double cost, bool failed)
   : Action(model, cost, failed), ActionLmm(model, cost, failed), CpuAction(model, cost, failed) {};
   void updateRemainingLazy(double now);
+  virtual void updateEnergy()=0;
+  void setAffinity(CpuLmmPtr cpu, unsigned long mask);
+  void setBound(double bound);
+  double m_bound;
 };