X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/750a10299dfb858b9b7ce14714fac19f5af9483d..20bb321a5cf8f244e33b5562b9dd1d8fb5d4864a:/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 1430c43bfb..62f9354b4e 100644 --- a/src/surf/surf_routing_cluster_fat_tree.hpp +++ b/src/surf/surf_routing_cluster_fat_tree.hpp @@ -17,6 +17,9 @@ * should certainly be checked for) */ +/* TODO : limiter link ? Loopback? + * + */ class FatTreeNode { public: @@ -36,15 +39,19 @@ public: class FatTreeLink { public: + FatTreeLink(sg_platf_cluster_cbarg_t cluster, FatTreeNode *source, + FatTreeNode *destination, unsigned int ports = 0); unsigned int ports; - std::vector linksUp; // From source to destination - std::vector linksDown; // From destination to source + /* Links are dependant of the chosen network model, but must implement + * NetworkLink + */ + std::vector linksUp; // From source to destination + std::vector linksDown; // From destination to source /* As it is symetric, it might as well be first / second instead * of source / destination */ FatTreeNode *source; FatTreeNode *destination; - //FatTreeLink(FatTreeNode *source, FatTreeNode *destination, unsigned int ports = 0); }; class AsClusterFatTree : public AsCluster { @@ -67,13 +74,14 @@ protected: unsigned int levels; std::vector lowerLevelNodesNumber; // number of children by node std::vector upperLevelNodesNumber; // number of parents by node - std::vector lowerLevelPortsNumber; + std::vector lowerLevelPortsNumber; // ports between each level l and l-1 std::vector nodes; std::map, FatTreeLink*> links; std::vector nodesByLevel; - void addLink(FatTreeNode *parent, FatTreeNode *child); + void addLink(sg_platf_cluster_cbarg_t cluster, FatTreeNode *parent, + FatTreeNode *child); void getLevelPosition(const unsigned int level, int *position, int *size); }; #endif