SST/macro
|
#include <dragonfly.h>
Public Types | |
enum | dimension_t { x_dimension = 0, y_dimension = 1, g_dimension = 2 } |
enum | x_vc_t { upX_vc = 0, downX_vc = 1 } |
enum | y_vc_t { upY_vc = 0, downY_vc = 1 } |
Public Member Functions | |
virtual std::string | to_string () const |
dimension_t | dim_for_port (int port) |
virtual | ~dragonfly () |
virtual void | init_factory_params (sprockit::sim_parameters *params) |
void | init_common_params (sprockit::sim_parameters *params) |
int | ndimensions () const |
The number of distinct 'dimensions' in the topology. More... | |
int | numX () const |
int | numY () const |
int | numG () const |
int | group_con () const |
void | get_coords (long uid, int &x, int &y, int &g) const |
long | get_uid (int x, int y, int g) const |
switch_id | switch_number (const coordinates &coords) const |
virtual int | num_switches () const |
int | num_leaf_switches () const |
Structured topologies can be direct (torus) or indirect (fat tree). More... | |
virtual void | connect_objects (internal_connectable_map &switches) |
Given a set of connectables, connect them appropriately. More... | |
virtual int | diameter () const |
coordinates | neighbor_at_port (switch_id sid, int port) const |
virtual switch_id | random_intermediate_switch (switch_id current_sw, switch_id dest_sw=switch_id(-1)) |
virtual int | convert_to_port (int dim, int dir) const |
void | configure_vc_routing (std::map< routing::algorithm_t, int > &m) const |
virtual void | productive_path (int dim, const coordinates &src, const coordinates &dst, structured_routable::path &path) const |
void | minimal_route_to_coords (const coordinates &src_coords, const coordinates &dest_coords, structured_routable::path &path) const |
Workhorse function for implementing minimal_route_to_switch and #minimal_route_to_node. More... | |
int | minimal_distance (const coordinates &src_coords, const coordinates &dest_coords) const |
The function accepts either source or node coordinates. More... | |
void | nearest_neighbor_partners (const coordinates &src_sw_coords, int port, std::vector< node_id > &partners) const |
void | bit_complement_partners (const coordinates &src_sw_coords, int port, std::vector< node_id > &partners) const |
void | tornado_send_partners (const coordinates &src_sw_coords, int port, std::vector< node_id > &partners) const |
void | tornado_recv_partners (const coordinates &src_sw_coords, int port, std::vector< node_id > &partners) const |
virtual void | new_routing_stage (structured_routable *rtbl) |
virtual void | configure_geometric_paths (std::vector< int > &redundancies) |
configure_geometric_paths For all possible geometric or structure paths, compute their redundances in terms of number of ports that go in the same geometric or structural direction, e.g. More... | |
Public Member Functions inherited from sstmac::hw::cartesian_topology | |
virtual void | minimal_routes_to_switch (switch_id current_sw_addr, switch_id dest_sw_addr, structured_routable::path ¤t_path, structured_routable::path_set &paths) const |
Public Member Functions inherited from sstmac::hw::structured_topology | |
virtual | ~structured_topology () |
virtual void | build_internal_connectables (internal_connectable_map &connectables, sprockit::factory< connectable > *factory, partition *part, int my_rank, sprockit::sim_parameters *params, connectable *dummy) |
virtual void | build_endpoint_connectables (end_point_connectable_map &connectables, sprockit::factory< connectable > *factory, partition *part, int my_rank, sprockit::sim_parameters *params) |
virtual void | build_interface_connectables (int conc, end_point_connectable_map &connectables, sprockit::factory2< connectable > *nic_factory, partition *part, int my_rank, sprockit::sim_parameters *params, sprockit::factory_type *interconnect) |
virtual void | minimal_routes_to_coords (const coordinates &src_coords, const coordinates &dest_coords, structured_routable::path ¤t_path, structured_routable::path_set &paths) const |
virtual int | endpoints_per_switch (switch_id addr) const |
Given a switch address, return number of nodes connected to it. More... | |
virtual int | num_nodes () const |
virtual int | num_endpoints () const |
coordinates | switch_coords (switch_id swid) const |
Compute coordinates (e.g. More... | |
virtual coordinates | node_coords (node_id nid) const |
Compute coordinates (e.g. More... | |
coordinates | endpoint_coords (node_id nid) const |
virtual switch_id | endpoint_to_ejection_switch (node_id nodeaddr, int &switch_port) const |
virtual switch_id | endpoint_to_injection_switch (node_id nodeaddr, int &switch_port) const |
virtual int | endpoint_to_ejection_port (node_id addr) const |
virtual int | endpoint_to_injection_port (node_id addr) const |
virtual int | endpoint_to_switch_port (node_id nid) const |
void | finalize_init () |
virtual void | productive_paths (structured_routable::path_set &paths, const coordinates ¤t, const coordinates &dst) |
std::string | label (node_id nid) const |
std::string | label (switch_id sid) const |
virtual void | minimal_route_to_switch (switch_id current_sw_addr, switch_id dest_sw_addr, structured_routable::path &path) const |
Implementation of topology::minimal_route_to_switch. More... | |
virtual void | eject_paths_on_switch (node_id dest_addr, switch_id sw_addr, structured_routable::path_set &paths) const |
virtual int | num_hops_to_node (node_id src, node_id dst) const |
virtual std::vector< node_id > | nodes_connected_to_injection_switch (switch_id swaddr) const |
virtual std::vector< node_id > | nodes_connected_to_ejection_switch (switch_id swid) const |
virtual node_id | node_addr (const coordinates &coords) const |
virtual node_id | node_addr (const coordinates &sw_coords, int port) const |
virtual void | send_partners (traffic_pattern::type_t ty, node_id src_node, std::vector< node_id > &partners) const |
virtual void | recv_partners (traffic_pattern::type_t ty, node_id src_node, std::vector< node_id > &partners) const |
Protected Member Functions | |
void | minimal_route_to_group (int myX, int myY, int myG, int &dim, int &dir, int dstg) const |
virtual void | find_path_to_group (int myX, int myY, int myG, int &dsty, int &dstx, int dstg) const |
int | minimal_route_to_X (int hisx) const |
int | minimal_route_to_Y (int hisy) const |
virtual void | compute_switch_coords (switch_id uid, coordinates &coords) const |
Compute coordinates (e.g. More... | |
int | find_y_path_to_group (int myX, int myG, int dstg) const |
int | find_x_path_to_group (int myY, int myG, int dstg) const |
virtual bool | xy_connected_to_group (int myX, int myY, int myG, int dstg) const |
int | xyg_dir_to_group (int myX, int myY, int myG, int dir) const |
Protected Member Functions inherited from sstmac::hw::structured_topology | |
void | configure_injection_geometry (std::vector< int > &redundancies) |
virtual std::vector< node_id > | nodes_connected_to_switch (switch_id swaddr) const |
structured_topology () | |
void | partners (bool get_send_partner, traffic_pattern::type_t ty, node_id src, std::vector< node_id > &partner_list) const |
Static Protected Member Functions | |
static std::string | set_string (int x, int y, int g) |
Protected Attributes | |
int | x_ |
int | y_ |
int | g_ |
int | group_con_ |
bool | true_random_intermediate_ |
Protected Attributes inherited from sstmac::hw::cartesian_topology | |
std::vector< int > | red_ |
The number of redundant links (ports) comprising a geometric or structure direction in the topology. More... | |
Protected Attributes inherited from sstmac::hw::structured_topology | |
int | eject_geometric_id_ |
int | injection_redundancy_ |
bool | outputgraph_ |
Definition at line 20 of file dragonfly.h.
Enumerator | |
---|---|
x_dimension | |
y_dimension | |
g_dimension |
Definition at line 24 of file dragonfly.h.
Enumerator | |
---|---|
upX_vc | |
downX_vc |
Definition at line 30 of file dragonfly.h.
Enumerator | |
---|---|
upY_vc | |
downY_vc |
Definition at line 35 of file dragonfly.h.
|
inlinevirtual |
Definition at line 57 of file dragonfly.h.
References init_common_params(), and init_factory_params().
|
virtual |
Reimplemented from sstmac::hw::structured_topology.
Referenced by diameter().
|
protectedvirtual |
Compute coordinates (e.g.
X,Y,Z for 3D torus)
swid | The unique index defining a switch location |
coords | [inout] The unique coordinates of the switch |
Implements sstmac::hw::structured_topology.
Referenced by diameter().
|
virtual |
configure_geometric_paths For all possible geometric or structure paths, compute their redundances in terms of number of ports that go in the same geometric or structural direction, e.g.
might be 3 ports that all go +X on a router
[in,out] | redundancies |
Implements sstmac::hw::cartesian_topology.
Reimplemented in sstmac::hw::tiled_dragonfly.
Referenced by diameter().
void sstmac::hw::dragonfly::configure_vc_routing | ( | std::map< routing::algorithm_t, int > & | m | ) | const |
Referenced by diameter().
|
virtual |
Given a set of connectables, connect them appropriately.
objects | The set of objects to connect |
cloner | If in parallel mode, not all objects may exist. The factory creates missing objects. |
value_error | If invalid switchid is passed to cloner |
Implements sstmac::hw::structured_topology.
Reimplemented in sstmac::hw::tiled_dragonfly.
Referenced by num_leaf_switches().
|
virtual |
Reimplemented in sstmac::hw::tiled_dragonfly.
Referenced by diameter().
|
inlinevirtual |
Implements sstmac::hw::structured_topology.
Definition at line 113 of file dragonfly.h.
References bit_complement_partners(), compute_switch_coords(), configure_geometric_paths(), configure_vc_routing(), convert_to_port(), find_path_to_group(), find_x_path_to_group(), find_y_path_to_group(), minimal_distance(), minimal_route_to_coords(), minimal_route_to_group(), minimal_route_to_X(), minimal_route_to_Y(), nearest_neighbor_partners(), neighbor_at_port(), new_routing_stage(), sstmac::hw::structured_topology::partners(), productive_path(), random_intermediate_switch(), tornado_recv_partners(), tornado_send_partners(), xy_connected_to_group(), and xyg_dir_to_group().
|
inline |
Definition at line 47 of file dragonfly.h.
References g_dimension, x_, x_dimension, y_, and y_dimension.
|
protectedvirtual |
Referenced by diameter().
|
protected |
Referenced by diameter().
|
protected |
Referenced by diameter().
void sstmac::hw::dragonfly::get_coords | ( | long | uid, |
int & | x, | ||
int & | y, | ||
int & | g | ||
) | const |
Referenced by group_con().
long sstmac::hw::dragonfly::get_uid | ( | int | x, |
int | y, | ||
int | g | ||
) | const |
Referenced by group_con().
|
inline |
Definition at line 86 of file dragonfly.h.
References get_coords(), get_uid(), group_con_, and switch_number().
void sstmac::hw::dragonfly::init_common_params | ( | sprockit::sim_parameters * | params | ) |
Referenced by ~dragonfly().
|
virtual |
Reimplemented from sstmac::hw::cartesian_topology.
Reimplemented in sstmac::hw::tiled_dragonfly.
Referenced by ~dragonfly().
|
virtual |
The function accepts either source or node coordinates.
This gives the minimal distance counting the number of hops between switches. If node coordinates are given, the last coordinate is just ignored.
src_coords. | The source coordinates. This can be either switch or node coordinates. |
dest_coords. | The destination coordinates. This can be either switch or node coordinates. |
Implements sstmac::hw::structured_topology.
Referenced by diameter().
|
virtual |
Workhorse function for implementing minimal_route_to_switch and #minimal_route_to_node.
Given source/dest coordinates, find the minimal path.
current_sw_addr | The addr of the current switch |
dest_sw_addr | The addr of the destination switch |
path | [inout] A complete path descriptor to the destination switch |
Implements sstmac::hw::structured_topology.
Reimplemented in sstmac::hw::tiled_dragonfly.
Referenced by diameter().
|
protected |
Referenced by diameter().
|
protected |
Referenced by diameter().
|
protected |
Referenced by diameter().
|
inlinevirtual |
The number of distinct 'dimensions' in the topology.
This can correspond directly to standard X,Y,Z dimensions or the the number of levels in a fat tree. The keyword topology_redundant vector should have this many entries.
Implements sstmac::hw::structured_topology.
Definition at line 66 of file dragonfly.h.
|
virtual |
Reimplemented from sstmac::hw::structured_topology.
Referenced by diameter().
|
virtual |
Reimplemented from sstmac::hw::structured_topology.
Referenced by diameter().
|
virtual |
Referenced by diameter().
|
inlinevirtual |
Structured topologies can be direct (torus) or indirect (fat tree).
We therefore need to distinguish the total number of switches and the number of leaf switches - i.e. those directly connected to nodes. For direct topologies, num_switches and num_leaf_switches are the same. For indirect, num_leaf_switches < num_switches.
Implements sstmac::hw::structured_topology.
Definition at line 105 of file dragonfly.h.
References connect_objects(), g_, x_, and y_.
|
inlinevirtual |
Definition at line 100 of file dragonfly.h.
|
inline |
Definition at line 81 of file dragonfly.h.
References g_.
|
inline |
Definition at line 71 of file dragonfly.h.
References x_.
|
inline |
Definition at line 76 of file dragonfly.h.
References y_.
|
virtual |
dim | The dimension you want to move in. You might need to traverse other dimensions FIRST before you make progress on this dimension. |
src | The coordinates of the source switch |
dst | The coordinates of the dest switch |
path | [inout] The path configuration for making progress on dim |
Implements sstmac::hw::structured_topology.
Referenced by diameter().
|
virtual |
Referenced by diameter().
|
inlinestaticprotected |
Definition at line 210 of file dragonfly.h.
References sprockit::printf().
|
virtual |
Implements sstmac::hw::structured_topology.
Referenced by group_con().
|
inlinevirtual |
Reimplemented in sstmac::hw::tiled_dragonfly.
Definition at line 42 of file dragonfly.h.
|
virtual |
Reimplemented from sstmac::hw::structured_topology.
Referenced by diameter().
|
virtual |
Reimplemented from sstmac::hw::structured_topology.
Referenced by diameter().
|
protectedvirtual |
Reimplemented in sstmac::hw::tiled_dragonfly.
Referenced by diameter().
|
protected |
Referenced by diameter().
|
protected |
Definition at line 205 of file dragonfly.h.
Referenced by sstmac::hw::tiled_dragonfly::check_switch_g(), num_leaf_switches(), num_switches(), and numG().
|
protected |
Definition at line 206 of file dragonfly.h.
Referenced by group_con().
|
protected |
Definition at line 207 of file dragonfly.h.
|
protected |
Definition at line 203 of file dragonfly.h.
Referenced by sstmac::hw::tiled_dragonfly::check_switch_x(), dim_for_port(), num_leaf_switches(), num_switches(), and numX().
|
protected |
Definition at line 204 of file dragonfly.h.
Referenced by sstmac::hw::tiled_dragonfly::check_switch_y(), dim_for_port(), num_leaf_switches(), num_switches(), and numY().