Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
move all network models to the kernel::resource namespace
[simgrid.git] / src / kernel / routing / FatTreeZone.cpp
index e81439a..f2fa5dc 100644 (file)
@@ -58,10 +58,10 @@ bool FatTreeZone::isInSubTree(FatTreeNode* root, FatTreeNode* node)
   return true;
 }
 
-void FatTreeZone::getLocalRoute(NetPoint* src, NetPoint* dst, RouteCreationArgs* into, double* latency)
+void FatTreeZone::get_local_route(NetPoint* src, NetPoint* dst, RouteCreationArgs* into, double* latency)
 {
 
-  if (dst->isRouter() || src->isRouter())
+  if (dst->is_router() || src->is_router())
     return;
 
   /* Let's find the source and the destination in our internal structure */
@@ -190,8 +190,8 @@ int FatTreeZone::connectNodeToParents(FatTreeNode* node)
                 node->id, node->level, node->position, (*currentParentNode)->id, (*currentParentNode)->level,
                 (*currentParentNode)->position, this->num_port_lower_level_[level]);
       for (unsigned int j = 0; j < this->num_port_lower_level_[level]; j++) {
-        this->addLink(*currentParentNode, node->label[level] + j * this->num_children_per_node_[level], node,
-                      (*currentParentNode)->label[level] + j * this->num_parents_per_node_[level]);
+        this->add_link(*currentParentNode, node->label[level] + j * this->num_children_per_node_[level], node,
+                       (*currentParentNode)->label[level] + j * this->num_parents_per_node_[level]);
       }
       connectionsNumber++;
     }
@@ -346,7 +346,7 @@ void FatTreeZone::add_processing_node(int id)
   this->nodes_.push_back(newNode);
 }
 
-void FatTreeZone::addLink(FatTreeNode* parent, unsigned int parentPort, FatTreeNode* child, unsigned int childPort)
+void FatTreeZone::add_link(FatTreeNode* parent, unsigned int parentPort, FatTreeNode* child, unsigned int childPort)
 {
   FatTreeLink* newLink;
   newLink = new FatTreeLink(this->cluster_, child, parent);
@@ -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->limiter_link_ = surf::LinkImpl::byName(linkTemplate.id);
+    this->limiter_link_ = resource::LinkImpl::byName(linkTemplate.id);
   }
   if (cluster->loopback_bw || cluster->loopback_lat) {
     linkTemplate.bandwidth = cluster->loopback_bw;
@@ -458,7 +458,7 @@ FatTreeNode::FatTreeNode(ClusterCreationArgs* cluster, int id, int level, int po
     linkTemplate.policy    = SURF_LINK_FATPIPE;
     linkTemplate.id        = "loopback_"+ std::to_string(id);
     sg_platf_new_link(&linkTemplate);
-    this->loopback = surf::LinkImpl::byName(linkTemplate.id);
+    this->loopback = resource::LinkImpl::byName(linkTemplate.id);
   }
 }
 
@@ -476,11 +476,11 @@ FatTreeLink::FatTreeLink(ClusterCreationArgs* cluster, FatTreeNode* downNode, Fa
 
   if (cluster->sharing_policy == SURF_LINK_SPLITDUPLEX) {
     std::string tmpID = std::string(linkTemplate.id) + "_UP";
-    this->up_link_    = surf::LinkImpl::byName(tmpID); // check link?
+    this->up_link_    = resource::LinkImpl::byName(tmpID); // check link?
     tmpID          = std::string(linkTemplate.id) + "_DOWN";
-    this->down_link_  = surf::LinkImpl::byName(tmpID); // check link ?
+    this->down_link_  = resource::LinkImpl::byName(tmpID); // check link ?
   } else {
-    this->up_link_   = surf::LinkImpl::byName(linkTemplate.id);
+    this->up_link_   = resource::LinkImpl::byName(linkTemplate.id);
     this->down_link_ = this->up_link_;
   }
   uniqueId++;