Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Definition of a new class to represent the routing in fat trees
authorStéphane Castelli <stephane.castelli@loria.fr>
Mon, 14 Apr 2014 07:50:13 +0000 (09:50 +0200)
committerStéphane Castelli <stephane.castelli@loria.fr>
Mon, 14 Apr 2014 07:50:13 +0000 (09:50 +0200)
include/simgrid/platf.h
src/surf/surf_routing_cluster_fat_tree.hpp [new file with mode: 0644]

index 4031d13..4399096 100644 (file)
@@ -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 (file)
index 0000000..d45cdbf
--- /dev/null
@@ -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<int> lowerLevelNodesNumber;
+  std::vector<int> upperLevelNodesNumber;
+  std::vector<int> lowerLevelPortsNumber;
+  
+  std::vector<FatTreeNode> nodes;
+};
+
+class FatTreeLink {
+public:
+};
+class FatTreeNode {
+  int id;
+  std::string name;
+};
+  
+#endif