From 9a0e4e4a776a963c9950dc3dcd0d23ee0739b755 Mon Sep 17 00:00:00 2001 From: Wilson Fung Date: Thu, 26 Jul 2012 03:22:53 -0800 Subject: 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] --- src/cuda-sim/ptx-stats.cc | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'src/cuda-sim/ptx-stats.cc') diff --git a/src/cuda-sim/ptx-stats.cc b/src/cuda-sim/ptx-stats.cc index 3578be9..0a9f08d 100644 --- a/src/cuda-sim/ptx-stats.cc +++ b/src/cuda-sim/ptx-stats.cc @@ -80,14 +80,6 @@ public: unsigned line; }; -struct hash_ptx_file_line -{ - std::size_t operator()(const ptx_file_line & pfline) const { - std::hash hash_line; - return hash_line(pfline.line); - } -}; - // holds all statistics collected for a singe PTX source line class ptx_file_line_stats { @@ -113,6 +105,13 @@ public: #if (tr1_hash_map_ismap == 1) typedef tr1_hash_map ptx_file_line_stats_map_t; #else +struct hash_ptx_file_line +{ + std::size_t operator()(const ptx_file_line & pfline) const { + std::hash hash_line; + return hash_line(pfline.line); + } +}; typedef tr1_hash_map ptx_file_line_stats_map_t; #endif -- cgit v1.3