summaryrefslogtreecommitdiff
path: root/src/mem/ruby/common/NetDest.cc
diff options
context:
space:
mode:
authorNathan Binkert <nate@binkert.org>2010-06-10 23:17:07 -0700
committerNathan Binkert <nate@binkert.org>2010-06-10 23:17:07 -0700
commit006818aeea6176c4500c5f7414e9f2a822c77062 (patch)
tree74adbd6cc14951943bd6eafc4aba2fb98be7a526 /src/mem/ruby/common/NetDest.cc
parentbc87fa30d72df7db6265be50b2c39dc218076f9f (diff)
downloadgem5-006818aeea6176c4500c5f7414e9f2a822c77062.tar.xz
ruby: get rid of Vector and use STL
add a couple of helper functions to base for deleteing all pointers in a container and outputting containers to a stream
Diffstat (limited to 'src/mem/ruby/common/NetDest.cc')
-rw-r--r--src/mem/ruby/common/NetDest.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/mem/ruby/common/NetDest.cc b/src/mem/ruby/common/NetDest.cc
index 509d0d223..dbe02b0ca 100644
--- a/src/mem/ruby/common/NetDest.cc
+++ b/src/mem/ruby/common/NetDest.cc
@@ -31,7 +31,7 @@
NetDest::NetDest()
{
- setSize();
+ resize();
}
void
@@ -107,16 +107,16 @@ NetDest::broadcast(MachineType machineType)
}
//For Princeton Network
-Vector<NodeID>
+std::vector<NodeID>
NetDest::getAllDest()
{
- Vector<NodeID> dest;
+ std::vector<NodeID> dest;
dest.clear();
for (int i = 0; i < m_bits.size(); i++) {
for (int j = 0; j < m_bits[i].getSize(); j++) {
if (m_bits[i].isElement(j)) {
int id = MachineType_base_number((MachineType)i) + j;
- dest.insertAtBottom((NodeID)id);
+ dest.push_back((NodeID)id);
}
}
}
@@ -249,9 +249,9 @@ NetDest::isElement(MachineID element) const
}
void
-NetDest::setSize()
+NetDest::resize()
{
- m_bits.setSize(MachineType_base_level(MachineType_NUM));
+ m_bits.resize(MachineType_base_level(MachineType_NUM));
assert(m_bits.size() == MachineType_NUM);
for (int i = 0; i < m_bits.size(); i++) {