From f1c3f3044b73d890ffdfdd113b3b37ae2809d21b Mon Sep 17 00:00:00 2001 From: Nathan Binkert Date: Fri, 2 Apr 2010 11:20:32 -0700 Subject: ruby: get "using namespace" out of headers In addition to obvious changes, this required a slight change to the slicc grammar to allow types with :: in them. Otherwise slicc barfs on std::string which we need for the headers that slicc generates. --- .../garnet/flexible-pipeline/GarnetNetwork.hh | 23 ++++++++++------------ 1 file changed, 10 insertions(+), 13 deletions(-) (limited to 'src/mem/ruby/network/garnet/flexible-pipeline/GarnetNetwork.hh') diff --git a/src/mem/ruby/network/garnet/flexible-pipeline/GarnetNetwork.hh b/src/mem/ruby/network/garnet/flexible-pipeline/GarnetNetwork.hh index 3669799fa..c116a324b 100644 --- a/src/mem/ruby/network/garnet/flexible-pipeline/GarnetNetwork.hh +++ b/src/mem/ruby/network/garnet/flexible-pipeline/GarnetNetwork.hh @@ -31,6 +31,8 @@ #ifndef GARNET_NETWORK_H #define GARNET_NETWORK_H +#include + #include "mem/ruby/network/garnet/NetworkHeader.hh" #include "mem/ruby/network/garnet/BaseGarnetNetwork.hh" #include "mem/gems_common/Vector.hh" @@ -58,9 +60,9 @@ public: MessageBuffer* getFromNetQueue(NodeID id, bool ordered, int network_num); void clearStats(); - void printStats(ostream& out) const; - void printConfig(ostream& out) const; - void print(ostream& out) const; + void printStats(std::ostream& out) const; + void printConfig(std::ostream& out) const; + void print(std::ostream& out) const; bool isVNetOrdered(int vnet) { return m_ordered[vnet]; } bool validVirtualNetwork(int vnet) { return m_in_use[vnet]; } @@ -101,17 +103,12 @@ private: Time m_ruby_start; }; -// Output operator declaration -ostream& operator<<(ostream& out, const GarnetNetwork& obj); - -// ******************* Definitions ******************* -// Output operator definition -extern inline -ostream& operator<<(ostream& out, const GarnetNetwork& obj) +inline std::ostream& +operator<<(std::ostream& out, const GarnetNetwork& obj) { - obj.print(out); - out << flush; - return out; + obj.print(out); + out << std::flush; + return out; } #endif //NETWORK_H -- cgit v1.2.3