Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
consistency between Action::ActionLmmList and Action::ActionList
authorMartin Quinson <martin.quinson@loria.fr>
Sat, 10 Mar 2018 17:30:12 +0000 (18:30 +0100)
committerMartin Quinson <martin.quinson@loria.fr>
Sat, 10 Mar 2018 17:30:12 +0000 (18:30 +0100)
src/kernel/lmm/maxmin.cpp
src/surf/surf_interface.hpp

index e859c9e..876d72d 100644 (file)
@@ -536,7 +536,7 @@ template <class CnstList> void System::solve(CnstList& cnst_list)
 
         elem.make_active();
         simgrid::surf::Action* action = static_cast<simgrid::surf::Action*>(elem.variable->id);
 
         elem.make_active();
         simgrid::surf::Action* action = static_cast<simgrid::surf::Action*>(elem.variable->id);
-        if (keep_track && not action->is_linked())
+        if (keep_track && not action->isLinkedModifiedSet())
           keep_track->push_back(*action);
       }
     }
           keep_track->push_back(*action);
       }
     }
index 2d69895..6f6cdce 100644 (file)
@@ -97,6 +97,11 @@ typedef boost::heap::pairing_heap<heap_element_type, boost::heap::constant_time_
 XBT_PUBLIC_CLASS Action {
 public:
   boost::intrusive::list_member_hook<> modifiedSetHook_; /* Used by the lazy update to list the actions to track */
 XBT_PUBLIC_CLASS Action {
 public:
   boost::intrusive::list_member_hook<> modifiedSetHook_; /* Used by the lazy update to list the actions to track */
+  bool isLinkedModifiedSet() const { return modifiedSetHook_.is_linked(); }
+
+  typedef boost::intrusive::member_hook<Action, boost::intrusive::list_member_hook<>, &Action::modifiedSetHook_>
+      ActionLmmOptions;
+  typedef boost::intrusive::list<Action, ActionLmmOptions> ActionLmmList;
 
   boost::intrusive::list_member_hook<> stateSetHook_;
   typedef boost::intrusive::member_hook<Action, boost::intrusive::list_member_hook<>, &Action::stateSetHook_>
 
   boost::intrusive::list_member_hook<> stateSetHook_;
   typedef boost::intrusive::member_hook<Action, boost::intrusive::list_member_hook<>, &Action::stateSetHook_>
@@ -268,18 +273,14 @@ public:
   double getLastValue() const { return lastValue_; }
   void setLastValue(double val) { lastValue_ = val; }
   Action::Type getType() const { return type_; }
   double getLastValue() const { return lastValue_; }
   void setLastValue(double val) { lastValue_ = val; }
   Action::Type getType() const { return type_; }
-  bool is_linked() const { return modifiedSetHook_.is_linked(); }
 
 protected:
   Action::SuspendStates suspended_ = Action::SuspendStates::not_suspended;
 };
 
 typedef Action::ActionList ActionList;
 
 protected:
   Action::SuspendStates suspended_ = Action::SuspendStates::not_suspended;
 };
 
 typedef Action::ActionList ActionList;
-
-typedef boost::intrusive::member_hook<Action, boost::intrusive::list_member_hook<>, &Action::modifiedSetHook_>
-    ActionLmmOptions;
-typedef boost::intrusive::list<Action, ActionLmmOptions> ActionLmmList;
-typedef ActionLmmList* ActionLmmListPtr;
+typedef Action::ActionLmmList ActionLmmList;
+typedef Action::ActionLmmList* ActionLmmListPtr;
 
 /*********
  * Model *
 
 /*********
  * Model *