diff --git a/codes/connection-manager.h b/codes/connection-manager.h index 69916b2cf5a0cb59b632e164d68863ff535d7aa0..64e6b86860686194b52bdc0fac8293292ba09a07 100644 --- a/codes/connection-manager.h +++ b/codes/connection-manager.h @@ -70,7 +70,8 @@ class ConnectionManager { map< int, Connection > _portMap; //Mapper for ports to connections - set< int > _other_groups_i_connect_to; + vector< int > _other_groups_i_connect_to; + set< int > _other_groups_i_connect_to_set; // map< int, vector< Connection > > intermediateRouterToGroupMap; //maps group id to list of routers that connect to it. // //ex: intermediateRouterToGroupMap[3] returns a vector @@ -200,6 +201,11 @@ public: */ vector< int > get_connected_group_ids(); + /** + * + */ + void solidify_connections(); + /** * @brief prints out the state of the connection manager */ @@ -265,7 +271,7 @@ void ConnectionManager::add_connection(int dest_gid, ConnectionType type) } if(conn.dest_group_id != conn.src_group_id) - _other_groups_i_connect_to.insert(conn.dest_group_id); + _other_groups_i_connect_to_set.insert(conn.dest_group_id); _portMap[conn.port] = conn; } @@ -449,15 +455,19 @@ vector< Connection > ConnectionManager::get_connections_by_type(ConnectionType t vector< int > ConnectionManager::get_connected_group_ids() { - vector< int > retVec; + return _other_groups_i_connect_to; +} + +void ConnectionManager::solidify_connections() +{ set< int >::iterator it; - for(it = _other_groups_i_connect_to.begin(); it != _other_groups_i_connect_to.end(); it++) + for(it = _other_groups_i_connect_to_set.begin(); it != _other_groups_i_connect_to_set.end(); it++) { - retVec.push_back(*it); + _other_groups_i_connect_to.push_back(*it); } - return retVec; } + void ConnectionManager::print_connections() { printf("Connections for Router: %d ---------------------------------------\n",_source_id_global); diff --git a/src/networks/model-net/dragonfly-plus.C b/src/networks/model-net/dragonfly-plus.C index 7fcad3aeef2253b49693e05ff5bbbebeb47bb124..b6c0a2e03cec1aad2b86fcecb418bbdd0652825d 100644 --- a/src/networks/model-net/dragonfly-plus.C +++ b/src/networks/model-net/dragonfly-plus.C @@ -1261,6 +1261,9 @@ void router_plus_setup(router_state *r, tw_lp *lp) } } + if (r->dfp_router_type == SPINE) + r->connMan->solidify_connections(); + return; }