diff options
| -rw-r--r-- | src/abstract_hardware_model.h | 16 | ||||
| -rw-r--r-- | src/cuda-sim/cuda-sim.cc | 2 | ||||
| -rw-r--r-- | src/cuda-sim/ptx_sim.h | 2 |
3 files changed, 12 insertions, 8 deletions
diff --git a/src/abstract_hardware_model.h b/src/abstract_hardware_model.h index 9cb96f4..9ca747e 100644 --- a/src/abstract_hardware_model.h +++ b/src/abstract_hardware_model.h @@ -655,12 +655,16 @@ public: void do_atomic() { assert( m_isatomic && !m_empty ); - std::vector<per_thread_info>::iterator t; - for( t=m_per_scalar_thread.begin(); t != m_per_scalar_thread.end(); ++t ) { - dram_callback_t &cb = t->callback; - if( cb.thread ) - cb.function(cb.instruction, cb.thread); - } + for( unsigned i=0; i < m_config->warp_size; i++ ) + { + if( m_warp_active_mask.test(i) ) + { + dram_callback_t &cb = m_per_scalar_thread[i].callback; + if( cb.thread ) + cb.function(cb.instruction, cb.thread); + } + } + } void clear() { diff --git a/src/cuda-sim/cuda-sim.cc b/src/cuda-sim/cuda-sim.cc index ec5fb64..779d138 100644 --- a/src/cuda-sim/cuda-sim.cc +++ b/src/cuda-sim/cuda-sim.cc @@ -954,7 +954,7 @@ void ptx_thread_info::ptx_exec_inst( warp_inst_t &inst, unsigned lane_id ) if ( ptx_debug_exec_dump_cond<10>(get_uid(), pc) ) dump_regs(stdout); } - update_pc( pI->inst_size() ); + update_pc(); g_ptx_sim_num_insn++; ptx_file_line_stats_add_exec_count(pI); if ( gpgpu_ptx_instruction_classification ) { diff --git a/src/cuda-sim/ptx_sim.h b/src/cuda-sim/ptx_sim.h index 8ce8abc..4d54245 100644 --- a/src/cuda-sim/ptx_sim.h +++ b/src/cuda-sim/ptx_sim.h @@ -373,7 +373,7 @@ public: { return m_callstack.back().m_PC; } - void update_pc( unsigned nbytes ) + void update_pc( ) { m_PC = m_NPC; } |
