diff options
Diffstat (limited to 'src/mem/ruby/common')
-rw-r--r-- | src/mem/ruby/common/DataBlock.hh | 1 | ||||
-rw-r--r-- | src/mem/ruby/common/Histogram.cc | 2 | ||||
-rw-r--r-- | src/mem/ruby/common/Histogram.hh | 4 | ||||
-rw-r--r-- | src/mem/ruby/common/NetDest.cc | 12 | ||||
-rw-r--r-- | src/mem/ruby/common/NetDest.hh | 8 | ||||
-rw-r--r-- | src/mem/ruby/common/SubBlock.cc | 5 | ||||
-rw-r--r-- | src/mem/ruby/common/SubBlock.hh | 6 |
7 files changed, 20 insertions, 18 deletions
diff --git a/src/mem/ruby/common/DataBlock.hh b/src/mem/ruby/common/DataBlock.hh index edf774166..007040930 100644 --- a/src/mem/ruby/common/DataBlock.hh +++ b/src/mem/ruby/common/DataBlock.hh @@ -32,7 +32,6 @@ #include <iomanip> #include <iostream> -#include "mem/gems_common/Vector.hh" #include "mem/ruby/common/Global.hh" #include "mem/ruby/system/System.hh" diff --git a/src/mem/ruby/common/Histogram.cc b/src/mem/ruby/common/Histogram.cc index c57b55997..dcb723f1b 100644 --- a/src/mem/ruby/common/Histogram.cc +++ b/src/mem/ruby/common/Histogram.cc @@ -58,7 +58,7 @@ Histogram::clear(int bins) m_bins = bins; m_largest_bin = 0; m_max = 0; - m_data.setSize(m_bins); + m_data.resize(m_bins); for (int i = 0; i < m_bins; i++) { m_data[i] = 0; } diff --git a/src/mem/ruby/common/Histogram.hh b/src/mem/ruby/common/Histogram.hh index e5cd211d6..81cfbd477 100644 --- a/src/mem/ruby/common/Histogram.hh +++ b/src/mem/ruby/common/Histogram.hh @@ -30,9 +30,9 @@ #define __MEM_RUBY_COMMON_HISTOGRAM_HH__ #include <iostream> +#include <vector> #include "mem/ruby/common/Global.hh" -#include "mem/gems_common/Vector.hh" class Histogram { @@ -56,7 +56,7 @@ class Histogram void print(std::ostream& out) const; private: - Vector<int64> m_data; + std::vector<int64> m_data; int64 m_max; // the maximum value seen so far int64 m_count; // the number of elements added int m_binsize; // the size of each bucket 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++) { diff --git a/src/mem/ruby/common/NetDest.hh b/src/mem/ruby/common/NetDest.hh index a8d0009d7..3fe87f69b 100644 --- a/src/mem/ruby/common/NetDest.hh +++ b/src/mem/ruby/common/NetDest.hh @@ -35,8 +35,8 @@ #define __MEM_RUBY_COMMON_NETDEST_HH__ #include <iostream> +#include <vector> -#include "mem/gems_common/Vector.hh" #include "mem/protocol/MachineType.hh" #include "mem/ruby/common/Global.hh" #include "mem/ruby/common/Set.hh" @@ -89,12 +89,12 @@ class NetDest bool isEmpty() const; // For Princeton Network - Vector<NodeID> getAllDest(); + std::vector<NodeID> getAllDest(); MachineID smallestElement() const; MachineID smallestElement(MachineType machine) const; - void setSize(); + void resize(); int getSize() const { return m_bits.size(); } // get element for a index @@ -119,7 +119,7 @@ class NetDest return index; } - Vector <Set> m_bits; // a Vector of bit vectors - i.e. Sets + std::vector<Set> m_bits; // a vector of bit vectors - i.e. Sets }; inline std::ostream& diff --git a/src/mem/ruby/common/SubBlock.cc b/src/mem/ruby/common/SubBlock.cc index 5a42a415d..48485bf8b 100644 --- a/src/mem/ruby/common/SubBlock.cc +++ b/src/mem/ruby/common/SubBlock.cc @@ -26,12 +26,15 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#include "base/stl_helpers.hh" #include "mem/ruby/common/SubBlock.hh" +using m5::stl_helpers::operator<<; + SubBlock::SubBlock(const Address& addr, int size) { m_address = addr; - setSize(size); + resize(size); for (int i = 0; i < size; i++) { setByte(i, 0); } diff --git a/src/mem/ruby/common/SubBlock.hh b/src/mem/ruby/common/SubBlock.hh index 571d45b57..3ebc99630 100644 --- a/src/mem/ruby/common/SubBlock.hh +++ b/src/mem/ruby/common/SubBlock.hh @@ -30,8 +30,8 @@ #define __MEM_RUBY_COMMON_SUBBLOCK_HH__ #include <iostream> +#include <vector> -#include "mem/gems_common/Vector.hh" #include "mem/ruby/common/Address.hh" #include "mem/ruby/common/DataBlock.hh" #include "mem/ruby/common/Global.hh" @@ -47,7 +47,7 @@ class SubBlock void setAddress(const Address& addr) { m_address = addr; } int getSize() const { return m_data.size(); } - void setSize(int size) { m_data.setSize(size); } + void resize(int size) { m_data.resize(size); } uint8 getByte(int offset) const { return m_data[offset]; } void setByte(int offset, uint8 data) { m_data[offset] = data; } @@ -68,7 +68,7 @@ class SubBlock // Data Members (m_ prefix) Address m_address; - Vector<uint8_t> m_data; + std::vector<uint8_t> m_data; }; inline std::ostream& |