X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/f566a20b6f493c79de2541d17452a28ce9ec51f6..42c56e9dea14cc3ae0c8a1da072890e25fa2c5f4:/src/surf/surf_routing_cluster_fat_tree.cpp diff --git a/src/surf/surf_routing_cluster_fat_tree.cpp b/src/surf/surf_routing_cluster_fat_tree.cpp index 93ba4eba94..579e1e3475 100644 --- a/src/surf/surf_routing_cluster_fat_tree.cpp +++ b/src/surf/surf_routing_cluster_fat_tree.cpp @@ -66,7 +66,8 @@ void AsClusterFatTree::getRouteAndLatency(NetCard *src, std::map::const_iterator tempIter; -if (dst->getRcType() == SURF_NETWORK_ELEMENT_ROUTER || src->getRcType() == SURF_NETWORK_ELEMENT_ROUTER) return; + if (dst->isRouter() || src->isRouter()) + return; /* Let's find the source and the destination in our internal structure */ tempIter = this->computeNodes_.find(src->id()); @@ -92,7 +93,7 @@ if (dst->getRcType() == SURF_NETWORK_ELEMENT_ROUTER || src->getRcType() == SURF_ /* In case destination is the source, and there is a loopback, let's get through it instead of going up to a switch*/ if(source->id == destination->id && this->has_loopback_) { - xbt_dynar_push_as(into->link_list, void*, source->loopback); + into->link_list->push_back(source->loopback); if(latency) { *latency += source->loopback->getLatency(); } @@ -111,14 +112,14 @@ if (dst->getRcType() == SURF_NETWORK_ELEMENT_ROUTER || src->getRcType() == SURF_ } k = this->upperLevelNodesNumber_[currentNode->level]; d = d % k; - xbt_dynar_push_as(into->link_list, void*,currentNode->parents[d]->upLink); + into->link_list->push_back(currentNode->parents[d]->upLink); if(latency) { *latency += currentNode->parents[d]->upLink->getLatency(); } if (this->has_limiter_) { - xbt_dynar_push_as(into->link_list, void*,currentNode->limiterLink); + into->link_list->push_back(currentNode->limiterLink); } currentNode = currentNode->parents[d]->upNode; } @@ -132,13 +133,13 @@ if (dst->getRcType() == SURF_NETWORK_ELEMENT_ROUTER || src->getRcType() == SURF_ for(unsigned int i = 0 ; i < currentNode->children.size() ; i++) { if(i % this->lowerLevelNodesNumber_[currentNode->level - 1] == destination->label[currentNode->level - 1]) { - xbt_dynar_push_as(into->link_list, void*,currentNode->children[i]->downLink); + into->link_list->push_back(currentNode->children[i]->downLink); if(latency) { *latency += currentNode->children[i]->downLink->getLatency(); } currentNode = currentNode->children[i]->downNode; if (this->has_limiter_) { - xbt_dynar_push_as(into->link_list, void*,currentNode->limiterLink); + 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,