X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/3080c6b0d097d6b3b7d5b3dda0592154ce438f64..703e8696289393e60554250c2ada4ea97ed89435:/src/surf/surf_routing_cluster_fat_tree.hpp diff --git a/src/surf/surf_routing_cluster_fat_tree.hpp b/src/surf/surf_routing_cluster_fat_tree.hpp index 2f924adfc9..6d6adcf668 100644 --- a/src/surf/surf_routing_cluster_fat_tree.hpp +++ b/src/surf/surf_routing_cluster_fat_tree.hpp @@ -1,14 +1,22 @@ -/* Copyright (c) 2014. The SimGrid Team. +/* Copyright (c) 2014-2015. The SimGrid Team. * All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ -#include "surf_routing_cluster.hpp" - #ifndef SURF_ROUTING_CLUSTER_FAT_TREE_HPP_ #define SURF_ROUTING_CLUSTER_FAT_TREE_HPP_ +#include +#include +#include + +#include + +#include "surf_routing_cluster.hpp" + +namespace simgrid { +namespace surf { /** \file surf_routing_cluster_fat_tree.cpp * The class AsClusterFatTree describes PGFT, as introduced by Eitan Zahavi @@ -17,8 +25,8 @@ * address real world constraints, which are not currently enforced. */ -class FatTreeNode; -class FatTreeLink; +class XBT_PRIVATE FatTreeNode; +class XBT_PRIVATE FatTreeLink; /** \brief A node in a fat tree. * A FatTreeNode can either be a switch or a processing node. Switches are @@ -52,11 +60,11 @@ public: /** Virtual link standing for the node global capacity. */ - NetworkLink* limiterLink; + Link* limiterLink; /** If present, communications from this node to this node will pass through it * instead of passing by an upper level switch. */ - NetworkLink* loopback; + Link* loopback; FatTreeNode(sg_platf_cluster_cbarg_t cluster, int id, int level, int position); }; @@ -72,22 +80,21 @@ class FatTreeLink { public: FatTreeLink(sg_platf_cluster_cbarg_t cluster, FatTreeNode *source, FatTreeNode *destination); - /** Link going up in the tree - */ - NetworkLink *upLink; - /** Link going down in the tree - */ - NetworkLink *downLink; - /** Upper end of the link - */ + /** Link going up in the tree */ + Link *upLink; + /** Link going down in the tree */ + Link *downLink; + /** Upper end of the link */ FatTreeNode *upNode; - /** Lower end of the link - */ + /** Lower end of the link */ FatTreeNode *downNode; }; -/** \brief Fat tree representation and routing. +/** + * \class AsClusterFatTree + * + * \brief Fat tree representation and routing. * * Generate fat trees according to the topology asked for. Almost everything * is based on the work of Eitan Zahavi in "D-Mod-K Routing Providing @@ -107,13 +114,13 @@ public: * * Routing is made using a destination-mod-k scheme. */ -class AsClusterFatTree : public AsCluster { +class XBT_PRIVATE AsClusterFatTree : public AsCluster { public: AsClusterFatTree(); ~AsClusterFatTree(); - virtual void getRouteAndLatency(RoutingEdgePtr src, RoutingEdgePtr dst, + virtual void getRouteAndLatency(NetCard *src, NetCard *dst, sg_platf_route_cbarg_t into, - double *latency); + double *latency) override; /** \brief Generate the fat tree * @@ -126,11 +133,9 @@ public: * * It will also store the cluster for future use. */ - void parse_specific_arguments(sg_platf_cluster_cbarg_t cluster); - /** \brief Add a processing node. - */ + void parse_specific_arguments(sg_platf_cluster_cbarg_t cluster) override; void addProcessingNode(int id); - void generateDotFile(const string& filename = "fatTree.dot") const; + void generateDotFile(const std::string& filename = "fatTree.dot") const; private: @@ -156,4 +161,8 @@ private: bool areRelated(FatTreeNode *parent, FatTreeNode *child); bool isInSubTree(FatTreeNode *root, FatTreeNode *node); }; + +} +} + #endif