X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/f4ed74ca6d4a744d2956a4f2906c897e1886cefd..b35d70d6818026204833410d2e3917252fa35127:/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 6527e15755..83ca962cb6 100644 --- a/src/surf/surf_routing_cluster_fat_tree.cpp +++ b/src/surf/surf_routing_cluster_fat_tree.cpp @@ -1,3 +1,11 @@ +#include + +#include +#include +#include +#include +#include + #include "surf_routing_cluster_fat_tree.hpp" #include "xbt/lib.h" @@ -11,9 +19,12 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_route_fat_tree, surf, "Routing for fat tree AS_t model_fat_tree_cluster_create(void) { - return new AsClusterFatTree(); + return new simgrid::surf::AsClusterFatTree(); } +namespace simgrid { +namespace surf { + AsClusterFatTree::AsClusterFatTree() : levels(0) { XBT_DEBUG("Creating a new fat tree."); } @@ -47,8 +58,8 @@ bool AsClusterFatTree::isInSubTree(FatTreeNode *root, FatTreeNode *node) { return true; } -void AsClusterFatTree::getRouteAndLatency(RoutingEdge *src, - RoutingEdge *dst, +void AsClusterFatTree::getRouteAndLatency(NetCard *src, + NetCard *dst, sg_platf_route_cbarg_t into, double *latency) { FatTreeNode *source, *destination, *currentNode; @@ -407,8 +418,8 @@ void AsClusterFatTree::addLink(FatTreeNode *parent, unsigned int parentPort, void AsClusterFatTree::parse_specific_arguments(sg_platf_cluster_cbarg_t cluster) { - std::vector parameters; - std::vector tmp; + std::vector parameters; + std::vector tmp; boost::split(parameters, cluster->topo_parameters, boost::is_any_of(";")); @@ -455,12 +466,12 @@ void AsClusterFatTree::parse_specific_arguments(sg_platf_cluster_cbarg_t } -void AsClusterFatTree::generateDotFile(const string& filename) const { - ofstream file; +void AsClusterFatTree::generateDotFile(const std::string& filename) const { + std::ofstream file; /* Maybe should we get directly a char*, as open takes strings only beginning * with C++11... */ - file.open(filename.c_str(), ios::out | ios::trunc); + file.open(filename.c_str(), std::ios::out | std::ios::trunc); if(file.is_open()) { file << "graph AsClusterFatTree {\n"; @@ -549,3 +560,6 @@ FatTreeLink::FatTreeLink(sg_platf_cluster_cbarg_t cluster, uniqueId++; free((void*)linkTemplate.id); } + +} +}