From: Stéphane Castelli Date: Mon, 14 Apr 2014 07:50:13 +0000 (+0200) Subject: Definition of a new class to represent the routing in fat trees X-Git-Tag: v3_11~123 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/f77cfc70ecec6f8e33fcd80a55ac2c3bb2abac62 Definition of a new class to represent the routing in fat trees --- diff --git a/include/simgrid/platf.h b/include/simgrid/platf.h index 4031d13d73..4399096299 100644 --- a/include/simgrid/platf.h +++ b/include/simgrid/platf.h @@ -45,6 +45,7 @@ typedef enum { } e_surf_process_on_failure_t; typedef enum { + SURF_CLUSTER_FAT_TREE=2, SURF_CLUSTER_FLAT = 1, SURF_CLUSTER_TORUS = 0 } e_surf_cluster_topology_t; @@ -331,6 +332,7 @@ typedef struct s_sg_platf_gpu_cbarg { #define SG_PLATF_GPU_INITIALIZER {NULL} + /* ***************************************** */ XBT_PUBLIC(void) sg_platf_begin(void); // Start a new platform diff --git a/src/surf/surf_routing_cluster_fat_tree.hpp b/src/surf/surf_routing_cluster_fat_tree.hpp new file mode 100644 index 0000000000..d45cdbf3a8 --- /dev/null +++ b/src/surf/surf_routing_cluster_fat_tree.hpp @@ -0,0 +1,42 @@ +/* Copyright (c) 2014. 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_ + + + +class FatTreeLink; +class FatTreeNode; + +class AsClusterFatTree : public AsCluster { +public: + AsClusterFatTree(); + virtual void getRouteAndLatency(RoutingEdgePtr src, RoutingEdgePtr dst, sg_platf_route_cbarg_t into, double *latency); + virtual void create_links(); + void parse_specific_arguments(sg_platf_cluster_cbarg_t cluster); + +protected: + //description of a PGFT (TODO : better doc) + unsigned int levels; + std::vector lowerLevelNodesNumber; + std::vector upperLevelNodesNumber; + std::vector lowerLevelPortsNumber; + + std::vector nodes; +}; + +class FatTreeLink { +public: +}; +class FatTreeNode { + int id; + std::string name; +}; + +#endif