Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
start snake_case()ing some private fields
authorMartin Quinson <martin.quinson@loria.fr>
Sat, 24 Mar 2018 17:28:31 +0000 (18:28 +0100)
committerMartin Quinson <martin.quinson@loria.fr>
Sat, 24 Mar 2018 17:44:54 +0000 (18:44 +0100)
26 files changed:
include/simgrid/kernel/resource/Action.hpp
include/simgrid/kernel/resource/Model.hpp
include/simgrid/kernel/resource/Resource.hpp
include/simgrid/kernel/routing/ClusterZone.hpp
include/simgrid/kernel/routing/DijkstraZone.hpp
include/simgrid/kernel/routing/DragonflyZone.hpp
include/simgrid/kernel/routing/FatTreeZone.hpp
src/kernel/resource/Action.cpp
src/kernel/resource/Model.cpp
src/kernel/resource/Resource.cpp
src/kernel/routing/ClusterZone.cpp
src/kernel/routing/DijkstraZone.cpp
src/kernel/routing/DragonflyZone.cpp
src/kernel/routing/FatTreeZone.cpp
src/kernel/routing/TorusZone.cpp
src/kernel/routing/VivaldiZone.cpp
src/surf/StorageImpl.cpp
src/surf/cpu_cas01.cpp
src/surf/cpu_ti.cpp
src/surf/network_cm02.cpp
src/surf/network_constant.cpp
src/surf/network_ib.cpp
src/surf/network_ns3.cpp
src/surf/ptask_L07.cpp
src/surf/sg_platf.cpp
src/surf/storage_n11.cpp

index d3b7a04..39a2a07 100644 (file)
@@ -100,7 +100,7 @@ public:
   /** @brief Get the start time of the current action */
   double getStartTime() const { return start_; }
   /** @brief Get the finish time of the current action */
-  double getFinishTime() const { return finishTime_; }
+  double getFinishTime() const { return finish_time_; }
 
   /** @brief Get the user data associated to the current action */
   void* getData() const { return data_; }
@@ -128,7 +128,7 @@ public:
   double getRemainsNoUpdate() const { return remains_; }
 
   /** @brief Set the finish time of the current action */
-  void setFinishTime(double value) { finishTime_ = value; }
+  void setFinishTime(double value) { finish_time_ = value; }
 
   /**@brief Add a reference to the current action (refcounting) */
   void ref();
@@ -150,7 +150,7 @@ public:
   virtual bool isSuspended();
 
   /** @brief Get the maximum duration of the current action */
-  double getMaxDuration() const { return maxDuration_; }
+  double getMaxDuration() const { return max_duration_; }
   /** @brief Set the maximum duration of the current Action */
   virtual void setMaxDuration(double duration);
 
@@ -160,27 +160,27 @@ public:
   void setCategory(const char* category);
 
   /** @brief Get the priority of the current Action */
-  double getPriority() const { return sharingWeight_; };
+  double getPriority() const { return sharing_weight_; };
   /** @brief Set the priority of the current Action */
   virtual void setSharingWeight(double priority);
-  void setSharingWeightNoUpdate(double weight) { sharingWeight_ = weight; }
+  void setSharingWeightNoUpdate(double weight) { sharing_weight_ = weight; }
 
   /** @brief Get the state set in which the action is */
-  ActionList* getStateSet() const { return stateSet_; };
+  ActionList* getStateSet() const { return state_set_; };
 
   simgrid::kernel::resource::Model* getModel() const { return model_; }
 
 protected:
-  ActionList* stateSet_;
+  ActionList* state_set_;
   int refcount_ = 1;
 
 private:
-  double sharingWeight_ = 1.0;             /**< priority (1.0 by default) */
-  double maxDuration_   = NO_MAX_DURATION; /*< max_duration (may fluctuate until the task is completed) */
+  double sharing_weight_ = 1.0;             /**< priority (1.0 by default) */
+  double max_duration_   = NO_MAX_DURATION; /*< max_duration (may fluctuate until the task is completed) */
   double remains_;           /**< How much of that cost remains to be done in the currently running task */
   double start_;             /**< start time  */
   char* category_ = nullptr; /**< tracing category for categorized resource utilization monitoring */
-  double finishTime_ =
+  double finish_time_ =
       -1; /**< finish time : this is modified during the run and fluctuates until the task is completed */
 
   double cost_;
@@ -188,24 +188,24 @@ private:
   void* data_ = nullptr; /**< for your convenience */
 
   /* LMM */
-  double lastUpdate_                                  = 0;
-  double lastValue_                                   = 0;
+  double last_update_                                  = 0;
+  double last_value_                                   = 0;
   kernel::lmm::Variable* variable_                    = nullptr;
   Action::Type type_                                  = Action::Type::NOTSET;
-  boost::optional<heap_type::handle_type> heapHandle_ = boost::none;
+  boost::optional<heap_type::handle_type> heap_handle_ = boost::none;
 
 public:
   virtual void updateRemainingLazy(double now) = 0;
   void heapInsert(heap_type& heap, double key, Action::Type hat);
   void heapRemove(heap_type& heap);
   void heapUpdate(heap_type& heap, double key, Action::Type hat);
-  void clearHeapHandle() { heapHandle_ = boost::none; }
+  void clearHeapHandle() { heap_handle_ = boost::none; }
   kernel::lmm::Variable* getVariable() const { return variable_; }
   void setVariable(kernel::lmm::Variable* var) { variable_ = var; }
-  double getLastUpdate() const { return lastUpdate_; }
+  double getLastUpdate() const { return last_update_; }
   void refreshLastUpdate();
-  double getLastValue() const { return lastValue_; }
-  void setLastValue(double val) { lastValue_ = val; }
+  double getLastValue() const { return last_value_; }
+  void setLastValue(double val) { last_value_ = val; }
   Action::Type getType() const { return type_; }
 
 protected:
index 9ef9a46..a67f1fe 100644 (file)
@@ -35,36 +35,36 @@ public:
   virtual ~Model();
 
   /** @brief Get the set of [actions](@ref Action) in *ready* state */
-  ActionList* getReadyActionSet() const { return readyActionSet_; }
+  ActionList* getReadyActionSet() const { return ready_action_set_; }
 
   /** @brief Get the set of [actions](@ref Action) in *running* state */
-  ActionList* getRunningActionSet() const { return runningActionSet_; }
+  ActionList* getRunningActionSet() const { return running_action_set_; }
 
   /** @brief Get the set of [actions](@ref Action) in *failed* state */
-  ActionList* getFailedActionSet() const { return failedActionSet_; }
+  ActionList* getFailedActionSet() const { return failed_action_set_; }
 
   /** @brief Get the set of [actions](@ref Action) in *done* state */
-  ActionList* getDoneActionSet() const { return doneActionSet_; }
+  ActionList* getDoneActionSet() const { return done_action_set_; }
 
   /** @brief Get the set of modified [actions](@ref Action) */
   ActionLmmListPtr getModifiedSet() const;
 
   /** @brief Get the maxmin system of the current Model */
-  lmm_system_t getMaxminSystem() const { return maxminSystem_; }
+  lmm_system_t getMaxminSystem() const { return maxmin_system_; }
 
   /**
    * @brief Get the update mechanism of the current Model
    * @see e_UM_t
    */
-  e_UM_t getUpdateMechanism() const { return updateMechanism_; }
-  void setUpdateMechanism(e_UM_t mechanism) { updateMechanism_ = mechanism; }
+  e_UM_t getUpdateMechanism() const { return update_mechanism_; }
+  void setUpdateMechanism(e_UM_t mechanism) { update_mechanism_ = mechanism; }
 
   /** @brief Get Action heap */
-  heap_type& getActionHeap() { return actionHeap_; }
+  heap_type& getActionHeap() { return action_heap_; }
 
-  double actionHeapTopDate() const { return actionHeap_.top().first; }
+  double actionHeapTopDate() const { return action_heap_.top().first; }
   Action* actionHeapPop();
-  bool actionHeapIsEmpty() const { return actionHeap_.empty(); }
+  bool actionHeapIsEmpty() const { return action_heap_.empty(); }
 
   /**
    * @brief Share the resources between the actions
@@ -94,15 +94,15 @@ public:
   virtual bool nextOccuringEventIsIdempotent() { return true; }
 
 protected:
-  lmm_system_t maxminSystem_ = nullptr;
+  lmm_system_t maxmin_system_ = nullptr;
 
 private:
-  e_UM_t updateMechanism_ = UM_UNDEFINED;
-  ActionList* readyActionSet_   = new ActionList(); /**< Actions in state SURF_ACTION_READY */
-  ActionList* runningActionSet_ = new ActionList(); /**< Actions in state SURF_ACTION_RUNNING */
-  ActionList* failedActionSet_  = new ActionList(); /**< Actions in state SURF_ACTION_FAILED */
-  ActionList* doneActionSet_    = new ActionList(); /**< Actions in state SURF_ACTION_DONE */
-  heap_type actionHeap_;
+  e_UM_t update_mechanism_        = UM_UNDEFINED;
+  ActionList* ready_action_set_   = new ActionList(); /**< Actions in state SURF_ACTION_READY */
+  ActionList* running_action_set_ = new ActionList(); /**< Actions in state SURF_ACTION_RUNNING */
+  ActionList* failed_action_set_  = new ActionList(); /**< Actions in state SURF_ACTION_FAILED */
+  ActionList* done_action_set_    = new ActionList(); /**< Actions in state SURF_ACTION_DONE */
+  heap_type action_heap_;
 };
 
 } // namespace resource
index 70061ab..551ff4c 100644 (file)
@@ -70,7 +70,7 @@ public:
 private:
   std::string name_;
   Model* model_;
-  bool isOn_ = true;
+  bool is_on_ = true;
 
 public: /* LMM */
   /** @brief Get the lmm constraint associated to this Resource if it is part of a LMM component (or null if none) */
index b74924c..f07b371 100644 (file)
@@ -81,18 +81,18 @@ public:
 
   /* We use a map instead of a std::vector here because that's a sparse vector. Some values may not exist */
   /* The pair is {linkUp, linkDown} */
-  std::unordered_map<unsigned int, std::pair<surf::LinkImpl*, surf::LinkImpl*>> privateLinks_;
+  std::unordered_map<unsigned int, std::pair<surf::LinkImpl*, surf::LinkImpl*>> private_links_;
 
-  unsigned int nodePosition(int id) { return id * linkCountPerNode_; }
-  unsigned int nodePositionWithLoopback(int id) { return nodePosition(id) + (hasLoopback_ ? 1 : 0); }
-  unsigned int nodePositionWithLimiter(int id) { return nodePositionWithLoopback(id) + (hasLimiter_ ? 1 : 0); }
+  unsigned int nodePosition(int id) { return id * num_links_per_node_; }
+  unsigned int nodePositionWithLoopback(int id) { return nodePosition(id) + (has_loopback_ ? 1 : 0); }
+  unsigned int nodePositionWithLimiter(int id) { return nodePositionWithLoopback(id) + (has_limiter_ ? 1 : 0); }
 
   surf::LinkImpl* backbone_      = nullptr;
   void* loopback_                = nullptr;
   NetPoint* router_              = nullptr;
-  bool hasLimiter_               = false;
-  bool hasLoopback_              = false;
-  unsigned int linkCountPerNode_ = 1; /* may be 1 (if only a private link), 2 or 3 (if limiter and loopback) */
+  bool has_limiter_                = false;
+  bool has_loopback_               = false;
+  unsigned int num_links_per_node_ = 1; /* may be 1 (if only a private link), 2 or 3 (if limiter and loopback) */
 };
 } // namespace routing
 } // namespace kernel
index 2304ed6..2a638bd 100644 (file)
@@ -55,10 +55,10 @@ public:
   void addRoute(NetPoint* src, NetPoint* dst, NetPoint* gw_src, NetPoint* gw_dst,
                 std::vector<simgrid::surf::LinkImpl*>& link_list, bool symmetrical) override;
 
-  xbt_graph_t routeGraph_ = nullptr;           /* xbt_graph */
-  std::map<int, xbt_node_t> graphNodeMap_;     /* map */
+  xbt_graph_t route_graph_ = nullptr;          /* xbt_graph */
+  std::map<int, xbt_node_t> graph_node_map_;   /* map */
   bool cached_;                                /* cache mode */
-  std::map<int, std::vector<int>> routeCache_; /* use in cache mode */
+  std::map<int, std::vector<int>> route_cache_; /* use in cache mode */
 };
 } // namespace routing
 } // namespace kernel
index bf389a4..f5063d9 100644 (file)
@@ -17,10 +17,10 @@ public:
   unsigned int group_;
   unsigned int chassis_;
   unsigned int blade_;
-  surf::LinkImpl** blueLinks_  = nullptr;
-  surf::LinkImpl** blackLinks_ = nullptr;
-  surf::LinkImpl** greenLinks_ = nullptr;
-  surf::LinkImpl** myNodes_    = nullptr;
+  surf::LinkImpl** blue_links_  = nullptr;
+  surf::LinkImpl** black_links_ = nullptr;
+  surf::LinkImpl** green_links_ = nullptr;
+  surf::LinkImpl** my_nodes_    = nullptr;
   DragonflyRouter(int i, int j, int k);
   ~DragonflyRouter();
 };
@@ -74,14 +74,14 @@ public:
 
 private:
   ClusterCreationArgs* cluster_     = nullptr;
-  unsigned int numNodesPerBlade_    = 0;
-  unsigned int numBladesPerChassis_ = 0;
-  unsigned int numChassisPerGroup_  = 0;
-  unsigned int numGroups_           = 0;
-  unsigned int numLinksGreen_       = 0;
-  unsigned int numLinksBlack_       = 0;
-  unsigned int numLinksBlue_        = 0;
-  unsigned int numLinksperLink_     = 1; // splitduplex -> 2, only for local link
+  unsigned int num_nodes_per_blade_    = 0;
+  unsigned int num_blades_per_chassis_ = 0;
+  unsigned int num_chassis_per_group_  = 0;
+  unsigned int num_groups_             = 0;
+  unsigned int num_links_green_        = 0;
+  unsigned int num_links_black_        = 0;
+  unsigned int num_links_blue_         = 0;
+  unsigned int num_links_per_link_     = 1; // splitduplex -> 2, only for local link
   DragonflyRouter** routers_        = nullptr;
 };
 } // namespace routing
index 27bd621..6d19220 100644 (file)
@@ -46,7 +46,7 @@ public:
 
   /** Virtual link standing for the node global capacity.
    */
-  surf::LinkImpl* limiterLink;
+  surf::LinkImpl* limiter_link_;
   /** If present, communications from this node to this node will pass through it
    * instead of passing by an upper level switch.
    */
@@ -63,13 +63,13 @@ class FatTreeLink {
 public:
   FatTreeLink(ClusterCreationArgs* cluster, FatTreeNode* source, FatTreeNode* destination);
   /** Link going up in the tree */
-  surf::LinkImpl* upLink;
+  surf::LinkImpl* up_link_;
   /** Link going down in the tree */
-  surf::LinkImpl* downLink;
+  surf::LinkImpl* down_link_;
   /** Upper end of the link */
-  FatTreeNode* upNode;
+  FatTreeNode* up_node_;
   /** Lower end of the link */
-  FatTreeNode* downNode;
+  FatTreeNode* down_node_;
 };
 
 /** @ingroup ROUTING_API
@@ -124,7 +124,7 @@ private:
   std::vector<unsigned int> upperLevelNodesNumber_; // number of parents by node
   std::vector<unsigned int> lowerLevelPortsNumber_; // ports between each level l and l-1
 
-  std::map<int, FatTreeNode*> computeNodes_;
+  std::map<int, FatTreeNode*> compute_nodes_;
   std::vector<FatTreeNode*> nodes_;
   std::vector<FatTreeLink*> links_;
   std::vector<unsigned int> nodesByLevel_;
index 8559cca..a7d037a 100644 (file)
@@ -23,11 +23,11 @@ Action::Action(simgrid::kernel::resource::Model* model, double cost, bool failed
     : remains_(cost), start_(surf_get_clock()), cost_(cost), model_(model), variable_(var)
 {
   if (failed)
-    stateSet_ = getModel()->getFailedActionSet();
+    state_set_ = getModel()->getFailedActionSet();
   else
-    stateSet_ = getModel()->getRunningActionSet();
+    state_set_ = getModel()->getRunningActionSet();
 
-  stateSet_->push_back(*this);
+  state_set_->push_back(*this);
 }
 
 Action::~Action()
@@ -37,45 +37,45 @@ Action::~Action()
 
 void Action::finish(Action::State state)
 {
-  finishTime_ = surf_get_clock();
+  finish_time_ = surf_get_clock();
   setState(state);
 }
 
 Action::State Action::getState() const
 {
-  if (stateSet_ == model_->getReadyActionSet())
+  if (state_set_ == model_->getReadyActionSet())
     return Action::State::ready;
-  if (stateSet_ == model_->getRunningActionSet())
+  if (state_set_ == model_->getRunningActionSet())
     return Action::State::running;
-  if (stateSet_ == model_->getFailedActionSet())
+  if (state_set_ == model_->getFailedActionSet())
     return Action::State::failed;
-  if (stateSet_ == model_->getDoneActionSet())
+  if (state_set_ == model_->getDoneActionSet())
     return Action::State::done;
   return Action::State::not_in_the_system;
 }
 
 void Action::setState(Action::State state)
 {
-  simgrid::xbt::intrusive_erase(*stateSet_, *this);
+  simgrid::xbt::intrusive_erase(*state_set_, *this);
   switch (state) {
     case Action::State::ready:
-      stateSet_ = model_->getReadyActionSet();
+      state_set_ = model_->getReadyActionSet();
       break;
     case Action::State::running:
-      stateSet_ = model_->getRunningActionSet();
+      state_set_ = model_->getRunningActionSet();
       break;
     case Action::State::failed:
-      stateSet_ = model_->getFailedActionSet();
+      state_set_ = model_->getFailedActionSet();
       break;
     case Action::State::done:
-      stateSet_ = model_->getDoneActionSet();
+      state_set_ = model_->getDoneActionSet();
       break;
     default:
-      stateSet_ = nullptr;
+      state_set_ = nullptr;
       break;
   }
-  if (stateSet_)
-    stateSet_->push_back(*this);
+  if (state_set_)
+    state_set_->push_back(*this);
 }
 
 double Action::getBound() const
@@ -106,7 +106,7 @@ void Action::ref()
 
 void Action::setMaxDuration(double duration)
 {
-  maxDuration_ = duration;
+  max_duration_ = duration;
   if (getModel()->getUpdateMechanism() == UM_LAZY) // remove action from the heap
     heapRemove(getModel()->getActionHeap());
 }
@@ -114,7 +114,7 @@ void Action::setMaxDuration(double duration)
 void Action::setSharingWeight(double weight)
 {
   XBT_IN("(%p,%g)", this, weight);
-  sharingWeight_ = weight;
+  sharing_weight_ = weight;
   getModel()->getMaxminSystem()->update_variable_weight(getVariable(), weight);
 
   if (getModel()->getUpdateMechanism() == UM_LAZY)
@@ -137,7 +137,7 @@ int Action::unref()
   refcount_--;
   if (not refcount_) {
     if (stateSetHook_.is_linked())
-      simgrid::xbt::intrusive_erase(*stateSet_, *this);
+      simgrid::xbt::intrusive_erase(*state_set_, *this);
     if (getVariable())
       getModel()->getMaxminSystem()->variable_free(getVariable());
     if (getModel()->getUpdateMechanism() == UM_LAZY) {
@@ -159,8 +159,8 @@ void Action::suspend()
     getModel()->getMaxminSystem()->update_variable_weight(getVariable(), 0.0);
     if (getModel()->getUpdateMechanism() == UM_LAZY) {
       heapRemove(getModel()->getActionHeap());
-      if (getModel()->getUpdateMechanism() == UM_LAZY && stateSet_ == getModel()->getRunningActionSet() &&
-          sharingWeight_ > 0) {
+      if (getModel()->getUpdateMechanism() == UM_LAZY && state_set_ == getModel()->getRunningActionSet() &&
+          sharing_weight_ > 0) {
         // If we have a lazy model, we need to update the remaining value accordingly
         updateRemainingLazy(surf_get_clock());
       }
@@ -196,14 +196,14 @@ bool Action::isSuspended()
 void Action::heapInsert(heap_type& heap, double key, Action::Type hat)
 {
   type_       = hat;
-  heapHandle_ = heap.emplace(std::make_pair(key, this));
+  heap_handle_ = heap.emplace(std::make_pair(key, this));
 }
 
 void Action::heapRemove(heap_type& heap)
 {
   type_ = Action::Type::NOTSET;
-  if (heapHandle_) {
-    heap.erase(*heapHandle_);
+  if (heap_handle_) {
+    heap.erase(*heap_handle_);
     clearHeapHandle();
   }
 }
@@ -211,10 +211,10 @@ void Action::heapRemove(heap_type& heap)
 void Action::heapUpdate(heap_type& heap, double key, Action::Type hat)
 {
   type_ = hat;
-  if (heapHandle_) {
-    heap.update(*heapHandle_, std::make_pair(key, this));
+  if (heap_handle_) {
+    heap.update(*heap_handle_, std::make_pair(key, this));
   } else {
-    heapHandle_ = heap.emplace(std::make_pair(key, this));
+    heap_handle_ = heap.emplace(std::make_pair(key, this));
   }
 }
 
@@ -230,7 +230,7 @@ double Action::getRemains()
 
 void Action::updateMaxDuration(double delta)
 {
-  double_update(&maxDuration_, delta, sg_surf_precision);
+  double_update(&max_duration_, delta, sg_surf_precision);
 }
 void Action::updateRemains(double delta)
 {
@@ -239,7 +239,7 @@ void Action::updateRemains(double delta)
 
 void Action::refreshLastUpdate()
 {
-  lastUpdate_ = surf_get_clock();
+  last_update_ = surf_get_clock();
 }
 
 } // namespace surf
index 2755f5d..7354c6e 100644 (file)
@@ -16,32 +16,32 @@ Model::Model() = default;
 
 Model::~Model()
 {
-  delete readyActionSet_;
-  delete runningActionSet_;
-  delete failedActionSet_;
-  delete doneActionSet_;
-  delete maxminSystem_;
+  delete ready_action_set_;
+  delete running_action_set_;
+  delete failed_action_set_;
+  delete done_action_set_;
+  delete maxmin_system_;
 }
 
 Action* Model::actionHeapPop()
 {
-  Action* action = actionHeap_.top().second;
-  actionHeap_.pop();
+  Action* action = action_heap_.top().second;
+  action_heap_.pop();
   action->clearHeapHandle();
   return action;
 }
 
 ActionLmmListPtr Model::getModifiedSet() const
 {
-  return maxminSystem_->modified_set_;
+  return maxmin_system_->modified_set_;
 }
 
 double Model::nextOccuringEvent(double now)
 {
   // FIXME: set the good function once and for all
-  if (updateMechanism_ == UM_LAZY)
+  if (update_mechanism_ == UM_LAZY)
     return nextOccuringEventLazy(now);
-  else if (updateMechanism_ == UM_FULL)
+  else if (update_mechanism_ == UM_FULL)
     return nextOccuringEventFull(now);
   else
     xbt_die("Invalid cpu update mechanism!");
@@ -49,16 +49,16 @@ double Model::nextOccuringEvent(double now)
 
 double Model::nextOccuringEventLazy(double now)
 {
-  XBT_DEBUG("Before share resources, the size of modified actions set is %zu", maxminSystem_->modified_set_->size());
-  lmm_solve(maxminSystem_);
-  XBT_DEBUG("After share resources, The size of modified actions set is %zu", maxminSystem_->modified_set_->size());
+  XBT_DEBUG("Before share resources, the size of modified actions set is %zu", maxmin_system_->modified_set_->size());
+  lmm_solve(maxmin_system_);
+  XBT_DEBUG("After share resources, The size of modified actions set is %zu", maxmin_system_->modified_set_->size());
 
-  while (not maxminSystem_->modified_set_->empty()) {
-    Action* action = &(maxminSystem_->modified_set_->front());
-    maxminSystem_->modified_set_->pop_front();
+  while (not maxmin_system_->modified_set_->empty()) {
+    Action* action = &(maxmin_system_->modified_set_->front());
+    maxmin_system_->modified_set_->pop_front();
     bool max_dur_flag = false;
 
-    if (action->getStateSet() != runningActionSet_)
+    if (action->getStateSet() != running_action_set_)
       continue;
 
     /* bogus priority, skip it */
@@ -93,7 +93,7 @@ double Model::nextOccuringEventLazy(double now)
               action->getStartTime(), min, share, action->getMaxDuration());
 
     if (min > -1) {
-      action->heapUpdate(actionHeap_, min, max_dur_flag ? Action::Type::MAX_DURATION : Action::Type::NORMAL);
+      action->heapUpdate(action_heap_, min, max_dur_flag ? Action::Type::MAX_DURATION : Action::Type::NORMAL);
       XBT_DEBUG("Insert at heap action(%p) min %f now %f", action, min, now);
     } else
       DIE_IMPOSSIBLE;
@@ -112,7 +112,7 @@ double Model::nextOccuringEventLazy(double now)
 
 double Model::nextOccuringEventFull(double /*now*/)
 {
-  maxminSystem_->solve_fun(maxminSystem_);
+  maxmin_system_->solve_fun(maxmin_system_);
 
   double min = -1;
 
@@ -140,9 +140,9 @@ double Model::nextOccuringEventFull(double /*now*/)
 
 void Model::updateActionsState(double now, double delta)
 {
-  if (updateMechanism_ == UM_FULL)
+  if (update_mechanism_ == UM_FULL)
     updateActionsStateFull(now, delta);
-  else if (updateMechanism_ == UM_LAZY)
+  else if (update_mechanism_ == UM_LAZY)
     updateActionsStateLazy(now, delta);
   else
     xbt_die("Invalid cpu update mechanism!");
index ef78365..427a6b1 100644 (file)
@@ -20,21 +20,21 @@ Resource::~Resource() = default;
 
 bool Resource::isOn() const
 {
-  return isOn_;
+  return is_on_;
 }
 bool Resource::isOff() const
 {
-  return not isOn_;
+  return not is_on_;
 }
 
 void Resource::turnOn()
 {
-  isOn_ = true;
+  is_on_ = true;
 }
 
 void Resource::turnOff()
 {
-  isOn_ = false;
+  is_on_ = false;
 }
 
 double Resource::getLoad()
index aefe976..d5da906 100644 (file)
@@ -24,13 +24,13 @@ ClusterZone::ClusterZone(NetZone* father, std::string name) : NetZoneImpl(father
 void ClusterZone::getLocalRoute(NetPoint* src, NetPoint* dst, RouteCreationArgs* route, double* lat)
 {
   XBT_VERB("cluster getLocalRoute from '%s'[%u] to '%s'[%u]", src->getCname(), src->id(), dst->getCname(), dst->id());
-  xbt_assert(not privateLinks_.empty(),
+  xbt_assert(not private_links_.empty(),
              "Cluster routing: no links attached to the source node - did you use host_link tag?");
 
-  if ((src->id() == dst->id()) && hasLoopback_) {
+  if ((src->id() == dst->id()) && has_loopback_) {
     xbt_assert(not src->isRouter(), "Routing from a cluster private router to itself is meaningless");
 
-    std::pair<surf::LinkImpl*, surf::LinkImpl*> info = privateLinks_.at(nodePosition(src->id()));
+    std::pair<surf::LinkImpl*, surf::LinkImpl*> info = private_links_.at(nodePosition(src->id()));
     route->link_list.push_back(info.first);
     if (lat)
       *lat += info.first->latency();
@@ -38,12 +38,12 @@ void ClusterZone::getLocalRoute(NetPoint* src, NetPoint* dst, RouteCreationArgs*
   }
 
   if (not src->isRouter()) { // No private link for the private router
-    if (hasLimiter_) { // limiter for sender
-      std::pair<surf::LinkImpl*, surf::LinkImpl*> info = privateLinks_.at(nodePositionWithLoopback(src->id()));
+    if (has_limiter_) {      // limiter for sender
+      std::pair<surf::LinkImpl*, surf::LinkImpl*> info = private_links_.at(nodePositionWithLoopback(src->id()));
       route->link_list.push_back(info.first);
     }
 
-    std::pair<surf::LinkImpl*, surf::LinkImpl*> info = privateLinks_.at(nodePositionWithLimiter(src->id()));
+    std::pair<surf::LinkImpl*, surf::LinkImpl*> info = private_links_.at(nodePositionWithLimiter(src->id()));
     if (info.first) { // link up
       route->link_list.push_back(info.first);
       if (lat)
@@ -59,14 +59,14 @@ void ClusterZone::getLocalRoute(NetPoint* src, NetPoint* dst, RouteCreationArgs*
 
   if (not dst->isRouter()) { // No specific link for router
 
-    std::pair<surf::LinkImpl*, surf::LinkImpl*> info = privateLinks_.at(nodePositionWithLimiter(dst->id()));
+    std::pair<surf::LinkImpl*, surf::LinkImpl*> info = private_links_.at(nodePositionWithLimiter(dst->id()));
     if (info.second) { // link down
       route->link_list.push_back(info.second);
       if (lat)
         *lat += info.second->latency();
     }
-    if (hasLimiter_) { // limiter for receiver
-      info = privateLinks_.at(nodePositionWithLoopback(dst->id()));
+    if (has_limiter_) { // limiter for receiver
+      info = private_links_.at(nodePositionWithLoopback(dst->id()));
       route->link_list.push_back(info.first);
     }
   }
@@ -91,7 +91,7 @@ void ClusterZone::getGraph(xbt_graph_t graph, std::map<std::string, xbt_node_t>*
     if (not src->isRouter()) {
       xbt_node_t previous = new_xbt_graph_node(graph, src->getCname(), nodes);
 
-      std::pair<surf::LinkImpl*, surf::LinkImpl*> info = privateLinks_.at(src->id());
+      std::pair<surf::LinkImpl*, surf::LinkImpl*> info = private_links_.at(src->id());
 
       if (info.first) { // link up
         xbt_node_t current = new_xbt_graph_node(graph, info.first->getCname(), nodes);
@@ -138,7 +138,7 @@ void ClusterZone::create_links_for_node(ClusterCreationArgs* cluster, int id, in
     linkUp   = surf::LinkImpl::byName(link_id);
     linkDown = linkUp;
   }
-  privateLinks_.insert({position, {linkUp, linkDown}});
+  private_links_.insert({position, {linkUp, linkDown}});
 }
 }
 }
index 346cdf7..b29e678 100644 (file)
@@ -37,12 +37,12 @@ void DijkstraZone::seal()
   xbt_node_t node = nullptr;
 
   /* Create the topology graph */
-  if (not routeGraph_)
-    routeGraph_ = xbt_graph_new_graph(1, nullptr);
+  if (not route_graph_)
+    route_graph_ = xbt_graph_new_graph(1, nullptr);
 
   /* Add the loopback if needed */
   if (surf_network_model->loopback_ && hierarchy_ == RoutingMode::base) {
-    xbt_dynar_foreach (xbt_graph_get_nodes(routeGraph_), cursor, node) {
+    xbt_dynar_foreach (xbt_graph_get_nodes(route_graph_), cursor, node) {
 
       bool found = false;
       xbt_edge_t edge = nullptr;
@@ -57,13 +57,13 @@ void DijkstraZone::seal()
       if (not found) {
         RouteCreationArgs* e_route = new simgrid::kernel::routing::RouteCreationArgs();
         e_route->link_list.push_back(surf_network_model->loopback_);
-        xbt_graph_new_edge(routeGraph_, node, node, e_route);
+        xbt_graph_new_edge(route_graph_, node, node, e_route);
       }
     }
   }
 
   /* initialize graph indexes in nodes after graph has been built */
-  xbt_dynar_t nodes = xbt_graph_get_nodes(routeGraph_);
+  xbt_dynar_t nodes = xbt_graph_get_nodes(route_graph_);
 
   xbt_dynar_foreach (nodes, cursor, node) {
     graph_node_data_t data = static_cast<graph_node_data_t>(xbt_graph_node_get_data(node));
@@ -77,16 +77,16 @@ xbt_node_t DijkstraZone::routeGraphNewNode(int id, int graph_id)
   data->id       = id;
   data->graph_id = graph_id;
 
-  xbt_node_t node                = xbt_graph_new_node(routeGraph_, data);
-  graphNodeMap_.emplace(id, node);
+  xbt_node_t node = xbt_graph_new_node(route_graph_, data);
+  graph_node_map_.emplace(id, node);
 
   return node;
 }
 
 xbt_node_t DijkstraZone::nodeMapSearch(int id)
 {
-  auto ret = graphNodeMap_.find(id);
-  return ret == graphNodeMap_.end() ? nullptr : ret->second;
+  auto ret = graph_node_map_.find(id);
+  return ret == graph_node_map_.end() ? nullptr : ret->second;
 }
 
 /* Parsing */
@@ -120,7 +120,7 @@ void DijkstraZone::newRoute(int src_id, int dst_id, simgrid::kernel::routing::Ro
   }
 
   /* add link as edge to graph */
-  xbt_graph_new_edge(routeGraph_, src, dst, e_route);
+  xbt_graph_new_edge(route_graph_, src, dst, e_route);
 }
 
 void DijkstraZone::getLocalRoute(NetPoint* src, NetPoint* dst, RouteCreationArgs* route, double* lat)
@@ -129,7 +129,7 @@ void DijkstraZone::getLocalRoute(NetPoint* src, NetPoint* dst, RouteCreationArgs
   int src_id = src->id();
   int dst_id = dst->id();
 
-  xbt_dynar_t nodes = xbt_graph_get_nodes(routeGraph_);
+  xbt_dynar_t nodes = xbt_graph_get_nodes(route_graph_);
 
   /* Use the graph_node id mapping set to quickly find the nodes */
   xbt_node_t src_elm = nodeMapSearch(src_id);
@@ -143,7 +143,7 @@ void DijkstraZone::getLocalRoute(NetPoint* src, NetPoint* dst, RouteCreationArgs
 
     xbt_node_t node_s_v = xbt_dynar_get_as(nodes, src_node_id, xbt_node_t);
     xbt_node_t node_e_v = xbt_dynar_get_as(nodes, dst_node_id, xbt_node_t);
-    xbt_edge_t edge     = xbt_graph_get_edge(routeGraph_, node_s_v, node_e_v);
+    xbt_edge_t edge     = xbt_graph_get_edge(route_graph_, node_s_v, node_e_v);
 
     if (edge == nullptr)
       THROWF(arg_error, 0, "No route from '%s' to '%s'", src->getCname(), dst->getCname());
@@ -157,7 +157,7 @@ void DijkstraZone::getLocalRoute(NetPoint* src, NetPoint* dst, RouteCreationArgs
     }
   }
 
-  auto elm                   = routeCache_.emplace(src_id, std::vector<int>());
+  auto elm                   = route_cache_.emplace(src_id, std::vector<int>());
   std::vector<int>& pred_arr = elm.first->second;
 
   if (elm.second) { /* new element was inserted (not cached mode, or cache miss) */
@@ -213,7 +213,7 @@ void DijkstraZone::getLocalRoute(NetPoint* src, NetPoint* dst, RouteCreationArgs
   for (int v = dst_node_id; v != src_node_id; v = pred_arr[v]) {
     xbt_node_t node_pred_v = xbt_dynar_get_as(nodes, pred_arr[v], xbt_node_t);
     xbt_node_t node_v      = xbt_dynar_get_as(nodes, v, xbt_node_t);
-    xbt_edge_t edge        = xbt_graph_get_edge(routeGraph_, node_pred_v, node_v);
+    xbt_edge_t edge        = xbt_graph_get_edge(route_graph_, node_pred_v, node_v);
 
     if (edge == nullptr)
       THROWF(arg_error, 0, "No route from '%s' to '%s'", src->getCname(), dst->getCname());
@@ -255,12 +255,12 @@ void DijkstraZone::getLocalRoute(NetPoint* src, NetPoint* dst, RouteCreationArgs
   }
 
   if (not cached_)
-    routeCache_.clear();
+    route_cache_.clear();
 }
 
 DijkstraZone::~DijkstraZone()
 {
-  xbt_graph_free_graph(routeGraph_, &graph_node_data_free, &graph_edge_data_free, nullptr);
+  xbt_graph_free_graph(route_graph_, &graph_node_data_free, &graph_edge_data_free, nullptr);
 }
 
 /* Creation routing model functions */
@@ -279,8 +279,8 @@ void DijkstraZone::addRoute(kernel::routing::NetPoint* src, kernel::routing::Net
   addRouteCheckParams(src, dst, gw_src, gw_dst, link_list, symmetrical);
 
   /* Create the topology graph */
-  if (not routeGraph_)
-    routeGraph_ = xbt_graph_new_graph(1, nullptr);
+  if (not route_graph_)
+    route_graph_ = xbt_graph_new_graph(1, nullptr);
 
   /* we don't check whether the route already exist, because the algorithm may find another path through some other
    * nodes */
@@ -292,10 +292,10 @@ void DijkstraZone::addRoute(kernel::routing::NetPoint* src, kernel::routing::Net
   // Symmetrical YES
   if (symmetrical == true) {
 
-    xbt_dynar_t nodes   = xbt_graph_get_nodes(routeGraph_);
+    xbt_dynar_t nodes   = xbt_graph_get_nodes(route_graph_);
     xbt_node_t node_s_v = xbt_dynar_get_as(nodes, src->id(), xbt_node_t);
     xbt_node_t node_e_v = xbt_dynar_get_as(nodes, dst->id(), xbt_node_t);
-    xbt_edge_t edge     = xbt_graph_get_edge(routeGraph_, node_e_v, node_s_v);
+    xbt_edge_t edge     = xbt_graph_get_edge(route_graph_, node_e_v, node_s_v);
 
     if (not gw_dst || not gw_src) {
       XBT_DEBUG("Load Route from \"%s\" to \"%s\"", dstName, srcName);
index 1ca6814..3ad8df8 100644 (file)
@@ -25,7 +25,7 @@ DragonflyZone::DragonflyZone(NetZone* father, std::string name) : ClusterZone(fa
 DragonflyZone::~DragonflyZone()
 {
   if (this->routers_ != nullptr) {
-    for (unsigned int i = 0; i < this->numGroups_ * this->numChassisPerGroup_ * this->numBladesPerChassis_; i++)
+    for (unsigned int i = 0; i < this->num_groups_ * this->num_chassis_per_group_ * this->num_blades_per_chassis_; i++)
       delete routers_[i];
     delete[] routers_;
   }
@@ -34,12 +34,12 @@ DragonflyZone::~DragonflyZone()
 void DragonflyZone::rankId_to_coords(int rankId, unsigned int (*coords)[4])
 {
   // coords : group, chassis, blade, node
-  (*coords)[0]         = rankId / (numChassisPerGroup_ * numBladesPerChassis_ * numNodesPerBlade_);
-  rankId               = rankId % (numChassisPerGroup_ * numBladesPerChassis_ * numNodesPerBlade_);
-  (*coords)[1]         = rankId / (numBladesPerChassis_ * numNodesPerBlade_);
-  rankId               = rankId % (numBladesPerChassis_ * numNodesPerBlade_);
-  (*coords)[2]         = rankId / numNodesPerBlade_;
-  (*coords)[3]         = rankId % numNodesPerBlade_;
+  (*coords)[0] = rankId / (num_chassis_per_group_ * num_blades_per_chassis_ * num_nodes_per_blade_);
+  rankId       = rankId % (num_chassis_per_group_ * num_blades_per_chassis_ * num_nodes_per_blade_);
+  (*coords)[1] = rankId / (num_blades_per_chassis_ * num_nodes_per_blade_);
+  rankId       = rankId % (num_blades_per_chassis_ * num_nodes_per_blade_);
+  (*coords)[2] = rankId / num_nodes_per_blade_;
+  (*coords)[3] = rankId % num_nodes_per_blade_;
 }
 
 void DragonflyZone::parse_specific_arguments(ClusterCreationArgs* cluster)
@@ -60,13 +60,13 @@ void DragonflyZone::parse_specific_arguments(ClusterCreationArgs* cluster)
   }
 
   try {
-    this->numGroups_ = std::stoi(tmp[0]);
+    this->num_groups_ = std::stoi(tmp[0]);
   } catch (std::invalid_argument& ia) {
     throw std::invalid_argument(std::string("Invalid number of groups:") + tmp[0]);
   }
 
   try {
-    this->numLinksBlue_ = std::stoi(tmp[1]);
+    this->num_links_blue_ = std::stoi(tmp[1]);
   } catch (std::invalid_argument& ia) {
     throw std::invalid_argument(std::string("Invalid number of links for the blue level:") + tmp[1]);
   }
@@ -77,13 +77,13 @@ void DragonflyZone::parse_specific_arguments(ClusterCreationArgs* cluster)
   }
 
   try {
-    this->numChassisPerGroup_ = std::stoi(tmp[0]);
+    this->num_chassis_per_group_ = std::stoi(tmp[0]);
   } catch (std::invalid_argument& ia) {
     throw std::invalid_argument(std::string("Invalid number of groups:") + tmp[0]);
   }
 
   try {
-    this->numLinksBlack_ = std::stoi(tmp[1]);
+    this->num_links_black_ = std::stoi(tmp[1]);
   } catch (std::invalid_argument& ia) {
     throw std::invalid_argument(std::string("Invalid number of links for the black level:") + tmp[1]);
   }
@@ -95,26 +95,26 @@ void DragonflyZone::parse_specific_arguments(ClusterCreationArgs* cluster)
   }
 
   try {
-    this->numBladesPerChassis_ = std::stoi(tmp[0]);
+    this->num_blades_per_chassis_ = std::stoi(tmp[0]);
   } catch (std::invalid_argument& ia) {
     throw std::invalid_argument(std::string("Invalid number of groups:") + tmp[0]);
   }
 
   try {
-    this->numLinksGreen_ = std::stoi(tmp[1]);
+    this->num_links_green_ = std::stoi(tmp[1]);
   } catch (std::invalid_argument& ia) {
     throw std::invalid_argument(std::string("Invalid number of links for the green level:") + tmp[1]);
   }
 
   // The last part of topo_parameters should be the number of nodes per blade
   try {
-    this->numNodesPerBlade_ = std::stoi(parameters[3]);
+    this->num_nodes_per_blade_ = std::stoi(parameters[3]);
   } catch (std::invalid_argument& ia) {
     throw std::invalid_argument(std::string("Last parameter is not the amount of nodes per blade:") + parameters[3]);
   }
 
   if (cluster->sharing_policy == SURF_LINK_SPLITDUPLEX)
-    this->numLinksperLink_ = 2;
+    this->num_links_per_link_ = 2;
 
   this->cluster_ = cluster;
 }
@@ -122,7 +122,7 @@ void DragonflyZone::parse_specific_arguments(ClusterCreationArgs* cluster)
 /* Generate the cluster once every node is created */
 void DragonflyZone::seal()
 {
-  if (this->numNodesPerBlade_ == 0) {
+  if (this->num_nodes_per_blade_ == 0) {
     return;
   }
 
@@ -136,22 +136,23 @@ DragonflyRouter::DragonflyRouter(int group, int chassis, int blade) : group_(gro
 
 DragonflyRouter::~DragonflyRouter()
 {
-  delete[] myNodes_;
-  delete[] greenLinks_;
-  delete[] blackLinks_;
-  delete blueLinks_;
+  delete[] my_nodes_;
+  delete[] green_links_;
+  delete[] black_links_;
+  delete blue_links_;
 }
 
 void DragonflyZone::generateRouters()
 {
-  this->routers_ = new DragonflyRouter*[this->numGroups_ * this->numChassisPerGroup_ * this->numBladesPerChassis_];
+  this->routers_ =
+      new DragonflyRouter*[this->num_groups_ * this->num_chassis_per_group_ * this->num_blades_per_chassis_];
 
-  for (unsigned int i = 0; i < this->numGroups_; i++) {
-    for (unsigned int j = 0; j < this->numChassisPerGroup_; j++) {
-      for (unsigned int k = 0; k < this->numBladesPerChassis_; k++) {
+  for (unsigned int i = 0; i < this->num_groups_; i++) {
+    for (unsigned int j = 0; j < this->num_chassis_per_group_; j++) {
+      for (unsigned int k = 0; k < this->num_blades_per_chassis_; k++) {
         DragonflyRouter* router = new DragonflyRouter(i, j, k);
-        this->routers_[i * this->numChassisPerGroup_ * this->numBladesPerChassis_ + j * this->numBladesPerChassis_ +
-                       k] = router;
+        this->routers_[i * this->num_chassis_per_group_ * this->num_blades_per_chassis_ +
+                       j * this->num_blades_per_chassis_ + k] = router;
       }
     }
   }
@@ -185,56 +186,56 @@ void DragonflyZone::generateLinks()
   surf::LinkImpl* linkup;
   surf::LinkImpl* linkdown;
 
-  unsigned int numRouters = this->numGroups_ * this->numChassisPerGroup_ * this->numBladesPerChassis_;
+  unsigned int numRouters = this->num_groups_ * this->num_chassis_per_group_ * this->num_blades_per_chassis_;
 
   // Links from routers to their local nodes.
   for (unsigned int i = 0; i < numRouters; i++) {
     // allocate structures
-    this->routers_[i]->myNodes_    = new surf::LinkImpl*[numLinksperLink_ * this->numNodesPerBlade_];
-    this->routers_[i]->greenLinks_ = new surf::LinkImpl*[this->numBladesPerChassis_];
-    this->routers_[i]->blackLinks_ = new surf::LinkImpl*[this->numChassisPerGroup_];
+    this->routers_[i]->my_nodes_    = new surf::LinkImpl*[num_links_per_link_ * this->num_nodes_per_blade_];
+    this->routers_[i]->green_links_ = new surf::LinkImpl*[this->num_blades_per_chassis_];
+    this->routers_[i]->black_links_ = new surf::LinkImpl*[this->num_chassis_per_group_];
 
-    for (unsigned int j = 0; j < numLinksperLink_ * this->numNodesPerBlade_; j += numLinksperLink_) {
-      std::string id = "local_link_from_router_"+ std::to_string(i) + "_to_node_" +
-          std::to_string(j / numLinksperLink_) + "_" + std::to_string(uniqueId);
+    for (unsigned int j = 0; j < num_links_per_link_ * this->num_nodes_per_blade_; j += num_links_per_link_) {
+      std::string id = "local_link_from_router_" + std::to_string(i) + "_to_node_" +
+                       std::to_string(j / num_links_per_link_) + "_" + std::to_string(uniqueId);
       this->createLink(id, 1, &linkup, &linkdown);
 
-      this->routers_[i]->myNodes_[j] = linkup;
+      this->routers_[i]->my_nodes_[j] = linkup;
       if (this->cluster_->sharing_policy == SURF_LINK_SPLITDUPLEX)
-        this->routers_[i]->myNodes_[j + 1] = linkdown;
+        this->routers_[i]->my_nodes_[j + 1] = linkdown;
 
       uniqueId++;
     }
   }
 
   // Green links from routers to same chassis routers - alltoall
-  for (unsigned int i = 0; i < this->numGroups_ * this->numChassisPerGroup_; i++) {
-    for (unsigned int j = 0; j < this->numBladesPerChassis_; j++) {
-      for (unsigned int k = j + 1; k < this->numBladesPerChassis_; k++) {
-        std::string id = "green_link_in_chassis_" + std::to_string(i % numChassisPerGroup_) +"_between_routers_" +
-            std::to_string(j) + "_and_" + std::to_string(k) + "_" + std::to_string(uniqueId);
-        this->createLink(id, this->numLinksGreen_, &linkup, &linkdown);
-
-        this->routers_[i * numBladesPerChassis_ + j]->greenLinks_[k] = linkup;
-        this->routers_[i * numBladesPerChassis_ + k]->greenLinks_[j] = linkdown;
+  for (unsigned int i = 0; i < this->num_groups_ * this->num_chassis_per_group_; i++) {
+    for (unsigned int j = 0; j < this->num_blades_per_chassis_; j++) {
+      for (unsigned int k = j + 1; k < this->num_blades_per_chassis_; k++) {
+        std::string id = "green_link_in_chassis_" + std::to_string(i % num_chassis_per_group_) + "_between_routers_" +
+                         std::to_string(j) + "_and_" + std::to_string(k) + "_" + std::to_string(uniqueId);
+        this->createLink(id, this->num_links_green_, &linkup, &linkdown);
+
+        this->routers_[i * num_blades_per_chassis_ + j]->green_links_[k] = linkup;
+        this->routers_[i * num_blades_per_chassis_ + k]->green_links_[j] = linkdown;
         uniqueId++;
       }
     }
   }
 
   // Black links from routers to same group routers - alltoall
-  for (unsigned int i = 0; i < this->numGroups_; i++) {
-    for (unsigned int j = 0; j < this->numChassisPerGroup_; j++) {
-      for (unsigned int k = j + 1; k < this->numChassisPerGroup_; k++) {
-        for (unsigned int l = 0; l < this->numBladesPerChassis_; l++) {
+  for (unsigned int i = 0; i < this->num_groups_; i++) {
+    for (unsigned int j = 0; j < this->num_chassis_per_group_; j++) {
+      for (unsigned int k = j + 1; k < this->num_chassis_per_group_; k++) {
+        for (unsigned int l = 0; l < this->num_blades_per_chassis_; l++) {
           std::string id = "black_link_in_group_" + std::to_string(i) + "_between_chassis_" + std::to_string(j) +
               "_and_" + std::to_string(k) +"_blade_" + std::to_string(l) + "_" + std::to_string(uniqueId);
-          this->createLink(id, this->numLinksBlack_, &linkup, &linkdown);
+          this->createLink(id, this->num_links_black_, &linkup, &linkdown);
 
-          this->routers_[i * numBladesPerChassis_ * numChassisPerGroup_ + j * numBladesPerChassis_ + l]
-              ->blackLinks_[k] = linkup;
-          this->routers_[i * numBladesPerChassis_ * numChassisPerGroup_ + k * numBladesPerChassis_ + l]
-              ->blackLinks_[j] = linkdown;
+          this->routers_[i * num_blades_per_chassis_ * num_chassis_per_group_ + j * num_blades_per_chassis_ + l]
+              ->black_links_[k] = linkup;
+          this->routers_[i * num_blades_per_chassis_ * num_chassis_per_group_ + k * num_blades_per_chassis_ + l]
+              ->black_links_[j] = linkdown;
           uniqueId++;
         }
       }
@@ -244,18 +245,18 @@ void DragonflyZone::generateLinks()
   // Blue links between groups - Not all routers involved, only one per group is linked to others. Let's say router n of
   // each group is linked to group n.
   // FIXME: in reality blue links may be attached to several different routers
-  for (unsigned int i = 0; i < this->numGroups_; i++) {
-    for (unsigned int j = i + 1; j < this->numGroups_; j++) {
-      unsigned int routernumi                = i * numBladesPerChassis_ * numChassisPerGroup_ + j;
-      unsigned int routernumj                = j * numBladesPerChassis_ * numChassisPerGroup_ + i;
-      this->routers_[routernumi]->blueLinks_ = new surf::LinkImpl*;
-      this->routers_[routernumj]->blueLinks_ = new surf::LinkImpl*;
+  for (unsigned int i = 0; i < this->num_groups_; i++) {
+    for (unsigned int j = i + 1; j < this->num_groups_; j++) {
+      unsigned int routernumi                 = i * num_blades_per_chassis_ * num_chassis_per_group_ + j;
+      unsigned int routernumj                 = j * num_blades_per_chassis_ * num_chassis_per_group_ + i;
+      this->routers_[routernumi]->blue_links_ = new surf::LinkImpl*;
+      this->routers_[routernumj]->blue_links_ = new surf::LinkImpl*;
       std::string id = "blue_link_between_group_"+ std::to_string(i) +"_and_" + std::to_string(j) +"_routers_" +
           std::to_string(routernumi) + "_and_" + std::to_string(routernumj) + "_" + std::to_string(uniqueId);
-      this->createLink(id, this->numLinksBlue_, &linkup, &linkdown);
+      this->createLink(id, this->num_links_blue_, &linkup, &linkdown);
 
-      this->routers_[routernumi]->blueLinks_[0] = linkup;
-      this->routers_[routernumj]->blueLinks_[0] = linkdown;
+      this->routers_[routernumi]->blue_links_[0] = linkup;
+      this->routers_[routernumj]->blue_links_[0] = linkdown;
       uniqueId++;
     }
   }
@@ -271,8 +272,8 @@ void DragonflyZone::getLocalRoute(NetPoint* src, NetPoint* dst, RouteCreationArg
 
   XBT_VERB("dragonfly getLocalRoute from '%s'[%u] to '%s'[%u]", src->getCname(), src->id(), dst->getCname(), dst->id());
 
-  if ((src->id() == dst->id()) && hasLoopback_) {
-    std::pair<surf::LinkImpl*, surf::LinkImpl*> info = privateLinks_.at(nodePosition(src->id()));
+  if ((src->id() == dst->id()) && has_loopback_) {
+    std::pair<surf::LinkImpl*, surf::LinkImpl*> info = private_links_.at(nodePosition(src->id()));
 
     route->link_list.push_back(info.first);
     if (latency)
@@ -288,19 +289,19 @@ void DragonflyZone::getLocalRoute(NetPoint* src, NetPoint* dst, RouteCreationArg
   XBT_DEBUG("dst : %u group, %u chassis, %u blade, %u node", targetCoords[0], targetCoords[1], targetCoords[2],
             targetCoords[3]);
 
-  DragonflyRouter* myRouter = routers_[myCoords[0] * (numChassisPerGroup_ * numBladesPerChassis_) +
-                                       myCoords[1] * numBladesPerChassis_ + myCoords[2]];
-  DragonflyRouter* targetRouter = routers_[targetCoords[0] * (numChassisPerGroup_ * numBladesPerChassis_) +
-                                           targetCoords[1] * numBladesPerChassis_ + targetCoords[2]];
+  DragonflyRouter* myRouter      = routers_[myCoords[0] * (num_chassis_per_group_ * num_blades_per_chassis_) +
+                                       myCoords[1] * num_blades_per_chassis_ + myCoords[2]];
+  DragonflyRouter* targetRouter  = routers_[targetCoords[0] * (num_chassis_per_group_ * num_blades_per_chassis_) +
+                                           targetCoords[1] * num_blades_per_chassis_ + targetCoords[2]];
   DragonflyRouter* currentRouter = myRouter;
 
   // node->router local link
-  route->link_list.push_back(myRouter->myNodes_[myCoords[3] * numLinksperLink_]);
+  route->link_list.push_back(myRouter->my_nodes_[myCoords[3] * num_links_per_link_]);
   if (latency)
-    *latency += myRouter->myNodes_[myCoords[3] * numLinksperLink_]->latency();
+    *latency += myRouter->my_nodes_[myCoords[3] * num_links_per_link_]->latency();
 
-  if (hasLimiter_) { // limiter for sender
-    std::pair<surf::LinkImpl*, surf::LinkImpl*> info = privateLinks_.at(nodePositionWithLoopback(src->id()));
+  if (has_limiter_) { // limiter for sender
+    std::pair<surf::LinkImpl*, surf::LinkImpl*> info = private_links_.at(nodePositionWithLoopback(src->id()));
     route->link_list.push_back(info.first);
   }
 
@@ -311,53 +312,53 @@ void DragonflyZone::getLocalRoute(NetPoint* src, NetPoint* dst, RouteCreationArg
       // go to the router of our group connected to this one.
       if (currentRouter->blade_ != targetCoords[0]) {
         // go to the nth router in our chassis
-        route->link_list.push_back(currentRouter->greenLinks_[targetCoords[0]]);
+        route->link_list.push_back(currentRouter->green_links_[targetCoords[0]]);
         if (latency)
-          *latency += currentRouter->greenLinks_[targetCoords[0]]->latency();
-        currentRouter = routers_[myCoords[0] * (numChassisPerGroup_ * numBladesPerChassis_) +
-                                 myCoords[1] * numBladesPerChassis_ + targetCoords[0]];
+          *latency += currentRouter->green_links_[targetCoords[0]]->latency();
+        currentRouter = routers_[myCoords[0] * (num_chassis_per_group_ * num_blades_per_chassis_) +
+                                 myCoords[1] * num_blades_per_chassis_ + targetCoords[0]];
       }
 
       if (currentRouter->chassis_ != 0) {
         // go to the first chassis of our group
-        route->link_list.push_back(currentRouter->blackLinks_[0]);
+        route->link_list.push_back(currentRouter->black_links_[0]);
         if (latency)
-          *latency += currentRouter->blackLinks_[0]->latency();
-        currentRouter = routers_[myCoords[0] * (numChassisPerGroup_ * numBladesPerChassis_) + targetCoords[0]];
+          *latency += currentRouter->black_links_[0]->latency();
+        currentRouter = routers_[myCoords[0] * (num_chassis_per_group_ * num_blades_per_chassis_) + targetCoords[0]];
       }
 
       // go to destination group - the only optical hop
-      route->link_list.push_back(currentRouter->blueLinks_[0]);
+      route->link_list.push_back(currentRouter->blue_links_[0]);
       if (latency)
-        *latency += currentRouter->blueLinks_[0]->latency();
-      currentRouter = routers_[targetCoords[0] * (numChassisPerGroup_ * numBladesPerChassis_) + myCoords[0]];
+        *latency += currentRouter->blue_links_[0]->latency();
+      currentRouter = routers_[targetCoords[0] * (num_chassis_per_group_ * num_blades_per_chassis_) + myCoords[0]];
     }
 
     // same group, but same blade ?
     if (targetRouter->blade_ != currentRouter->blade_) {
-      route->link_list.push_back(currentRouter->greenLinks_[targetCoords[2]]);
+      route->link_list.push_back(currentRouter->green_links_[targetCoords[2]]);
       if (latency)
-        *latency += currentRouter->greenLinks_[targetCoords[2]]->latency();
-      currentRouter = routers_[targetCoords[0] * (numChassisPerGroup_ * numBladesPerChassis_) + targetCoords[2]];
+        *latency += currentRouter->green_links_[targetCoords[2]]->latency();
+      currentRouter = routers_[targetCoords[0] * (num_chassis_per_group_ * num_blades_per_chassis_) + targetCoords[2]];
     }
 
     // same blade, but same chassis ?
     if (targetRouter->chassis_ != currentRouter->chassis_) {
-      route->link_list.push_back(currentRouter->blackLinks_[targetCoords[1]]);
+      route->link_list.push_back(currentRouter->black_links_[targetCoords[1]]);
       if (latency)
-        *latency += currentRouter->blackLinks_[targetCoords[1]]->latency();
+        *latency += currentRouter->black_links_[targetCoords[1]]->latency();
     }
   }
 
-  if (hasLimiter_) { // limiter for receiver
-    std::pair<surf::LinkImpl*, surf::LinkImpl*> info = privateLinks_.at(nodePositionWithLoopback(dst->id()));
+  if (has_limiter_) { // limiter for receiver
+    std::pair<surf::LinkImpl*, surf::LinkImpl*> info = private_links_.at(nodePositionWithLoopback(dst->id()));
     route->link_list.push_back(info.first);
   }
 
   // router->node local link
-  route->link_list.push_back(targetRouter->myNodes_[targetCoords[3] * numLinksperLink_ + numLinksperLink_ - 1]);
+  route->link_list.push_back(targetRouter->my_nodes_[targetCoords[3] * num_links_per_link_ + num_links_per_link_ - 1]);
   if (latency)
-    *latency += targetRouter->myNodes_[targetCoords[3] * numLinksperLink_ + numLinksperLink_ - 1]->latency();
+    *latency += targetRouter->my_nodes_[targetCoords[3] * num_links_per_link_ + num_links_per_link_ - 1]->latency();
 }
 }
 }
index 3da6df4..8012a39 100644 (file)
@@ -65,13 +65,13 @@ void FatTreeZone::getLocalRoute(NetPoint* src, NetPoint* dst, RouteCreationArgs*
     return;
 
   /* Let's find the source and the destination in our internal structure */
-  auto searchedNode = this->computeNodes_.find(src->id());
-  xbt_assert(searchedNode != this->computeNodes_.end(), "Could not find the source %s [%u] in the fat tree",
+  auto searchedNode = this->compute_nodes_.find(src->id());
+  xbt_assert(searchedNode != this->compute_nodes_.end(), "Could not find the source %s [%u] in the fat tree",
              src->getCname(), src->id());
   FatTreeNode* source = searchedNode->second;
 
-  searchedNode = this->computeNodes_.find(dst->id());
-  xbt_assert(searchedNode != this->computeNodes_.end(), "Could not find the destination %s [%u] in the fat tree",
+  searchedNode = this->compute_nodes_.find(dst->id());
+  xbt_assert(searchedNode != this->compute_nodes_.end(), "Could not find the destination %s [%u] in the fat tree",
              dst->getCname(), dst->id());
   FatTreeNode* destination = searchedNode->second;
 
@@ -79,7 +79,7 @@ void FatTreeZone::getLocalRoute(NetPoint* src, NetPoint* dst, RouteCreationArgs*
            dst->getCname(), dst->id());
 
   /* In case destination is the source, and there is a loopback, let's use it instead of going up to a switch */
-  if (source->id == destination->id && this->hasLoopback_) {
+  if (source->id == destination->id && this->has_loopback_) {
     into->link_list.push_back(source->loopback);
     if (latency)
       *latency += source->loopback->latency();
@@ -97,14 +97,14 @@ void FatTreeZone::getLocalRoute(NetPoint* src, NetPoint* dst, RouteCreationArgs*
 
     int k = this->upperLevelNodesNumber_[currentNode->level];
     d     = d % k;
-    into->link_list.push_back(currentNode->parents[d]->upLink);
+    into->link_list.push_back(currentNode->parents[d]->up_link_);
 
     if (latency)
-      *latency += currentNode->parents[d]->upLink->latency();
+      *latency += currentNode->parents[d]->up_link_->latency();
 
-    if (this->hasLimiter_)
-      into->link_list.push_back(currentNode->limiterLink);
-    currentNode = currentNode->parents[d]->upNode;
+    if (this->has_limiter_)
+      into->link_list.push_back(currentNode->limiter_link_);
+    currentNode = currentNode->parents[d]->up_node_;
   }
 
   XBT_DEBUG("%d(%u,%u) is in the sub tree of %d(%u,%u).", destination->id, destination->level, destination->position,
@@ -114,12 +114,12 @@ void FatTreeZone::getLocalRoute(NetPoint* src, NetPoint* dst, RouteCreationArgs*
   while (currentNode != destination) {
     for (unsigned int i = 0; i < currentNode->children.size(); i++) {
       if (i % this->lowerLevelNodesNumber_[currentNode->level - 1] == destination->label[currentNode->level - 1]) {
-        into->link_list.push_back(currentNode->children[i]->downLink);
+        into->link_list.push_back(currentNode->children[i]->down_link_);
         if (latency)
-          *latency += currentNode->children[i]->downLink->latency();
-        currentNode = currentNode->children[i]->downNode;
-        if (this->hasLimiter_)
-          into->link_list.push_back(currentNode->limiterLink);
+          *latency += currentNode->children[i]->down_link_->latency();
+        currentNode = currentNode->children[i]->down_node_;
+        if (this->has_limiter_)
+          into->link_list.push_back(currentNode->limiter_link_);
         XBT_DEBUG("%d(%u,%u) is accessible through %d(%u,%u)", destination->id, destination->level,
                   destination->position, currentNode->id, currentNode->level, currentNode->position);
       }
@@ -170,7 +170,7 @@ void FatTreeZone::seal()
     std::stringstream msgBuffer;
     msgBuffer << "Links are : ";
     for (unsigned int i = 0; i < this->links_.size(); i++) {
-      msgBuffer << "(" << this->links_[i]->upNode->id << "," << this->links_[i]->downNode->id << ") ";
+      msgBuffer << "(" << this->links_[i]->up_node_->id << "," << this->links_[i]->down_node_->id << ") ";
     }
     XBT_DEBUG("%s", msgBuffer.str().c_str());
   }
@@ -342,7 +342,7 @@ void FatTreeZone::addProcessingNode(int id)
   newNode = new FatTreeNode(this->cluster_, id, 0, position++);
   newNode->parents.resize(this->upperLevelNodesNumber_[0] * this->lowerLevelPortsNumber_[0]);
   newNode->label.resize(this->levels_);
-  this->computeNodes_.insert(make_pair(id, newNode));
+  this->compute_nodes_.insert(make_pair(id, newNode));
   this->nodes_.push_back(newNode);
 }
 
@@ -434,7 +434,7 @@ void FatTreeZone::generateDotFile(const std::string& filename) const
   }
 
   for (unsigned int i = 0; i < this->links_.size(); i++) {
-    file << this->links_[i]->downNode->id << " -- " << this->links_[i]->upNode->id << ";\n";
+    file << this->links_[i]->down_node_->id << " -- " << this->links_[i]->up_node_->id << ";\n";
   }
   file << "}";
   file.close();
@@ -450,7 +450,7 @@ FatTreeNode::FatTreeNode(ClusterCreationArgs* cluster, int id, int level, int po
     linkTemplate.policy    = SURF_LINK_SHARED;
     linkTemplate.id        = "limiter_"+std::to_string(id);
     sg_platf_new_link(&linkTemplate);
-    this->limiterLink = surf::LinkImpl::byName(linkTemplate.id);
+    this->limiter_link_ = surf::LinkImpl::byName(linkTemplate.id);
   }
   if (cluster->loopback_bw || cluster->loopback_lat) {
     linkTemplate.bandwidth = cluster->loopback_bw;
@@ -463,7 +463,7 @@ FatTreeNode::FatTreeNode(ClusterCreationArgs* cluster, int id, int level, int po
 }
 
 FatTreeLink::FatTreeLink(ClusterCreationArgs* cluster, FatTreeNode* downNode, FatTreeNode* upNode)
-    : upNode(upNode), downNode(downNode)
+    : up_node_(upNode), down_node_(downNode)
 {
   static int uniqueId = 0;
   LinkCreationArgs linkTemplate;
@@ -476,12 +476,12 @@ FatTreeLink::FatTreeLink(ClusterCreationArgs* cluster, FatTreeNode* downNode, Fa
 
   if (cluster->sharing_policy == SURF_LINK_SPLITDUPLEX) {
     std::string tmpID = std::string(linkTemplate.id) + "_UP";
-    this->upLink      = surf::LinkImpl::byName(tmpID); // check link?
+    this->up_link_    = surf::LinkImpl::byName(tmpID); // check link?
     tmpID          = std::string(linkTemplate.id) + "_DOWN";
-    this->downLink    = surf::LinkImpl::byName(tmpID); // check link ?
+    this->down_link_  = surf::LinkImpl::byName(tmpID); // check link ?
   } else {
-    this->upLink   = surf::LinkImpl::byName(linkTemplate.id);
-    this->downLink = this->upLink;
+    this->up_link_   = surf::LinkImpl::byName(linkTemplate.id);
+    this->down_link_ = this->up_link_;
   }
   uniqueId++;
 }
index 4a607d8..4446fdb 100644 (file)
@@ -70,7 +70,7 @@ void TorusZone::create_links_for_node(ClusterCreationArgs* cluster, int id, int
      * Note that position rankId*(xbt_dynar_length(dimensions)+has_loopback?+has_limiter?)
      * holds the link "rankId->rankId"
      */
-    privateLinks_.insert({position + j, {linkUp, linkDown}});
+    private_links_.insert({position + j, {linkUp, linkDown}});
     dim_product *= current_dimension;
   }
   rank++;
@@ -89,7 +89,7 @@ void TorusZone::parse_specific_arguments(ClusterCreationArgs* cluster)
     for (auto const& group : dimensions)
       dimensions_.push_back(surf_parse_get_int(group));
 
-    linkCountPerNode_ = dimensions_.size();
+    num_links_per_node_ = dimensions_.size();
   }
 }
 
@@ -101,8 +101,8 @@ void TorusZone::getLocalRoute(NetPoint* src, NetPoint* dst, RouteCreationArgs* r
   if (dst->isRouter() || src->isRouter())
     return;
 
-  if (src->id() == dst->id() && hasLoopback_) {
-    std::pair<surf::LinkImpl*, surf::LinkImpl*> info = privateLinks_.at(src->id() * linkCountPerNode_);
+  if (src->id() == dst->id() && has_loopback_) {
+    std::pair<surf::LinkImpl*, surf::LinkImpl*> info = private_links_.at(src->id() * num_links_per_node_);
 
     route->link_list.push_back(info.first);
     if (lat)
@@ -151,8 +151,8 @@ void TorusZone::getLocalRoute(NetPoint* src, NetPoint* dst, RouteCreationArgs* r
             next_node = (current_node + dim_product);
 
           // HERE: We use *CURRENT* node for calculation (as opposed to next_node)
-          nodeOffset = current_node * (linkCountPerNode_);
-          linkOffset = nodeOffset + (hasLoopback_ ? 1 : 0) + (hasLimiter_ ? 1 : 0) + j;
+          nodeOffset = current_node * (num_links_per_node_);
+          linkOffset = nodeOffset + (has_loopback_ ? 1 : 0) + (has_limiter_ ? 1 : 0) + j;
           use_lnk_up = true;
           assert(linkOffset >= 0);
         } else { // Route to the left
@@ -162,8 +162,8 @@ void TorusZone::getLocalRoute(NetPoint* src, NetPoint* dst, RouteCreationArgs* r
             next_node = (current_node - dim_product);
 
           // HERE: We use *next* node for calculation (as opposed to current_node!)
-          nodeOffset = next_node * (linkCountPerNode_);
-          linkOffset = nodeOffset + j + (hasLoopback_ ? 1 : 0) + (hasLimiter_ ? 1 : 0);
+          nodeOffset = next_node * (num_links_per_node_);
+          linkOffset = nodeOffset + j + (has_loopback_ ? 1 : 0) + (has_limiter_ ? 1 : 0);
           use_lnk_up = false;
 
           assert(linkOffset >= 0);
@@ -179,12 +179,12 @@ void TorusZone::getLocalRoute(NetPoint* src, NetPoint* dst, RouteCreationArgs* r
 
     std::pair<surf::LinkImpl*, surf::LinkImpl*> info;
 
-    if (hasLimiter_) { // limiter for sender
-      info = privateLinks_.at(nodeOffset + (hasLoopback_ ? 1 : 0));
+    if (has_limiter_) { // limiter for sender
+      info = private_links_.at(nodeOffset + (has_loopback_ ? 1 : 0));
       route->link_list.push_back(info.first);
     }
 
-    info = privateLinks_.at(linkOffset);
+    info = private_links_.at(linkOffset);
 
     if (use_lnk_up == false) {
       route->link_list.push_back(info.second);
index 18b5553..4c9a331 100644 (file)
@@ -72,7 +72,7 @@ void VivaldiZone::setPeerLink(NetPoint* netpoint, double bw_in, double bw_out, s
   std::string link_down    = "link_" + netpoint->getName() + "_DOWN";
   surf::LinkImpl* linkUp   = surf_network_model->createLink(link_up, bw_out, 0, SURF_LINK_SHARED);
   surf::LinkImpl* linkDown = surf_network_model->createLink(link_down, bw_in, 0, SURF_LINK_SHARED);
-  privateLinks_.insert({netpoint->id(), {linkUp, linkDown}});
+  private_links_.insert({netpoint->id(), {linkUp, linkDown}});
 }
 
 void VivaldiZone::getLocalRoute(NetPoint* src, NetPoint* dst, RouteCreationArgs* route, double* lat)
@@ -87,8 +87,8 @@ void VivaldiZone::getLocalRoute(NetPoint* src, NetPoint* dst, RouteCreationArgs*
   }
 
   /* Retrieve the private links */
-  auto src_link = privateLinks_.find(src->id());
-  if (src_link != privateLinks_.end()) {
+  auto src_link = private_links_.find(src->id());
+  if (src_link != private_links_.end()) {
     std::pair<surf::LinkImpl*, surf::LinkImpl*> info = src_link->second;
     if (info.first) {
       route->link_list.push_back(info.first);
@@ -99,8 +99,8 @@ void VivaldiZone::getLocalRoute(NetPoint* src, NetPoint* dst, RouteCreationArgs*
     XBT_DEBUG("Source of private link (%u) doesn't exist", src->id());
   }
 
-  auto dst_link = privateLinks_.find(dst->id());
-  if (dst_link != privateLinks_.end()) {
+  auto dst_link = private_links_.find(dst->id());
+  if (dst_link != private_links_.end()) {
     std::pair<surf::LinkImpl*, surf::LinkImpl*> info = dst_link->second;
     if (info.second) {
       route->link_list.push_back(info.second);
index d0add12..56ad247 100644 (file)
@@ -32,7 +32,7 @@ simgrid::xbt::signal<void(StorageAction*, kernel::resource::Action::State, kerne
 
 StorageModel::StorageModel() : Model()
 {
-  maxminSystem_ = new simgrid::kernel::lmm::System(true /* selective update */);
+  maxmin_system_ = new simgrid::kernel::lmm::System(true /* selective update */);
 }
 
 StorageModel::~StorageModel()
index 3e41647..cdad05f 100644 (file)
@@ -51,10 +51,10 @@ CpuCas01Model::CpuCas01Model() : simgrid::surf::CpuModel()
     xbt_die("Unsupported optimization (%s) for this model", optim.c_str());
   }
 
-  maxminSystem_ = new simgrid::kernel::lmm::System(select);
+  maxmin_system_ = new simgrid::kernel::lmm::System(select);
 
   if (getUpdateMechanism() == UM_LAZY)
-    maxminSystem_->modified_set_ = new kernel::resource::ActionLmmList();
+    maxmin_system_->modified_set_ = new kernel::resource::ActionLmmList();
 }
 
 CpuCas01Model::~CpuCas01Model()
@@ -176,7 +176,7 @@ CpuAction *CpuCas01::sleep(double duration)
   if (duration < 0) { // NO_MAX_DURATION
     /* Move to the *end* of the corresponding action set. This convention is used to speed up update_resource_state */
     simgrid::xbt::intrusive_erase(*action->getStateSet(), *action);
-    action->stateSet_ = &static_cast<CpuCas01Model*>(model())->p_cpuRunningActionSetThatDoesNotNeedBeingChecked;
+    action->state_set_ = &static_cast<CpuCas01Model*>(model())->p_cpuRunningActionSetThatDoesNotNeedBeingChecked;
     action->getStateSet()->push_back(*action);
   }
 
index 10e8039..10d6cb6 100644 (file)
@@ -593,7 +593,7 @@ CpuAction *CpuTi::sleep(double duration)
   if (duration == NO_MAX_DURATION) {
     /* Move to the *end* of the corresponding action set. This convention is used to speed up update_resource_state */
     simgrid::xbt::intrusive_erase(*action->getStateSet(), *action);
-    action->stateSet_ = &static_cast<CpuTiModel*>(model())->runningActionSetThatDoesNotNeedBeingChecked_;
+    action->state_set_ = &static_cast<CpuTiModel*>(model())->runningActionSetThatDoesNotNeedBeingChecked_;
     action->getStateSet()->push_back(*action);
   }
 
index 44d21c9..b84a7a0 100644 (file)
@@ -151,22 +151,22 @@ NetworkCm02Model::NetworkCm02Model()
     xbt_die("Unsupported optimization (%s) for this model. Accepted: Full, Lazy.", optim.c_str());
   }
 
-  maxminSystem_ = new simgrid::kernel::lmm::System(select);
+  maxmin_system_ = new simgrid::kernel::lmm::System(select);
   loopback_     = NetworkCm02Model::createLink("__loopback__", 498000000, 0.000015, SURF_LINK_FATPIPE);
 
   if (getUpdateMechanism() == UM_LAZY)
-    maxminSystem_->modified_set_ = new kernel::resource::ActionLmmList();
+    maxmin_system_->modified_set_ = new kernel::resource::ActionLmmList();
 }
 
 NetworkCm02Model::NetworkCm02Model(void (*specificSolveFun)(lmm_system_t self)) : NetworkCm02Model()
 {
-  maxminSystem_->solve_fun = specificSolveFun;
+  maxmin_system_->solve_fun = specificSolveFun;
 }
 
 LinkImpl* NetworkCm02Model::createLink(const std::string& name, double bandwidth, double latency,
                                        e_surf_link_sharing_policy_t policy)
 {
-  return new NetworkCm02Link(this, name, bandwidth, latency, policy, maxminSystem_);
+  return new NetworkCm02Link(this, name, bandwidth, latency, policy, maxmin_system_);
 }
 
 void NetworkCm02Model::updateActionsStateLazy(double now, double /*delta*/)
@@ -190,7 +190,7 @@ void NetworkCm02Model::updateActionsStateLazy(double now, double /*delta*/)
     // if I am wearing a latency hat
     if (action->getType() == kernel::resource::Action::Type::LATENCY) {
       XBT_DEBUG("Latency paid for action %p. Activating", action);
-      maxminSystem_->update_variable_weight(action->getVariable(), action->weight_);
+      maxmin_system_->update_variable_weight(action->getVariable(), action->weight_);
       action->heapRemove(getActionHeap());
       action->refreshLastUpdate();
 
@@ -224,7 +224,7 @@ void NetworkCm02Model::updateActionsStateFull(double now, double delta)
         action.latency_ = 0.0;
       }
       if (action.latency_ <= 0.0 && not action.isSuspended())
-        maxminSystem_->update_variable_weight(action.getVariable(), action.weight_);
+        maxmin_system_->update_variable_weight(action.getVariable(), action.weight_);
     }
     if (TRACE_is_enabled()) {
       int n = action.getVariable()->get_number_of_constraint();
@@ -306,7 +306,7 @@ kernel::resource::Action* NetworkCm02Model::communicate(s4u::Host* src, s4u::Hos
   constraints_per_variable += back_route.size();
 
   if (action->latency_ > 0) {
-    action->setVariable(maxminSystem_->variable_new(action, 0.0, -1.0, constraints_per_variable));
+    action->setVariable(maxmin_system_->variable_new(action, 0.0, -1.0, constraints_per_variable));
     if (getUpdateMechanism() == UM_LAZY) {
       // add to the heap the event when the latency is payed
       XBT_DEBUG("Added action (%p) one latency event at date %f", action, action->latency_ + action->getLastUpdate());
@@ -315,25 +315,25 @@ kernel::resource::Action* NetworkCm02Model::communicate(s4u::Host* src, s4u::Hos
                                        : kernel::resource::Action::Type::LATENCY);
     }
   } else
-    action->setVariable(maxminSystem_->variable_new(action, 1.0, -1.0, constraints_per_variable));
+    action->setVariable(maxmin_system_->variable_new(action, 1.0, -1.0, constraints_per_variable));
 
   if (action->rate_ < 0) {
-    maxminSystem_->update_variable_bound(action->getVariable(),
-                                         (action->latCurrent_ > 0) ? sg_tcp_gamma / (2.0 * action->latCurrent_) : -1.0);
+    maxmin_system_->update_variable_bound(
+        action->getVariable(), (action->latCurrent_ > 0) ? sg_tcp_gamma / (2.0 * action->latCurrent_) : -1.0);
   } else {
-    maxminSystem_->update_variable_bound(action->getVariable(),
-                                         (action->latCurrent_ > 0)
-                                             ? std::min(action->rate_, sg_tcp_gamma / (2.0 * action->latCurrent_))
-                                             : action->rate_);
+    maxmin_system_->update_variable_bound(action->getVariable(),
+                                          (action->latCurrent_ > 0)
+                                              ? std::min(action->rate_, sg_tcp_gamma / (2.0 * action->latCurrent_))
+                                              : action->rate_);
   }
 
   for (auto const& link : route)
-    maxminSystem_->expand(link->constraint(), action->getVariable(), 1.0);
+    maxmin_system_->expand(link->constraint(), action->getVariable(), 1.0);
 
   if (not back_route.empty()) { //  sg_network_crosstraffic was activated
     XBT_DEBUG("Crosstraffic active adding backward flow using 5%%");
     for (auto const& link : back_route)
-      maxminSystem_->expand(link->constraint(), action->getVariable(), .05);
+      maxmin_system_->expand(link->constraint(), action->getVariable(), .05);
 
     // Change concurrency_share here, if you want that cross-traffic is included in the SURF concurrency
     // (You would also have to change simgrid::kernel::lmm::Element::get_concurrency())
index 71c87a1..0b3016a 100644 (file)
@@ -79,8 +79,8 @@ NetworkConstantAction::NetworkConstantAction(NetworkConstantModel* model_, doubl
 {
   latency_ = latency;
   if (latency_ <= 0.0) {
-    stateSet_ = model_->getDoneActionSet();
-    stateSet_->push_back(*this);
+    state_set_ = model_->getDoneActionSet();
+    state_set_->push_back(*this);
   }
 };
 
index edc4323..c37b9f5 100644 (file)
@@ -174,7 +174,7 @@ void NetworkIBModel::computeIBfactors(IBNode* root)
     if (not double_equals(penalized_bw, rate_before_update, sg_surf_precision)) {
       XBT_DEBUG("%d->%d action %p penalty updated : bw now %f, before %f , initial rate %f", root->id,
                 (*it)->destination->id, (*it)->action, penalized_bw, (*it)->action->getBound(), (*it)->init_rate);
-      maxminSystem_->update_variable_bound((*it)->action->getVariable(), penalized_bw);
+      maxmin_system_->update_variable_bound((*it)->action->getVariable(), penalized_bw);
     } else {
       XBT_DEBUG("%d->%d action %p penalty not updated : bw %f, initial rate %f", root->id, (*it)->destination->id,
                 (*it)->action, penalized_bw, (*it)->init_rate);
index 0402324..16f288d 100644 (file)
@@ -355,7 +355,7 @@ int NetworkNS3Action::unref()
   refcount_--;
   if (not refcount_) {
     if (stateSetHook_.is_linked())
-      simgrid::xbt::intrusive_erase(*stateSet_, *this);
+      simgrid::xbt::intrusive_erase(*state_set_, *this);
     XBT_DEBUG ("Removing action %p", this);
     delete this;
     return 1;
index 38ee2c6..00be086 100644 (file)
@@ -34,10 +34,10 @@ namespace simgrid {
 namespace surf {
 
 HostL07Model::HostL07Model() : HostModel() {
-  maxminSystem_            = new simgrid::kernel::lmm::System(true /* selective update */);
-  maxminSystem_->solve_fun = &simgrid::kernel::lmm::bottleneck_solve;
-  surf_network_model = new NetworkL07Model(this,maxminSystem_);
-  surf_cpu_model_pm = new CpuL07Model(this,maxminSystem_);
+  maxmin_system_            = new simgrid::kernel::lmm::System(true /* selective update */);
+  maxmin_system_->solve_fun = &simgrid::kernel::lmm::bottleneck_solve;
+  surf_network_model        = new NetworkL07Model(this, maxmin_system_);
+  surf_cpu_model_pm         = new CpuL07Model(this, maxmin_system_);
 }
 
 HostL07Model::~HostL07Model()
@@ -48,23 +48,23 @@ HostL07Model::~HostL07Model()
 
 CpuL07Model::CpuL07Model(HostL07Model* hmodel, lmm_system_t sys) : CpuModel(), hostModel_(hmodel)
 {
-  maxminSystem_ = sys;
+  maxmin_system_ = sys;
 }
 
 CpuL07Model::~CpuL07Model()
 {
-  maxminSystem_ = nullptr;
+  maxmin_system_ = nullptr;
 }
 
 NetworkL07Model::NetworkL07Model(HostL07Model* hmodel, lmm_system_t sys) : NetworkModel(), hostModel_(hmodel)
 {
-  maxminSystem_ = sys;
+  maxmin_system_ = sys;
   loopback_     = NetworkL07Model::createLink("__loopback__", 498000000, 0.000015, SURF_LINK_FATPIPE);
 }
 
 NetworkL07Model::~NetworkL07Model()
 {
-  maxminSystem_ = nullptr;
+  maxmin_system_ = nullptr;
 }
 
 double HostL07Model::nextOccuringEvent(double now)
@@ -95,7 +95,7 @@ void HostL07Model::updateActionsState(double /*now*/, double delta)
       }
       if ((action.latency_ <= 0.0) && (action.isSuspended() == 0)) {
         action.updateBound();
-        maxminSystem_->update_variable_weight(action.getVariable(), 1.0);
+        maxmin_system_->update_variable_weight(action.getVariable(), 1.0);
       }
     }
     XBT_DEBUG("Action (%p) : remains (%g) updated by %g.", &action, action.getRemains(),
@@ -412,7 +412,7 @@ int L07Action::unref()
   refcount_--;
   if (not refcount_) {
     if (stateSetHook_.is_linked())
-      simgrid::xbt::intrusive_erase(*stateSet_, *this);
+      simgrid::xbt::intrusive_erase(*state_set_, *this);
     if (getVariable())
       getModel()->getMaxminSystem()->variable_free(getVariable());
     delete this;
index fb7716b..d6401ba 100644 (file)
@@ -171,13 +171,13 @@ void sg_platf_new_cluster(simgrid::kernel::routing::ClusterCreationArgs* cluster
   current_as->parse_specific_arguments(cluster);
 
   if(cluster->loopback_bw > 0 || cluster->loopback_lat > 0){
-    current_as->linkCountPerNode_++;
-    current_as->hasLoopback_ = true;
+    current_as->num_links_per_node_++;
+    current_as->has_loopback_ = true;
   }
 
   if(cluster->limiter_link > 0){
-    current_as->linkCountPerNode_++;
-    current_as->hasLimiter_ = true;
+    current_as->num_links_per_node_++;
+    current_as->has_limiter_ = true;
   }
 
   for (int const& i : *cluster->radicals) {
@@ -227,7 +227,7 @@ void sg_platf_new_cluster(simgrid::kernel::routing::ClusterCreationArgs* cluster
       linkDown = simgrid::surf::LinkImpl::byName(tmp_link);
 
       auto* as_cluster = static_cast<ClusterZone*>(current_as);
-      as_cluster->privateLinks_.insert({as_cluster->nodePosition(rankId), {linkUp, linkDown}});
+      as_cluster->private_links_.insert({as_cluster->nodePosition(rankId), {linkUp, linkDown}});
     }
 
     //add a limiter link (shared link to account for maximal bandwidth of the node)
@@ -245,7 +245,7 @@ void sg_platf_new_cluster(simgrid::kernel::routing::ClusterCreationArgs* cluster
       sg_platf_new_link(&link);
       linkDown = simgrid::surf::LinkImpl::byName(tmp_link);
       linkUp   = linkDown;
-      current_as->privateLinks_.insert({current_as->nodePositionWithLoopback(rankId), {linkUp, linkDown}});
+      current_as->private_links_.insert({current_as->nodePositionWithLoopback(rankId), {linkUp, linkDown}});
     }
 
     //call the cluster function that adds the others links
@@ -654,11 +654,11 @@ void sg_platf_new_hostlink(simgrid::kernel::routing::HostLinkCreationArgs* hostl
 
   auto* as_cluster = static_cast<simgrid::kernel::routing::ClusterZone*>(current_routing);
 
-  if (as_cluster->privateLinks_.find(netpoint->id()) != as_cluster->privateLinks_.end())
+  if (as_cluster->private_links_.find(netpoint->id()) != as_cluster->private_links_.end())
     surf_parse_error(std::string("Host_link for '") + hostlink->id.c_str() + "' is already defined!");
 
   XBT_DEBUG("Push Host_link for host '%s' to position %u", netpoint->getCname(), netpoint->id());
-  as_cluster->privateLinks_.insert({netpoint->id(), {linkUp, linkDown}});
+  as_cluster->private_links_.insert({netpoint->id(), {linkUp, linkDown}});
 }
 
 void sg_platf_new_trace(simgrid::kernel::routing::TraceCreationArgs* trace)
index 73e9415..05cde18 100644 (file)
@@ -61,7 +61,7 @@ StorageImpl* StorageN11Model::createStorage(std::string id, std::string type_id,
                                            "property Bwrite, storage", type_id.c_str());
 
   StorageImpl* storage =
-      new StorageN11(this, id, maxminSystem_, Bread, Bwrite, type_id, content_name, storage_type->size, attach);
+      new StorageN11(this, id, maxmin_system_, Bread, Bwrite, type_id, content_name, storage_type->size, attach);
   storageCreatedCallbacks(storage);
 
   XBT_DEBUG("SURF storage create resource\n\t\tid '%s'\n\t\ttype '%s'\n\t\tBread '%f'\n", id.c_str(), type_id.c_str(),
@@ -144,7 +144,7 @@ int StorageN11Action::unref()
   refcount_--;
   if (not refcount_) {
     if (stateSetHook_.is_linked())
-      simgrid::xbt::intrusive_erase(*stateSet_, *this);
+      simgrid::xbt::intrusive_erase(*state_set_, *this);
     if (getVariable())
       getModel()->getMaxminSystem()->variable_free(getVariable());
     xbt_free(getCategory());