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>
#include "mem/cache/cache.hh"
#include "sim/core.hh"
-using namespace std;
-
MSHR::MSHR() : downstreamPending(false),
pendingModified(false),
postInvalidate(false), postDowngrade(false),
std::string
MSHR::print() const
{
- ostringstream str;
+ std::ostringstream str;
print(str);
return str.str();
}
#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),
#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),
#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),
#include "base/intmath.hh"
#include "base/logging.hh"
-using namespace std;
-
FALRU::FALRU(const Params *p)
: BaseTags(p), cacheBoundaries(nullptr)
{
void
FALRU::regStats()
{
- using namespace Stats;
BaseTags::regStats();
hits
.init(numCaches+1)
;
for (unsigned i = 0; i <= numCaches; ++i) {
- stringstream size_str;
+ std::stringstream size_str;
if (i < 3){
size_str << (1<<(i+7)) <<"K";
} else {
#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)
#include "mem/cache/cache.hh"
#include "sim/core.hh"
-using namespace std;
-
inline void
WriteQueueEntry::TargetList::add(PacketPtr pkt, Tick readyTime,
Counter order)
std::string
WriteQueueEntry::print() const
{
- ostringstream str;
+ std::ostringstream str;
print(str);
return str.str();
}
void
DRAMCtrl::Rank::regStats()
{
- using namespace Stats;
-
pwrStateTime
.init(6)
.name(name() + ".memoryStateTime")
.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()
#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))
{
#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)
#include "base/trace.hh"
#include "debug/MemCheckerMonitor.hh"
-using namespace std;
-
MemCheckerMonitor::MemCheckerMonitor(Params* params)
: MemObject(params),
masterPort(name() + "-master", *this),
#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)
#include "sim/faults.hh"
#include "sim/serialize.hh"
-using namespace std;
-
void
EmulationPageTable::map(Addr vaddr, Addr paddr, int64_t size, uint64_t flags)
{
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
#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),