Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[surf] Add backlinks from Cpu to surf::Host
[simgrid.git] / src / surf / cpu_interface.hpp
index c74e737..3ba667a 100644 (file)
@@ -100,6 +100,8 @@ public:
 */
 XBT_PUBLIC_CLASS Cpu : public simgrid::surf::Resource {
 public:
+  static simgrid::xbt::FacetLevel<simgrid::Host, Cpu> LEVEL;
+  static void init();
   Cpu();
 
   /**
@@ -175,15 +177,18 @@ public:
   virtual int  getPstate()=0;
 
   void setState(e_surf_resource_state_t state);
+  void plug(simgrid::Host* host);
 
   void addTraces(void);
   int m_core = 1;                /* Amount of cores */
   double m_speedPeak;            /*< CPU speed peak, ie max value */
   double m_speedScale;           /*< Percentage of CPU available according to the trace, in [O,1] */
+  simgrid::Host* m_host = nullptr;
 
   /* Note (hypervisor): */
   lmm_constraint_t *p_constraintCore=NULL;
   void **p_constraintCoreId=NULL;
+
 };
 
 /**********