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 */
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());
+ src->get_cname(), src->id());
FatTreeNode* source = searchedNode->second;
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());
+ dst->get_cname(), dst->id());
FatTreeNode* destination = searchedNode->second;
- XBT_VERB("Get route and latency from '%s' [%u] to '%s' [%u] in a fat tree", src->getCname(), src->id(),
- dst->getCname(), dst->id());
+ XBT_VERB("Get route and latency from '%s' [%u] to '%s' [%u] in a fat tree", src->get_cname(), src->id(),
+ dst->get_cname(), 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->has_loopback_) {
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++;
}
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);
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;
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);
}
}
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++;