{
}
-void AsCluster::getRouteAndLatency(NetCard *src, NetCard *dst, sg_platf_route_cbarg_t route, double *lat)
+void AsCluster::getLocalRoute(NetCard* src, NetCard* dst, sg_platf_route_cbarg_t route, double* lat)
{
- s_surf_parsing_link_up_down_t info;
- XBT_VERB("cluster_get_route_and_latency from '%s'[%d] to '%s'[%d]", src->name().c_str(), src->id(),
- dst->name().c_str(), dst->id());
+ XBT_VERB("cluster getLocalRoute from '%s'[%d] to '%s'[%d]", src->name().c_str(), src->id(), dst->name().c_str(),
+ dst->id());
xbt_assert(!privateLinks_.empty(),
"Cluster routing: no links attached to the source node - did you use host_link tag?");
if (! src->isRouter()) { // No specific link for router
if((src->id() == dst->id()) && hasLoopback_ ){
- info = privateLinks_.at(src->id() * linkCountPerNode_);
+ s_surf_parsing_link_up_down_t info = privateLinks_.at(src->id() * linkCountPerNode_);
route->link_list->push_back(info.linkUp);
if (lat)
*lat += info.linkUp->latency();
}
if (hasLimiter_){ // limiter for sender
- info = privateLinks_.at(src->id() * linkCountPerNode_ + (hasLoopback_?1:0));
+ s_surf_parsing_link_up_down_t info = privateLinks_.at(src->id() * linkCountPerNode_ + (hasLoopback_ ? 1 : 0));
route->link_list->push_back(info.linkUp);
}
- info = privateLinks_.at(src->id() * linkCountPerNode_ + (hasLoopback_?1:0) + (hasLimiter_?1:0));
+ s_surf_parsing_link_up_down_t info =
+ privateLinks_.at(src->id() * linkCountPerNode_ + (hasLoopback_ ? 1 : 0) + (hasLimiter_ ? 1 : 0));
if (info.linkUp) { // link up
route->link_list->push_back(info.linkUp);
if (lat)
}
if (! dst->isRouter()) { // No specific link for router
- info = privateLinks_.at(dst->id() * linkCountPerNode_ + hasLoopback_ + hasLimiter_);
+ s_surf_parsing_link_up_down_t info = privateLinks_.at(dst->id() * linkCountPerNode_ + hasLoopback_ + hasLimiter_);
if (info.linkDown) { // link down
route->link_list->push_back(info.linkDown);
public:
explicit AsCluster(As* father, const char* name);
- void getRouteAndLatency(NetCard *src, NetCard *dst, sg_platf_route_cbarg_t into, double *latency) override;
+ void getLocalRoute(NetCard* src, NetCard* dst, sg_platf_route_cbarg_t into, double* latency) override;
void getGraph(xbt_graph_t graph, xbt_dict_t nodes, xbt_dict_t edges) override;
virtual void create_links_for_node(sg_platf_cluster_cbarg_t cluster, int id, int rank, int position);
}
}
-void AsClusterDragonfly::getRouteAndLatency(NetCard * src, NetCard * dst, sg_platf_route_cbarg_t route, double *latency) {
+void AsClusterDragonfly::getLocalRoute(NetCard* src, NetCard* dst, sg_platf_route_cbarg_t route, double* latency)
+{
//Minimal routing version.
// TODO : non-minimal random one, and adaptive ?
if (dst->isRouter() || src->isRouter())
return;
- XBT_VERB("dragonfly_get_route_and_latency from '%s'[%d] to '%s'[%d]", src->name().c_str(), src->id(),
- dst->name().c_str(), dst->id());
+ XBT_VERB("dragonfly getLocalRout from '%s'[%d] to '%s'[%d]", src->name().c_str(), src->id(), dst->name().c_str(),
+ dst->id());
if ((src->id() == dst->id()) && hasLoopback_) {
s_surf_parsing_link_up_down_t info = privateLinks_.at(src->id() * linkCountPerNode_);
//node->router local link
route->link_list->push_back(myRouter->myNodes_[myCoords[3]*numLinksperLink_]);
- if(latency) {
+ if (latency)
*latency += myRouter->myNodes_[myCoords[3] * numLinksperLink_]->latency();
- }
if (hasLimiter_) { // limiter for sender
s_surf_parsing_link_up_down_t info = privateLinks_.at(src->id() * linkCountPerNode_ + hasLoopback_);
if(currentRouter->blade_!=targetCoords[0]){
//go to the nth router in our chassis
route->link_list->push_back(currentRouter->greenLinks_[targetCoords[0]]);
- if(latency) {
+ if (latency)
*latency += currentRouter->greenLinks_[targetCoords[0]]->latency();
- }
currentRouter=routers_[myCoords[0]*(numChassisPerGroup_*numBladesPerChassis_)+myCoords[1] * numBladesPerChassis_+targetCoords[0]];
}
if(currentRouter->chassis_!=0){
//go to the first chassis of our group
route->link_list->push_back(currentRouter->blackLinks_[0]);
- if(latency) {
+ if (latency)
*latency += currentRouter->blackLinks_[0]->latency();
- }
currentRouter=routers_[myCoords[0]*(numChassisPerGroup_*numBladesPerChassis_)+targetCoords[0]];
}
//go to destination group - the only optical hop
route->link_list->push_back(currentRouter->blueLinks_[0]);
- if(latency) {
+ if (latency)
*latency += currentRouter->blueLinks_[0]->latency();
- }
currentRouter=routers_[targetCoords[0]*(numChassisPerGroup_*numBladesPerChassis_)+myCoords[0]];
}
//same group, but same blade ?
if(targetRouter->blade_ != currentRouter->blade_){
route->link_list->push_back(currentRouter->greenLinks_[targetCoords[2]]);
- if(latency) {
+ if (latency)
*latency += currentRouter->greenLinks_[targetCoords[2]]->latency();
- }
currentRouter=routers_[targetCoords[0]*(numChassisPerGroup_*numBladesPerChassis_)+targetCoords[2]];
}
//same blade, but same chassis ?
if(targetRouter->chassis_ != currentRouter->chassis_){
route->link_list->push_back(currentRouter->blackLinks_[targetCoords[1]]);
- if(latency) {
+ if (latency)
*latency += currentRouter->blackLinks_[targetCoords[1]]->latency();
- }
currentRouter=routers_[targetCoords[0]*(numChassisPerGroup_*numBladesPerChassis_)+targetCoords[1]*numBladesPerChassis_+targetCoords[2]];
}
}
//router->node local link
route->link_list->push_back(targetRouter->myNodes_[targetCoords[3]*numLinksperLink_+numLinksperLink_-1]);
- if(latency) {
+ if (latency)
*latency += targetRouter->myNodes_[targetCoords[3] * numLinksperLink_ + numLinksperLink_ - 1]->latency();
- }
xbt_free(myCoords);
xbt_free(targetCoords);
explicit AsClusterDragonfly(As* father, const char* name);
~AsClusterDragonfly() override;
// void create_links_for_node(sg_platf_cluster_cbarg_t cluster, int id, int rank, int position) override;
- void getRouteAndLatency(NetCard * src, NetCard * dst, sg_platf_route_cbarg_t into, double *latency) override;
+ void getLocalRoute(NetCard* src, NetCard* dst, sg_platf_route_cbarg_t into, double* latency) override;
void parse_specific_arguments(sg_platf_cluster_cbarg_t cluster) override;
void seal() override;
void generateRouters();
return true;
}
-void AsClusterFatTree::getRouteAndLatency(NetCard *src,
- NetCard *dst,
- sg_platf_route_cbarg_t into,
- double *latency) {
-
+void AsClusterFatTree::getLocalRoute(NetCard* src, NetCard* dst, sg_platf_route_cbarg_t into, double* latency)
+{
+
if (dst->isRouter() || src->isRouter())
return;
/* Let's find the source and the destination in our internal structure */
- std::map<int, FatTreeNode*>::const_iterator tempIter = this->computeNodes_.find(src->id());
- xbt_assert(tempIter != this->computeNodes_.end(), "Could not find the source %s [%d] in the fat tree",
+ auto searchedNode = this->computeNodes_.find(src->id());
+ xbt_assert(searchedNode != this->computeNodes_.end(), "Could not find the source %s [%d] in the fat tree",
src->name().c_str(), src->id());
- FatTreeNode* source = tempIter->second;
+ FatTreeNode* source = searchedNode->second;
- tempIter = this->computeNodes_.find(dst->id());
- xbt_assert(tempIter != this->computeNodes_.end(), "Could not find the destination %s [%d] in the fat tree",
+ searchedNode = this->computeNodes_.find(dst->id());
+ xbt_assert(searchedNode != this->computeNodes_.end(), "Could not find the destination %s [%d] in the fat tree",
dst->name().c_str(), dst->id());
- FatTreeNode* destination = tempIter->second;
+ FatTreeNode* destination = searchedNode->second;
XBT_VERB("Get route and latency from '%s' [%d] to '%s' [%d] in a fat tree", src->name().c_str(), src->id(),
dst->name().c_str(), dst->id());
// up part
while (!isInSubTree(currentNode, destination)) {
- int d, k; // as in d-mod-k
- d = destination->position;
+ int d = destination->position; // as in d-mod-k
- for (unsigned int i = 0 ; i < currentNode->level ; i++) {
+ for (unsigned int i = 0; i < currentNode->level; i++)
d /= this->upperLevelNodesNumber_[i];
- }
- k = this->upperLevelNodesNumber_[currentNode->level];
+
+ int k = this->upperLevelNodesNumber_[currentNode->level];
d = d % k;
into->link_list->push_back(currentNode->parents[d]->upLink);
- if(latency) {
+ if (latency)
*latency += currentNode->parents[d]->upLink->latency();
- }
- if (this->hasLimiter_) {
+ if (this->hasLimiter_)
into->link_list->push_back(currentNode->limiterLink);
- }
currentNode = currentNode->parents[d]->upNode;
}
// Down part
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]) {
+ if (i % this->lowerLevelNodesNumber_[currentNode->level - 1] == destination->label[currentNode->level - 1]) {
into->link_list->push_back(currentNode->children[i]->downLink);
- if(latency) {
+ if (latency)
*latency += currentNode->children[i]->downLink->latency();
- }
currentNode = currentNode->children[i]->downNode;
- if (this->hasLimiter_) {
+ if (this->hasLimiter_)
into->link_list->push_back(currentNode->limiterLink);
- }
XBT_DEBUG("%d(%u,%u) is accessible through %d(%u,%u)", destination->id,
destination->level, destination->position, currentNode->id,
currentNode->level, currentNode->position);
public:
explicit AsClusterFatTree(As* father, const char* name);
~AsClusterFatTree() override;
- void getRouteAndLatency(NetCard *src, NetCard *dst,
- sg_platf_route_cbarg_t into,
- double *latency) override;
+ void getLocalRoute(NetCard* src, NetCard* dst, sg_platf_route_cbarg_t into, double* latency) override;
/** \brief Generate the fat tree
*
xbt_dynar_free(&dimensions);
}
- void AsClusterTorus::getRouteAndLatency(NetCard * src, NetCard * dst, sg_platf_route_cbarg_t route, double *lat) {
+ void AsClusterTorus::getLocalRoute(NetCard* src, NetCard* dst, sg_platf_route_cbarg_t route, double* lat)
+ {
- XBT_VERB("torus_get_route_and_latency from '%s'[%d] to '%s'[%d]", src->name().c_str(), src->id(),
- dst->name().c_str(), dst->id());
+ XBT_VERB("torus getLocalRoute from '%s'[%d] to '%s'[%d]", src->name().c_str(), src->id(), dst->name().c_str(),
+ dst->id());
if (dst->isRouter() || src->isRouter())
return;
explicit AsClusterTorus(As* father, const char* name);
~AsClusterTorus() override;
void create_links_for_node(sg_platf_cluster_cbarg_t cluster, int id, int rank, int position) override;
- void getRouteAndLatency(NetCard * src, NetCard * dst, sg_platf_route_cbarg_t into, double *latency) override;
+ void getLocalRoute(NetCard* src, NetCard* dst, sg_platf_route_cbarg_t into, double* latency) override;
void parse_specific_arguments(sg_platf_cluster_cbarg_t cluster) override;
private:
xbt_dynar_t dimensions_ = nullptr;
xbt_graph_new_edge(routeGraph_, src, dst, e_route);
}
-void AsDijkstra::getRouteAndLatency(NetCard *src, NetCard *dst, sg_platf_route_cbarg_t route, double *lat)
+void AsDijkstra::getLocalRoute(NetCard* src, NetCard* dst, sg_platf_route_cbarg_t route, double* lat)
{
getRouteCheckParams(src, dst);
int src_id = src->id();
int dst_id = dst->id();
int *pred_arr = nullptr;
- sg_platf_route_cbarg_t e_route;
int size = 0;
xbt_dynar_t nodes = xbt_graph_get_nodes(routeGraph_);
if (edge == nullptr)
THROWF(arg_error, 0, "No route from '%s' to '%s'", src->name().c_str(), dst->name().c_str());
- e_route = (sg_platf_route_cbarg_t) xbt_graph_edge_get_data(edge);
+ sg_platf_route_cbarg_t e_route = (sg_platf_route_cbarg_t)xbt_graph_edge_get_data(edge);
for (auto link: *e_route->link_list) {
route->link_list->insert(route->link_list->begin(), link);
prev_gw_src = gw_src;
- e_route = (sg_platf_route_cbarg_t) xbt_graph_edge_get_data(edge);
+ sg_platf_route_cbarg_t e_route = (sg_platf_route_cbarg_t)xbt_graph_edge_get_data(edge);
gw_src = e_route->gw_src;
gw_dst = e_route->gw_dst;
* After this function returns, any node in the graph
* will have a loopback attached to it.
*/
- void getRouteAndLatency(NetCard *src, NetCard *dst, sg_platf_route_cbarg_t route, double *lat) override;
+ void getLocalRoute(NetCard* src, NetCard* dst, sg_platf_route_cbarg_t route, double* lat) override;
void addRoute(sg_platf_route_cbarg_t route) override;
xbt_graph_t routeGraph_ = nullptr; /* xbt_graph */
xbt_free(costTable_);
}
-void AsFloyd::getRouteAndLatency(NetCard *src, NetCard *dst, sg_platf_route_cbarg_t route, double *lat)
+void AsFloyd::getLocalRoute(NetCard* src, NetCard* dst, sg_platf_route_cbarg_t route, double* lat)
{
size_t table_size = vertices_.size();
/* create a result route */
std::vector<sg_platf_route_cbarg_t> route_stack;
- int pred;
unsigned int cur = dst->id();
do {
- pred = TO_FLOYD_PRED(src->id(), cur);
+ int pred = TO_FLOYD_PRED(src->id(), cur);
if (pred == -1)
THROWF(arg_error, 0, "No route from '%s' to '%s'", src->name().c_str(), dst->name().c_str());
route_stack.push_back(TO_FLOYD_LINK(pred, cur));
explicit AsFloyd(As* father, const char* name);
~AsFloyd() override;
- void getRouteAndLatency(NetCard *src, NetCard *dst, sg_platf_route_cbarg_t into, double *latency) override;
+ void getLocalRoute(NetCard* src, NetCard* dst, sg_platf_route_cbarg_t into, double* latency) override;
void addRoute(sg_platf_route_cbarg_t route) override;
void seal() override;
}
}
-void AsFull::getRouteAndLatency(NetCard *src, NetCard *dst, sg_platf_route_cbarg_t res, double *lat)
+void AsFull::getLocalRoute(NetCard* src, NetCard* dst, sg_platf_route_cbarg_t res, double* lat)
{
- XBT_DEBUG("full_get_route_and_latency from %s[%d] to %s[%d]", src->name().c_str(), src->id(), dst->name().c_str(),
- dst->id());
+ XBT_DEBUG("full getLocalRoute from %s[%d] to %s[%d]", src->name().c_str(), src->id(), dst->name().c_str(), dst->id());
- /* set utils vars */
size_t table_size = vertices_.size();
+ sg_platf_route_cbarg_t e_route = TO_ROUTE_FULL(src->id(), dst->id());
- sg_platf_route_cbarg_t e_route = nullptr;
-
- e_route = TO_ROUTE_FULL(src->id(), dst->id());
-
- if (e_route) {
+ if (e_route != nullptr) {
res->gw_src = e_route->gw_src;
res->gw_dst = e_route->gw_dst;
for (auto link : *e_route->link_list) {
res->link_list->push_back(link);
if (lat)
- *lat += static_cast<Link*>(link)->latency();
+ *lat += link->latency();
}
}
}
void seal() override;
~AsFull() override;
- void getRouteAndLatency(NetCard *src, NetCard *dst, sg_platf_route_cbarg_t into, double *latency) override;
+ void getLocalRoute(NetCard* src, NetCard* dst, sg_platf_route_cbarg_t into, double* latency) override;
void addRoute(sg_platf_route_cbarg_t route) override;
sg_platf_route_cbarg_t *routingTable_ = nullptr;
/* If src and dst are in the same AS, life is good */
if (src_ancestor == dst_ancestor) { /* SURF_ROUTING_BASE */
route.link_list = links;
- common_ancestor->getRouteAndLatency(src, dst, &route, latency);
+ common_ancestor->getLocalRoute(src, dst, &route, latency);
return;
}
route.link_list = new std::vector<surf::Link*>();
- common_ancestor->getRouteAndLatency(src_ancestor->netcard_, dst_ancestor->netcard_, &route, latency);
+ common_ancestor->getLocalRoute(src_ancestor->netcard_, dst_ancestor->netcard_, &route, latency);
xbt_assert((route.gw_src != nullptr) && (route.gw_dst != nullptr), "bad gateways for route from \"%s\" to \"%s\"",
src->name().c_str(), dst->name().c_str());
/** @brief Autonomous Systems
*
* An AS is a network container, in charge of routing information between elements (hosts) and to the nearby ASes.
- * In SimGrid, there is a hierarchy of ASes, with a unique root AS (that you can retrieve from the s4u::Engine).
+ * In SimGrid, there is a hierarchy (a tree) of ASes, with a unique root AS (that you can retrieve from the
+ * s4u::Engine).
*/
XBT_PUBLIC_CLASS AsImpl : public s4u::As
{
* @param latency Accumulator in which the latencies should be added (caller must set it to 0)
*/
protected:
- virtual void getRouteAndLatency(NetCard * src, NetCard * dst, sg_platf_route_cbarg_t into, double* latency) = 0;
+ virtual void getLocalRoute(NetCard * src, NetCard * dst, sg_platf_route_cbarg_t into, double* latency) = 0;
/** @brief retrieves the list of all routes of size 1 (of type src x dst x Link) */
/* returns whether we found a bypass path */
bool getBypassRoute(routing::NetCard * src, routing::NetCard * dst,
AsNone::~AsNone() = default;
-void AsNone::getRouteAndLatency(NetCard * /*src*/, NetCard * /*dst*/,
- sg_platf_route_cbarg_t /*res*/, double */*lat*/)
+void AsNone::getLocalRoute(NetCard* /*src*/, NetCard* /*dst*/, sg_platf_route_cbarg_t /*res*/, double* /*lat*/)
{}
void AsNone::getGraph(xbt_graph_t /*graph*/, xbt_dict_t /*nodes*/, xbt_dict_t /*edges*/)
explicit AsNone(As* father, const char* name);
~AsNone() override;
- void getRouteAndLatency(NetCard *src, NetCard *dst, sg_platf_route_cbarg_t into, double *latency) override;
+ void getLocalRoute(NetCard* src, NetCard* dst, sg_platf_route_cbarg_t into, double* latency) override;
void getGraph(xbt_graph_t graph, xbt_dict_t nodes, xbt_dict_t edges) override;
};
route->link_list->clear();
NetCard* src_elm = vertices_.at(src);
NetCard* dst_elm = vertices_.at(dst);
- this->getRouteAndLatency(src_elm, dst_elm, route, nullptr);
+ this->getLocalRoute(src_elm, dst_elm, route, nullptr);
if (route->link_list->size() == 1) {
Link* link = route->link_list->at(0);
sg_platf_route_cbarg_t route = xbt_new0(s_sg_platf_route_cbarg_t, 1);
route->link_list = new std::vector<Link*>();
- getRouteAndLatency(my_src, my_dst, route, nullptr);
+ getLocalRoute(my_src, my_dst, route, nullptr);
XBT_DEBUG("get_route_and_latency %s -> %s", my_src->name().c_str(), my_dst->name().c_str());
AsVivaldi::AsVivaldi(As* father, const char* name) : AsCluster(father, name)
{}
-void AsVivaldi::getRouteAndLatency(NetCard *src, NetCard *dst, sg_platf_route_cbarg_t route, double *lat)
-{
- XBT_DEBUG("vivaldi_get_route_and_latency from '%s'[%d] '%s'[%d]", src->name().c_str(), src->id(), dst->name().c_str(),
- dst->id());
-
- if (src->isAS()) {
- char* srcName = bprintf("router_%s", src->name().c_str());
- char* dstName = bprintf("router_%s", dst->name().c_str());
- route->gw_src = (sg_netcard_t)xbt_lib_get_or_null(as_router_lib, srcName, ROUTING_ASR_LEVEL);
- route->gw_dst = (sg_netcard_t)xbt_lib_get_or_null(as_router_lib, dstName, ROUTING_ASR_LEVEL);
- xbt_free(srcName);
- xbt_free(dstName);
- }
+ void AsVivaldi::getLocalRoute(NetCard* src, NetCard* dst, sg_platf_route_cbarg_t route, double* lat)
+ {
+ XBT_DEBUG("vivaldi getLocalRoute from '%s'[%d] '%s'[%d]", src->name().c_str(), src->id(), dst->name().c_str(),
+ dst->id());
+
+ if (src->isAS()) {
+ char* srcName = bprintf("router_%s", src->name().c_str());
+ char* dstName = bprintf("router_%s", dst->name().c_str());
+ route->gw_src = (sg_netcard_t)xbt_lib_get_or_null(as_router_lib, srcName, ROUTING_ASR_LEVEL);
+ route->gw_dst = (sg_netcard_t)xbt_lib_get_or_null(as_router_lib, dstName, ROUTING_ASR_LEVEL);
+ xbt_free(srcName);
+ xbt_free(dstName);
+ }
- /* Retrieve the private links */
- if (privateLinks_.size() > src->id()) {
- s_surf_parsing_link_up_down_t info = privateLinks_.at(src->id());
- if(info.linkUp) {
- route->link_list->push_back(info.linkUp);
- if (lat)
- *lat += info.linkUp->latency();
+ /* Retrieve the private links */
+ if (privateLinks_.size() > src->id()) {
+ s_surf_parsing_link_up_down_t info = privateLinks_.at(src->id());
+ if (info.linkUp) {
+ route->link_list->push_back(info.linkUp);
+ if (lat)
+ *lat += info.linkUp->latency();
+ }
}
- }
- if (privateLinks_.size() >dst->id()) {
- s_surf_parsing_link_up_down_t info = privateLinks_.at(dst->id());
- if(info.linkDown) {
- route->link_list->push_back(info.linkDown);
- if (lat)
- *lat += info.linkDown->latency();
+ if (privateLinks_.size() > dst->id()) {
+ s_surf_parsing_link_up_down_t info = privateLinks_.at(dst->id());
+ if (info.linkDown) {
+ route->link_list->push_back(info.linkDown);
+ if (lat)
+ *lat += info.linkDown->latency();
+ }
}
- }
- /* Compute the extra latency due to the euclidean distance if needed */
- if (lat){
- xbt_dynar_t srcCoords = getCoordsFromNetcard(src);
- xbt_dynar_t dstCoords = getCoordsFromNetcard(dst);
+ /* Compute the extra latency due to the euclidean distance if needed */
+ if (lat) {
+ xbt_dynar_t srcCoords = getCoordsFromNetcard(src);
+ xbt_dynar_t dstCoords = getCoordsFromNetcard(dst);
- double euclidean_dist = sqrt (euclidean_dist_comp(0,srcCoords,dstCoords)+euclidean_dist_comp(1,srcCoords,dstCoords))
- + fabs(xbt_dynar_get_as(srcCoords, 2, double))+fabs(xbt_dynar_get_as(dstCoords, 2, double));
+ double euclidean_dist =
+ sqrt(euclidean_dist_comp(0, srcCoords, dstCoords) + euclidean_dist_comp(1, srcCoords, dstCoords)) +
+ fabs(xbt_dynar_get_as(srcCoords, 2, double)) + fabs(xbt_dynar_get_as(dstCoords, 2, double));
- XBT_DEBUG("Updating latency %f += %f",*lat,euclidean_dist);
- *lat += euclidean_dist / 1000.0; //From .ms to .s
- }
+ XBT_DEBUG("Updating latency %f += %f", *lat, euclidean_dist);
+ *lat += euclidean_dist / 1000.0; // From .ms to .s
+ }
}
}}}
public:
explicit AsVivaldi(As* father, const char* name);
- void getRouteAndLatency(NetCard *src, NetCard *dst, sg_platf_route_cbarg_t into, double *latency) override;
+ void getLocalRoute(NetCard* src, NetCard* dst, sg_platf_route_cbarg_t into, double* latency) override;
};
namespace vivaldi {