diff options
| author | Wilson Fung <[email protected]> | 2012-07-26 03:22:53 -0800 |
|---|---|---|
| committer | Andrew Boktor <[email protected]> | 2014-08-14 13:48:52 -0700 |
| commit | 9a0e4e4a776a963c9950dc3dcd0d23ee0739b755 (patch) | |
| tree | 70c6f73230fe8fcfdd0fd2a3a7eb525e1f145b80 /src/cuda-sim/memory.h | |
| parent | 1c7ed16cc28f1d740ac7abc773eb4016d49fcba4 (diff) | |
Clean up the unordered_map fallback support.
- Now there is only one macro for all use of unordered_map in the code.
- Moving all instances of gcc/cuda version detection into a single file.
- Adding a warning when the fallback is triggered.
[git-p4: depot-paths = "//depot/gpgpu_sim_research/fermi/distribution/": change = 13542]
Diffstat (limited to 'src/cuda-sim/memory.h')
| -rw-r--r-- | src/cuda-sim/memory.h | 21 |
1 files changed, 5 insertions, 16 deletions
diff --git a/src/cuda-sim/memory.h b/src/cuda-sim/memory.h index 5ebc0ad..f785b8b 100644 --- a/src/cuda-sim/memory.h +++ b/src/cuda-sim/memory.h @@ -30,23 +30,12 @@ #include "../abstract_hardware_model.h" -#ifdef __GNUC__ -#if __GNUC__ >= 4 && __GNUC_MINOR__ >= 3 - #include <unordered_map> - #define mem_map std::unordered_map - #define MEM_MAP_RESIZE(hash_size) m_data.rehash(hash_size) -#else - #include <ext/hash_map> - namespace std { - using namespace __gnu_cxx; - } - #define mem_map std::hash_map - #define MEM_MAP_RESIZE(hash_size) m_data.resize(hash_size) -#endif -#else - #include <map> - #define mem_map std::map +#include "../tr1_hash_map.h" +#define mem_map tr1_hash_map +#if tr1_hash_map_ismap == 1 #define MEM_MAP_RESIZE(hash_size) +#else + #define MEM_MAP_RESIZE(hash_size) (m_data.rehash(hash_size)) #endif #include <assert.h> |
