diff options
| author | Wilson Fung <[email protected]> | 2012-03-02 02:22:29 -0800 |
|---|---|---|
| committer | Andrew Boktor <[email protected]> | 2014-08-14 13:19:04 -0700 |
| commit | 4658b0a943887513cbe6232fff09fafeeb77baaf (patch) | |
| tree | ff6c8b3a756a1e9f1dcaaa7480cbe232a9eca611 /src | |
| parent | 9103b5e31822eec864b54717d70b007cd325ba3f (diff) | |
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]
Diffstat (limited to 'src')
| -rw-r--r-- | src/gpgpu-sim/addrdec.cc | 5 |
1 files changed, 4 insertions, 1 deletions
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<addrdec_t, new_addr_type, hash_addrdec_t> history_map_t; + typedef tr1_hash_map<addrdec_t, new_addr_type, hash_addrdec_t> history_map_t; history_map_t history_map; for (new_addr_type raw_addr = 4; raw_addr < sweep_range; raw_addr += 4) { |
