mem: Remove unused 'using namespace'

Removal of unused/barely used 'using namespace' from C++ files.

Change-Id: I66dc548c04506db2e41180b9ea7ab5abd7d5375a
Reviewed-on: https://gem5-review.googlesource.com/9601
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Maintainer: Nikos Nikoleris <nikos.nikoleris@arm.com>
This commit is contained in:
Daniel R. Carvalho
2018-03-30 11:20:27 +02:00
committed by Daniel Carvalho
parent affbf2a608
commit 906ef2f7cd
14 changed files with 6 additions and 35 deletions

View File

@@ -60,8 +60,6 @@
#include "mem/cache/cache.hh"
#include "sim/core.hh"
using namespace std;
MSHR::MSHR() : downstreamPending(false),
pendingModified(false),
postInvalidate(false), postDowngrade(false),
@@ -617,7 +615,7 @@ MSHR::print(std::ostream &os, int verbosity, const std::string &prefix) const
std::string
MSHR::print() const
{
ostringstream str;
std::ostringstream str;
print(str);
return str.str();
}

View File

@@ -47,8 +47,6 @@
#include "mem/cache/mshr_queue.hh"
using namespace std;
MSHRQueue::MSHRQueue(const std::string &_label,
int num_entries, int reserve, int demand_reserve)
: Queue<MSHR>(_label, num_entries, reserve),

View File

@@ -52,8 +52,6 @@
#include "mem/cache/base.hh"
#include "sim/sim_exit.hh"
using namespace std;
BaseTags::BaseTags(const Params *p)
: ClockedObject(p), blkSize(p->block_size), blkMask(blkSize - 1),
size(p->size),

View File

@@ -52,8 +52,6 @@
#include "base/intmath.hh"
#include "sim/core.hh"
using namespace std;
BaseSetAssoc::BaseSetAssoc(const Params *p)
:BaseTags(p), assoc(p->assoc), allocAssoc(p->assoc),
blks(p->size / p->block_size),

View File

@@ -53,8 +53,6 @@
#include "base/intmath.hh"
#include "base/logging.hh"
using namespace std;
FALRU::FALRU(const Params *p)
: BaseTags(p), cacheBoundaries(nullptr)
{
@@ -122,7 +120,6 @@ FALRU::~FALRU()
void
FALRU::regStats()
{
using namespace Stats;
BaseTags::regStats();
hits
.init(numCaches+1)
@@ -140,7 +137,7 @@ FALRU::regStats()
;
for (unsigned i = 0; i <= numCaches; ++i) {
stringstream size_str;
std::stringstream size_str;
if (i < 3){
size_str << (1<<(i+7)) <<"K";
} else {

View File

@@ -48,8 +48,6 @@
#include "mem/cache/write_queue.hh"
using namespace std;
WriteQueue::WriteQueue(const std::string &_label,
int num_entries, int reserve)
: Queue<WriteQueueEntry>(_label, num_entries, reserve)

View File

@@ -61,8 +61,6 @@
#include "mem/cache/cache.hh"
#include "sim/core.hh"
using namespace std;
inline void
WriteQueueEntry::TargetList::add(PacketPtr pkt, Tick readyTime,
Counter order)
@@ -163,7 +161,7 @@ WriteQueueEntry::print(std::ostream &os, int verbosity,
std::string
WriteQueueEntry::print() const
{
ostringstream str;
std::ostringstream str;
print(str);
return str.str();
}

View File

@@ -2302,8 +2302,6 @@ DRAMCtrl::Rank::resetStats() {
void
DRAMCtrl::Rank::regStats()
{
using namespace Stats;
pwrStateTime
.init(6)
.name(name() + ".memoryStateTime")
@@ -2367,8 +2365,8 @@ DRAMCtrl::Rank::regStats()
.name(name() + ".totalIdleTime")
.desc("Total Idle time Per DRAM Rank");
registerDumpCallback(new RankDumpCallback(this));
registerResetCallback(new RankResetCallback(this));
Stats::registerDumpCallback(new RankDumpCallback(this));
Stats::registerResetCallback(new RankResetCallback(this));
}
void
DRAMCtrl::regStats()

View File

@@ -42,8 +42,6 @@
#include "base/intmath.hh"
#include "sim/core.hh"
using namespace Data;
DRAMPower::DRAMPower(const DRAMCtrlParams* p, bool include_io) :
powerlib(libDRAMPower(getMemSpec(p), include_io))
{

View File

@@ -54,8 +54,6 @@
#include "cpu/thread_context.hh"
#include "sim/system.hh"
using namespace TheISA;
FSTranslatingPortProxy::FSTranslatingPortProxy(ThreadContext *tc)
: PortProxy(tc->getCpuPtr()->getDataPort(),
tc->getSystemPtr()->cacheLineSize()), _tc(tc)

View File

@@ -47,8 +47,6 @@
#include "base/trace.hh"
#include "debug/MemCheckerMonitor.hh"
using namespace std;
MemCheckerMonitor::MemCheckerMonitor(Params* params)
: MemObject(params),
masterPort(name() + "-master", *this),

View File

@@ -47,8 +47,6 @@
#include "debug/Drain.hh"
#include "debug/PacketQueue.hh"
using namespace std;
PacketQueue::PacketQueue(EventManager& _em, const std::string& _label,
const std::string& _sendEventName,
bool disable_sanity_check)

View File

@@ -45,8 +45,6 @@
#include "sim/faults.hh"
#include "sim/serialize.hh"
using namespace std;
void
EmulationPageTable::map(Addr vaddr, Addr paddr, int64_t size, uint64_t flags)
{
@@ -100,7 +98,7 @@ void
EmulationPageTable::getMappings(std::vector<std::pair<Addr, Addr>> *addr_maps)
{
for (auto &iter : pTable)
addr_maps->push_back(make_pair(iter.first, iter.second.paddr));
addr_maps->push_back(std::make_pair(iter.first, iter.second.paddr));
}
void

View File

@@ -48,8 +48,6 @@
#include "base/trace.hh"
#include "debug/Drain.hh"
using namespace std;
SimpleMemory::SimpleMemory(const SimpleMemoryParams* p) :
AbstractMemory(p),
port(name() + ".port", *this), latency(p->latency),