SST/macro
structured_router.h
Go to the documentation of this file.
1 #ifndef REGULAR_ROUTER_H
2 #define REGULAR_ROUTER_H
3 
4 
9 
10 namespace sstmac {
11 namespace hw {
12 
13 /**
14  * @brief The structured_router class
15  * Implements a router that computes path on-the-fly using the geometry of the topology
16  * rather than using a table-based scheme with a table stored in the router.
17  * For example, a computation is performed on 3D torus coordinates to determine if
18  * +/- X,Y,Z is the required direction rather than just looking up port numbers in a table.
19  */
21  : public router
22 {
23 
24  public:
25  virtual ~structured_router(){}
26 
27  /**
28  * @brief set_topology Set the topology to be used for route computations.
29  * This should always call the parent router::set_topology function.
30  * @param top
31  */
32  virtual void
33  set_topology(topology* top);
34 
35  /**
36  * @brief set_switch Set the parent switch using this router
37  * to perform route computations
38  * @param sw
39  */
40  virtual void
42 
43  void
45  node_id node_addr,
47 
48  /**
49  * @brief minimal_routes_to_node
50  * Special version of routing function that computes all possible
51  * minimal paths.
52  * @param node_addr
53  * @param [inout] current_path Metadata about the path taken so far.
54  * This may contain history information about previous steps
55  * @param [inout[ paths The set of all available minimal paths
56  */
57  void
59  node_id node_addr,
60  structured_routable::path& current_path,
62 
63  virtual void
65  switch_id sw_addr,
67 
68  virtual void
70  switch_id dst,
72 
73  protected:
75  router(algo){}
76 
78 
79 };
80 
81 }
82 }
83 
84 #endif // REGULAR_ROUTER_H
virtual void set_switch(network_switch *sw)
set_switch Set the parent switch using this router to perform route computations
virtual void productive_paths_to_switch(switch_id dst, structured_routable::path_set &paths)
structured_router(routing::algorithm_t algo)
Definition: router.h:29
The structured_router class Implements a router that computes path on-the-fly using the geometry of t...
topology_id switch_id
Definition: node_address.h:23
SUMI = Simulator unified messagine interface It is also the name for a solid ink in Japanese - i...
void minimal_route_to_node(node_id node_addr, structured_routable::path &path)
virtual void minimal_route_to_switch(switch_id sw_addr, structured_routable::path &path)
structured_topology * regtop_
virtual void set_topology(topology *top)
set_topology Set the topology to be used for route computations.
Encapsulates a topology like torus, fat tree, butterfly which has a regular, well-defined structure...
void minimal_routes_to_node(node_id node_addr, structured_routable::path &current_path, structured_routable::path_set &paths)
minimal_routes_to_node Special version of routing function that computes all possible minimal paths...
endpoint_id node_id
Definition: node_address.h:20