diff options
author | Nathan Binkert <nate@binkert.org> | 2010-06-10 23:17:07 -0700 |
---|---|---|
committer | Nathan Binkert <nate@binkert.org> | 2010-06-10 23:17:07 -0700 |
commit | 006818aeea6176c4500c5f7414e9f2a822c77062 (patch) | |
tree | 74adbd6cc14951943bd6eafc4aba2fb98be7a526 /src/mem/ruby/network/simple/Throttle.cc | |
parent | bc87fa30d72df7db6265be50b2c39dc218076f9f (diff) | |
download | gem5-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/network/simple/Throttle.cc')
-rw-r--r-- | src/mem/ruby/network/simple/Throttle.cc | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/mem/ruby/network/simple/Throttle.cc b/src/mem/ruby/network/simple/Throttle.cc index 5d74afb24..a77d40dee 100644 --- a/src/mem/ruby/network/simple/Throttle.cc +++ b/src/mem/ruby/network/simple/Throttle.cc @@ -85,17 +85,17 @@ Throttle::clear() } void -Throttle::addLinks(const Vector<MessageBuffer*>& in_vec, - const Vector<MessageBuffer*>& out_vec) +Throttle::addLinks(const std::vector<MessageBuffer*>& in_vec, + const std::vector<MessageBuffer*>& out_vec) { assert(in_vec.size() == out_vec.size()); for (int i=0; i<in_vec.size(); i++) { addVirtualNetwork(in_vec[i], out_vec[i]); } - m_message_counters.setSize(MessageSizeType_NUM); + m_message_counters.resize(MessageSizeType_NUM); for (int i = 0; i < MessageSizeType_NUM; i++) { - m_message_counters[i].setSize(in_vec.size()); + m_message_counters[i].resize(in_vec.size()); for (int j = 0; j<m_message_counters[i].size(); j++) { m_message_counters[i][j] = 0; } @@ -105,9 +105,9 @@ Throttle::addLinks(const Vector<MessageBuffer*>& in_vec, void Throttle::addVirtualNetwork(MessageBuffer* in_ptr, MessageBuffer* out_ptr) { - m_units_remaining.insertAtBottom(0); - m_in.insertAtBottom(in_ptr); - m_out.insertAtBottom(out_ptr); + m_units_remaining.push_back(0); + m_in.push_back(in_ptr); + m_out.push_back(out_ptr); // Set consumer and description m_in[m_vnets]->setConsumer(this); |