diff options
| author | Mahmoud <[email protected]> | 2019-05-15 20:16:54 -0400 |
|---|---|---|
| committer | Mahmoud <[email protected]> | 2019-05-15 20:16:54 -0400 |
| commit | 0c16df3c8b108d8720846bb44b9abcc60ddf42f9 (patch) | |
| tree | 9f85dd6f6928ba0d1b1697b541c11b4acffe5f40 /src/cuda-sim/ptx_sim.cc | |
| parent | 7815b7ee86d4716e7133d91dd0c53d41580861b0 (diff) | |
make gpu_tot_cycle local variable not global variable
Diffstat (limited to 'src/cuda-sim/ptx_sim.cc')
| -rw-r--r-- | src/cuda-sim/ptx_sim.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/cuda-sim/ptx_sim.cc b/src/cuda-sim/ptx_sim.cc index 820287d..8ad651e 100644 --- a/src/cuda-sim/ptx_sim.cc +++ b/src/cuda-sim/ptx_sim.cc @@ -222,7 +222,7 @@ void ptx_thread_info::set_done() { assert( !m_at_barrier ); m_thread_done = true; - m_cycle_done = gpu_sim_cycle; + m_cycle_done = m_gpu->gpu_sim_cycle; } unsigned ptx_thread_info::get_builtin( int builtin_id, unsigned dim_mod ) @@ -230,15 +230,15 @@ unsigned ptx_thread_info::get_builtin( int builtin_id, unsigned dim_mod ) assert( m_valid ); switch ((builtin_id&0xFFFF)) { case CLOCK_REG: - return (unsigned)(gpu_sim_cycle + gpu_tot_sim_cycle); + return (unsigned)(m_gpu->gpu_sim_cycle + m_gpu->gpu_tot_sim_cycle); case CLOCK64_REG: abort(); // change return value to unsigned long long? // GPGPUSim clock is 4 times slower - multiply by 4 - return (gpu_sim_cycle + gpu_tot_sim_cycle)*4; + return (m_gpu->gpu_sim_cycle + m_gpu->gpu_tot_sim_cycle)*4; case HALFCLOCK_ID: // GPGPUSim clock is 4 times slower - multiply by 4 // Hardware clock counter is incremented at half the shader clock frequency - divide by 2 (Henry '10) - return (gpu_sim_cycle + gpu_tot_sim_cycle)*2; + return (m_gpu->gpu_sim_cycle + m_gpu->gpu_tot_sim_cycle)*2; case CTAID_REG: assert( dim_mod < 3 ); if( dim_mod == 0 ) return m_ctaid.x; |
