summaryrefslogtreecommitdiff
path: root/src/mem/ruby/network/simple
diff options
context:
space:
mode:
Diffstat (limited to 'src/mem/ruby/network/simple')
-rw-r--r--src/mem/ruby/network/simple/PerfectSwitch.cc2
-rw-r--r--src/mem/ruby/network/simple/SimpleNetwork.cc2
-rw-r--r--src/mem/ruby/network/simple/SimpleNetwork.hh14
-rw-r--r--src/mem/ruby/network/simple/Switch.cc4
-rw-r--r--src/mem/ruby/network/simple/Throttle.cc4
-rw-r--r--src/mem/ruby/network/simple/Throttle.hh14
-rw-r--r--src/mem/ruby/network/simple/Topology.cc4
7 files changed, 27 insertions, 17 deletions
diff --git a/src/mem/ruby/network/simple/PerfectSwitch.cc b/src/mem/ruby/network/simple/PerfectSwitch.cc
index bddcb8412..4555ef2b3 100644
--- a/src/mem/ruby/network/simple/PerfectSwitch.cc
+++ b/src/mem/ruby/network/simple/PerfectSwitch.cc
@@ -35,6 +35,8 @@
#include "mem/ruby/slicc_interface/NetworkMessage.hh"
#include "mem/ruby/system/System.hh"
+using namespace std;
+
const int PRIORITY_SWITCH_LIMIT = 128;
// Operator for helper class
diff --git a/src/mem/ruby/network/simple/SimpleNetwork.cc b/src/mem/ruby/network/simple/SimpleNetwork.cc
index 26924c2e7..2940f19a1 100644
--- a/src/mem/ruby/network/simple/SimpleNetwork.cc
+++ b/src/mem/ruby/network/simple/SimpleNetwork.cc
@@ -38,6 +38,8 @@
#include "mem/ruby/profiler/Profiler.hh"
#include "mem/ruby/system/System.hh"
+using namespace std;
+
#if 0
// ***BIG HACK*** - This is actually code that _should_ be in Network.cc
diff --git a/src/mem/ruby/network/simple/SimpleNetwork.hh b/src/mem/ruby/network/simple/SimpleNetwork.hh
index d8ec89d49..f9cb22a6a 100644
--- a/src/mem/ruby/network/simple/SimpleNetwork.hh
+++ b/src/mem/ruby/network/simple/SimpleNetwork.hh
@@ -63,6 +63,8 @@
#ifndef __MEM_RUBY_NETWORK_SIMPLE_SIMPLENETWORK_HH__
#define __MEM_RUBY_NETWORK_SIMPLE_SIMPLENETWORK_HH__
+#include <iostream>
+
#include "mem/gems_common/Vector.hh"
#include "mem/ruby/common/Global.hh"
#include "mem/ruby/network/Network.hh"
@@ -85,9 +87,9 @@ class SimpleNetwork : public Network
void init();
- void printStats(ostream& out) const;
+ void printStats(std::ostream& out) const;
void clearStats();
- void printConfig(ostream& out) const;
+ void printConfig(std::ostream& out) const;
void reset();
@@ -112,7 +114,7 @@ class SimpleNetwork : public Network
const NetDest& routing_table_entry, int link_latency, int link_weight,
int bw_multiplier, bool isReconfiguration);
- void print(ostream& out) const;
+ void print(std::ostream& out) const;
private:
void checkNetworkAllocation(NodeID id, bool ordered, int network_num);
@@ -138,11 +140,11 @@ class SimpleNetwork : public Network
Vector<Switch*> m_endpoint_switches;
};
-inline ostream&
-operator<<(ostream& out, const SimpleNetwork& obj)
+inline std::ostream&
+operator<<(std::ostream& out, const SimpleNetwork& obj)
{
obj.print(out);
- out << flush;
+ out << std::flush;
return out;
}
diff --git a/src/mem/ruby/network/simple/Switch.cc b/src/mem/ruby/network/simple/Switch.cc
index 30403cd67..e88a24505 100644
--- a/src/mem/ruby/network/simple/Switch.cc
+++ b/src/mem/ruby/network/simple/Switch.cc
@@ -34,6 +34,8 @@
#include "mem/ruby/network/simple/Switch.hh"
#include "mem/ruby/network/simple/Throttle.hh"
+using namespace std;
+
Switch::Switch(SwitchID sid, SimpleNetwork* network_ptr)
{
m_perfect_switch_ptr = new PerfectSwitch(sid, network_ptr);
@@ -129,8 +131,6 @@ Switch::getThrottles() const
void
Switch::printStats(std::ostream& out) const
{
- using namespace std;
-
ccprintf(out, "switch_%d_inlinks: %d\n", m_switch_id,
m_perfect_switch_ptr->getInLinks());
ccprintf(out, "switch_%d_outlinks: %d\n", m_switch_id,
diff --git a/src/mem/ruby/network/simple/Throttle.cc b/src/mem/ruby/network/simple/Throttle.cc
index f749672e2..2d15b1141 100644
--- a/src/mem/ruby/network/simple/Throttle.cc
+++ b/src/mem/ruby/network/simple/Throttle.cc
@@ -34,6 +34,8 @@
#include "mem/ruby/slicc_interface/NetworkMessage.hh"
#include "mem/ruby/system/System.hh"
+using namespace std;
+
const int HIGH_RANGE = 256;
const int ADJUST_INTERVAL = 50000;
const int MESSAGE_SIZE_MULTIPLIER = 1000;
@@ -43,7 +45,7 @@ const int PRIORITY_SWITCH_LIMIT = 128;
static int network_message_to_size(NetworkMessage* net_msg_ptr);
-extern std::ostream *debug_cout_ptr;
+extern ostream *debug_cout_ptr;
Throttle::Throttle(int sID, NodeID node, int link_latency,
int link_bandwidth_multiplier)
diff --git a/src/mem/ruby/network/simple/Throttle.hh b/src/mem/ruby/network/simple/Throttle.hh
index 608754190..74cd7b356 100644
--- a/src/mem/ruby/network/simple/Throttle.hh
+++ b/src/mem/ruby/network/simple/Throttle.hh
@@ -38,6 +38,8 @@
#ifndef __MEM_RUBY_NETWORK_SIMPLE_THROTTLE_HH__
#define __MEM_RUBY_NETWORK_SIMPLE_THROTTLE_HH__
+#include <iostream>
+
#include "mem/gems_common/Vector.hh"
#include "mem/ruby/common/Consumer.hh"
#include "mem/ruby/common/Global.hh"
@@ -59,9 +61,9 @@ class Throttle : public Consumer
const Vector<MessageBuffer*>& out_vec);
void wakeup();
- void printStats(ostream& out) const;
+ void printStats(std::ostream& out) const;
void clearStats();
- void printConfig(ostream& out) const;
+ void printConfig(std::ostream& out) const;
// The average utilization (a percent) since last clearStats()
double getUtilization() const;
int
@@ -80,7 +82,7 @@ class Throttle : public Consumer
void clear();
- void print(ostream& out) const;
+ void print(std::ostream& out) const;
private:
void init(NodeID node, int link_latency, int link_bandwidth_multiplier);
@@ -107,11 +109,11 @@ class Throttle : public Consumer
double m_links_utilized;
};
-inline ostream&
-operator<<(ostream& out, const Throttle& obj)
+inline std::ostream&
+operator<<(std::ostream& out, const Throttle& obj)
{
obj.print(out);
- out << flush;
+ out << std::flush;
return out;
}
diff --git a/src/mem/ruby/network/simple/Topology.cc b/src/mem/ruby/network/simple/Topology.cc
index 3d7aa35d0..f21129255 100644
--- a/src/mem/ruby/network/simple/Topology.cc
+++ b/src/mem/ruby/network/simple/Topology.cc
@@ -36,6 +36,8 @@
#include "mem/ruby/slicc_interface/AbstractController.hh"
#include "mem/ruby/system/System.hh"
+using namespace std;
+
const int INFINITE_LATENCY = 10000; // Yes, this is a big hack
const int DEFAULT_BW_MULTIPLIER = 1; // Just to be consistent with above :)
@@ -276,8 +278,6 @@ Topology::clearStats()
void
Topology::printConfig(std::ostream& out) const
{
- using namespace std;
-
if (m_print_config == false)
return;