summaryrefslogtreecommitdiff
path: root/src/cuda-sim/ptx_sim.cc
diff options
context:
space:
mode:
authorsspenst <[email protected]>2016-08-05 14:45:56 -0700
committersspenst <[email protected]>2016-08-05 14:45:56 -0700
commitd1b45cf53a39261663a3eff0d409d6c1220d923d (patch)
tree85ab2442c3f6e581195650626c8e8586eed9e8b9 /src/cuda-sim/ptx_sim.cc
parent9a6b68c5b11fbdb239d25afe60e5135bc2afa88d (diff)
Added ptx_warp_info to know how many threads within a warp have executed
Diffstat (limited to 'src/cuda-sim/ptx_sim.cc')
-rw-r--r--src/cuda-sim/ptx_sim.cc21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/cuda-sim/ptx_sim.cc b/src/cuda-sim/ptx_sim.cc
index f48115b..820287d 100644
--- a/src/cuda-sim/ptx_sim.cc
+++ b/src/cuda-sim/ptx_sim.cc
@@ -144,6 +144,26 @@ void ptx_cta_info::reset_bar_threads()
m_bar_threads = 0;
}
+ptx_warp_info::ptx_warp_info()
+{
+ reset_done_threads();
+}
+
+unsigned ptx_warp_info::get_done_threads() const
+{
+ return m_done_threads;
+}
+
+void ptx_warp_info::inc_done_threads()
+{
+ m_done_threads++;
+}
+
+void ptx_warp_info::reset_done_threads()
+{
+ m_done_threads = 0;
+}
+
unsigned g_ptx_thread_info_uid_next=1;
unsigned g_ptx_thread_info_delete_count=0;
@@ -170,6 +190,7 @@ ptx_thread_info::ptx_thread_info( kernel_info_t &kernel )
m_branch_taken = 0;
m_shared_mem = NULL;
m_sstarr_mem = NULL;
+ m_warp_info = NULL;
m_cta_info = NULL;
m_local_mem = NULL;
m_symbol_table = NULL;