41#ifndef __MEM_RUBY_NETWORK_TOPOLOGY_HH__
42#define __MEM_RUBY_NETWORK_TOPOLOGY_HH__
49#include "mem/ruby/protocol/LinkDirection.hh"
75typedef std::map<std::pair<SwitchID, SwitchID>,
81 Topology(uint32_t num_nodes, uint32_t num_routers, uint32_t num_vnets,
87 void print(std::ostream& out)
const { out <<
"[Topology]"; }
std::vector< BasicIntLink * > m_int_link_vector
uint32_t numSwitches() const
void makeLink(Network *net, SwitchID src, SwitchID dest, std::vector< NetDest > &routing_table_entry)
void print(std::ostream &out) const
void addLink(SwitchID src, SwitchID dest, BasicLink *link, PortDirection src_outport_dirn="", PortDirection dest_inport_dirn="")
const uint32_t m_number_of_switches
void createLinks(Network *net)
void extend_shortest_path(Matrix ¤t_dist, Matrix &latencies, Matrix &inter_switches)
std::vector< BasicExtLink * > m_ext_link_vector
Topology(uint32_t num_nodes, uint32_t num_routers, uint32_t num_vnets, const std::vector< BasicExtLink * > &ext_links, const std::vector< BasicIntLink * > &int_links)
bool link_is_shortest_path_to_node(SwitchID src, SwitchID next, SwitchID final, const Matrix &weights, const Matrix &dist, int vnet)
Matrix shortest_path(const Matrix &weights, Matrix &latencies, Matrix &inter_switches)
NetDest shortest_path_to_node(SwitchID src, SwitchID next, const Matrix &weights, const Matrix &dist, int vnet)
std::vector< std::vector< std::vector< int > > > Matrix
std::string PortDirection
std::ostream & operator<<(std::ostream &os, const BoolVec &myvector)
std::map< std::pair< SwitchID, SwitchID >, std::vector< LinkEntry > > LinkMap
const FlagsType dist
Print the distribution.
Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria All rights reserved.
PortDirection dst_inport_dirn
PortDirection src_outport_dirn