diff options
| author | Mengchi Zhang <[email protected]> | 2019-06-22 13:09:02 -0400 |
|---|---|---|
| committer | GitHub <[email protected]> | 2019-06-22 13:09:02 -0400 |
| commit | 067ca5fcce6ef4fa51ed3949dbffe62f60f6ad12 (patch) | |
| tree | b344dfc77c47d1d789ac503b0420f650c904972a /src | |
| parent | 3cac7525e1046285337e4dcf7fd8aa07c3a1f7c9 (diff) | |
| parent | 2f749f6969cd0582b7ac2bfe33309034185cc77c (diff) | |
Merge pull request #19 from echoedit/dev
Dev
Diffstat (limited to 'src')
| -rw-r--r-- | src/cuda-sim/instructions.cc | 1 | ||||
| -rw-r--r-- | src/cuda-sim/ptx_sim.h | 1 | ||||
| -rw-r--r-- | src/gpgpu-sim/shader.h | 7 |
3 files changed, 5 insertions, 4 deletions
diff --git a/src/cuda-sim/instructions.cc b/src/cuda-sim/instructions.cc index 186bb1e..46a262d 100644 --- a/src/cuda-sim/instructions.cc +++ b/src/cuda-sim/instructions.cc @@ -1528,6 +1528,7 @@ void bar_impl( const ptx_instruction *pIin, ptx_thread_info *thread ) op2_data = thread->get_operand_value(op2, op2, PRED_TYPE, thread, 1); op2_data.u32=!(op2_data.pred & 0x0001); pI->set_bar_id(op1_data.u32); + pI->set_bar_count(thread->get_ntid().x * thread->get_ntid().y * thread->get_ntid().z); switch(red_op){ case ATOMIC_POPC: thread->popc_reduction(ctaid,op1_data.u32,op2_data.u32); diff --git a/src/cuda-sim/ptx_sim.h b/src/cuda-sim/ptx_sim.h index d226fbe..a045a76 100644 --- a/src/cuda-sim/ptx_sim.h +++ b/src/cuda-sim/ptx_sim.h @@ -341,6 +341,7 @@ public: dim3 get_ctaid() const { return m_ctaid; } dim3 get_tid() const { return m_tid; } + dim3 get_ntid() const { return m_ntid; } class gpgpu_sim *get_gpu() { return (gpgpu_sim*)m_gpu;} unsigned get_hw_tid() const { return m_hw_tid;} unsigned get_hw_ctaid() const { return m_hw_ctaid;} diff --git a/src/gpgpu-sim/shader.h b/src/gpgpu-sim/shader.h index fde87b6..25b9607 100644 --- a/src/gpgpu-sim/shader.h +++ b/src/gpgpu-sim/shader.h @@ -116,7 +116,6 @@ public: m_done_exit=true; m_last_fetch=0; m_next=0; - m_inst_at_barrier=NULL; //Jin: cdp support m_cdp_latency = 0; @@ -173,8 +172,8 @@ public: address_type get_pc() const { return m_next_pc; } void set_next_pc( address_type pc ) { m_next_pc = pc; } - void store_info_of_last_inst_at_barrier(const warp_inst_t *pI){ m_inst_at_barrier = pI;} - const warp_inst_t * restore_info_of_last_inst_at_barrier(){ return m_inst_at_barrier;} + void store_info_of_last_inst_at_barrier(const warp_inst_t *pI){ m_inst_at_barrier = *pI;} + warp_inst_t * restore_info_of_last_inst_at_barrier(){ return &m_inst_at_barrier;} void ibuffer_fill( unsigned slot, const warp_inst_t *pI ) { @@ -264,7 +263,7 @@ private: bool m_valid; }; - const warp_inst_t *m_inst_at_barrier; + warp_inst_t m_inst_at_barrier; ibuffer_entry m_ibuffer[IBUFFER_SIZE]; unsigned m_next; |
