Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
m_bound belongs to CpuAction; initialize it.
authorArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Fri, 7 Feb 2014 09:34:42 +0000 (10:34 +0100)
committerArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Sat, 8 Feb 2014 09:43:31 +0000 (10:43 +0100)
src/surf/cpu_interface.hpp
src/surf/surf_interface.hpp

index 4877bde..101359f 100644 (file)
@@ -216,7 +216,7 @@ public:
   /**
    * @brief CpuAction constructor
    */
-  CpuAction(){};
+  CpuAction(): m_bound(0) {};
 
   /**
    * @brief CpuAction constructor
@@ -226,7 +226,7 @@ public:
    * @param failed [TODO]
    */
   CpuAction(ModelPtr model, double cost, bool failed)
-  : Action(model, cost, failed) {} //FIXME:REMOVE
+    : Action(model, cost, failed), m_bound(0) {} //FIXME:REMOVE
 
   /**
    * @brief CpuAction constructor
@@ -237,7 +237,7 @@ public:
    * @param var The lmm variable associated to this CpuAction if it is part of a LMM component
    */
   CpuAction(ModelPtr model, double cost, bool failed, lmm_variable_t var)
-  : Action(model, cost, failed, var) {}
+    : Action(model, cost, failed, var), m_bound(0) {}
 
   /**
    * @brief Set the affinity of the current CpuAction
@@ -256,10 +256,17 @@ public:
    */
   virtual void setBound(double bound);
 
+  /**
+   * @brief Get the bound of the current CpuAction
+   *
+   * @return The bound of the current CpuAction
+   */
+  double getBound() { return m_bound; }
+
   void setState(e_surf_action_state_t state);
 
   void updateRemainingLazy(double now);
-  double m_bound;
+  double m_bound;                /*< the capping of the CPU use  */
 };
 
 #endif /* SURF_CPU_INTERFACE_HPP_ */
index 84593b5..4381fa7 100644 (file)
@@ -439,13 +439,6 @@ public:
    */
   virtual void setState(e_surf_action_state_t state);
 
-  /**
-   * @brief Get the bound of the current Action
-   * 
-   * @return The bound of the current Action
-   */
-  double getBound() {return m_bound;}
-
   /**
    * @brief Get the start time of the current action
    * 
@@ -679,7 +672,6 @@ private:
   ActionLmmListPtr p_modifiedSet;
   xbt_heap_t p_actionHeap;
   int m_selectiveUpdate;
-  double m_bound;   /**< the capping of the CPU use  */
   bool m_failed;
   double m_start; /**< start time  */
   char *p_category;               /**< tracing category for categorized resource utilization monitoring */