From 2ccdfc547d5b58bdc859e4497658e972d7af5c45 Mon Sep 17 00:00:00 2001 From: Nilay Vaish Date: Mon, 15 Sep 2014 16:19:38 -0500 Subject: ruby: network: revert some of the changes from ad9c042dce54 The changeset ad9c042dce54 made changes to the structures under the network directory to use a map of buffers instead of vector of buffers. The reasoning was that not all vnets that are created are used and we needlessly allocate more buffers than required and then iterate over them while processing network messages. But the move to map resulted in a slow down which was pointed out by Andreas Hansson. This patch moves things back to using vector of message buffers. --- src/mem/ruby/network/simple/PerfectSwitch.hh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/mem/ruby/network/simple/PerfectSwitch.hh') diff --git a/src/mem/ruby/network/simple/PerfectSwitch.hh b/src/mem/ruby/network/simple/PerfectSwitch.hh index 161430bd1..f55281d54 100644 --- a/src/mem/ruby/network/simple/PerfectSwitch.hh +++ b/src/mem/ruby/network/simple/PerfectSwitch.hh @@ -65,8 +65,8 @@ class PerfectSwitch : public Consumer { return csprintf("PerfectSwitch-%i", m_switch_id); } void init(SimpleNetwork *); - void addInPort(const std::map& in); - void addOutPort(const std::map& out, + void addInPort(const std::vector& in); + void addOutPort(const std::vector& out, const NetDest& routing_table_entry); int getInLinks() const { return m_in.size(); } @@ -89,8 +89,8 @@ class PerfectSwitch : public Consumer SwitchID m_switch_id; // vector of queues from the components - std::vector > m_in; - std::vector > m_out; + std::vector > m_in; + std::vector > m_out; std::vector m_routing_table; std::vector m_link_order; -- cgit v1.2.3