From 4658b0a943887513cbe6232fff09fafeeb77baaf Mon Sep 17 00:00:00 2001 From: Wilson Fung Date: Fri, 2 Mar 2012 02:22:29 -0800 Subject: Cleaned up the sweep_test() in addrdec.cc to use tr1_hash_map. [git-p4: depot-paths = "//depot/gpgpu_sim_research/fermi/distribution/": change = 11575] --- src/gpgpu-sim/addrdec.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/gpgpu-sim/addrdec.cc b/src/gpgpu-sim/addrdec.cc index 3c5945e..8857ac9 100644 --- a/src/gpgpu-sim/addrdec.cc +++ b/src/gpgpu-sim/addrdec.cc @@ -320,6 +320,8 @@ void linear_to_raw_address_translation::init(unsigned int nchips) } } +#include "../tr1_hash_map.h" + bool operator==(const addrdec_t &x, const addrdec_t &y) { return ( memcmp(&x, &y, sizeof(addrdec_t)) == 0 ); @@ -343,11 +345,12 @@ public: } }; +// a simple sweep test to ensure that two linear addresses are not mapped to the same raw address void linear_to_raw_address_translation::sweep_test() const { new_addr_type sweep_range = 16 * 1024 * 1024; - typedef std::unordered_map history_map_t; + typedef tr1_hash_map history_map_t; history_map_t history_map; for (new_addr_type raw_addr = 4; raw_addr < sweep_range; raw_addr += 4) { -- cgit v1.3