summaryrefslogtreecommitdiff
path: root/src/cuda-sim
diff options
context:
space:
mode:
Diffstat (limited to 'src/cuda-sim')
-rw-r--r--src/cuda-sim/ptx-stats.cc9
-rw-r--r--src/cuda-sim/ptx_sim.h4
2 files changed, 9 insertions, 4 deletions
diff --git a/src/cuda-sim/ptx-stats.cc b/src/cuda-sim/ptx-stats.cc
index df95960..567c62b 100644
--- a/src/cuda-sim/ptx-stats.cc
+++ b/src/cuda-sim/ptx-stats.cc
@@ -65,7 +65,7 @@
#include "../option_parser.h"
#include <stdio.h>
#include <map>
-#include <unordered_map>
+#include "../tr1_hash_map.h"
// external dependencies
extern function_info *g_func_info;
@@ -147,7 +147,12 @@ public:
unsigned long long warp_divergence; // number of warp divergence occured at this instruction
};
-typedef std::unordered_map<ptx_file_line, ptx_file_line_stats, hash_ptx_file_line> ptx_file_line_stats_map_t;
+#if (tr1_hash_map_ismap == 1)
+typedef tr1_hash_map<ptx_file_line, ptx_file_line_stats> ptx_file_line_stats_map_t;
+#else
+typedef tr1_hash_map<ptx_file_line, ptx_file_line_stats, hash_ptx_file_line> ptx_file_line_stats_map_t;
+#endif
+
static ptx_file_line_stats_map_t ptx_file_line_stats_tracker;
// output statistics to a file
diff --git a/src/cuda-sim/ptx_sim.h b/src/cuda-sim/ptx_sim.h
index e9270be..d712275 100644
--- a/src/cuda-sim/ptx_sim.h
+++ b/src/cuda-sim/ptx_sim.h
@@ -69,6 +69,7 @@
#include "dram_callback.h"
#include "../abstract_hardware_model.h"
+#include "../tr1_hash_map.h"
struct gpgpu_ptx_sim_arg {
@@ -94,7 +95,6 @@ struct gpgpu_ptx_sim_kernel_info {
#include <map>
#include <set>
#include <list>
-#include <unordered_map>
#include "memory.h"
@@ -464,7 +464,7 @@ private:
std::list<stack_entry> m_callstack;
unsigned m_local_mem_stack_pointer;
- typedef std::unordered_map<const symbol*,ptx_reg_t> reg_map_t;
+ typedef tr1_hash_map<const symbol*,ptx_reg_t> reg_map_t;
std::list<reg_map_t> m_regs;
bool m_enable_debug_trace;