40 #ifndef __MEM_RUBY_NETWORK_TOPOLOGY_HH__
41 #define __MEM_RUBY_NETWORK_TOPOLOGY_HH__
47 #include "mem/protocol/LinkDirection.hh"
74 void print(std::ostream& out)
const { out <<
"[Topology]"; }
81 const NetDest& routing_table_entry);
113 #endif // __MEM_RUBY_NETWORK_TOPOLOGY_HH__
std::vector< std::vector< int > > Matrix
void extend_shortest_path(Matrix ¤t_dist, Matrix &latencies, Matrix &inter_switches)
uint32_t numSwitches() const
bool link_is_shortest_path_to_node(SwitchID src, SwitchID next, SwitchID final, const Matrix &weights, const Matrix &dist)
PortDirection src_outport_dirn
std::vector< std::vector< int > > shortest_path(const Matrix &weights, Matrix &latencies, Matrix &inter_switches)
std::map< std::pair< SwitchID, SwitchID >, LinkEntry > LinkMap
std::string PortDirection
PortDirection dst_inport_dirn
const uint32_t m_number_of_switches
void addLink(SwitchID src, SwitchID dest, BasicLink *link, PortDirection src_outport_dirn="", PortDirection dest_inport_dirn="")
Topology(uint32_t num_routers, const std::vector< BasicExtLink * > &ext_links, const std::vector< BasicIntLink * > &int_links)
std::vector< BasicIntLink * > m_int_link_vector
void createLinks(Network *net)
void makeLink(Network *net, SwitchID src, SwitchID dest, const NetDest &routing_table_entry)
const FlagsType dist
Print the distribution.
std::ostream & operator<<(std::ostream &out, const Topology &obj)
std::vector< BasicExtLink * > m_ext_link_vector
void print(std::ostream &out) const
NetDest shortest_path_to_node(SwitchID src, SwitchID next, const Matrix &weights, const Matrix &dist)