summaryrefslogtreecommitdiff
path: root/src/cuda-sim/instructions.cc
diff options
context:
space:
mode:
authorMengchi Zhang <[email protected]>2019-06-20 14:06:27 -0400
committerMengchi Zhang <[email protected]>2019-06-20 20:38:12 -0400
commitdc3c13e2d29ae296394ace75b2a4bf3a3c1da027 (patch)
tree216a70b0166d6ea5bcc3aee03d1a98d516733f27 /src/cuda-sim/instructions.cc
parent632bdaab79b9c1fd51ef8152aa00209f76c03101 (diff)
Fix bug for bar.red.op.pred
Signed-off-by: Mengchi Zhang <[email protected]>
Diffstat (limited to 'src/cuda-sim/instructions.cc')
-rw-r--r--src/cuda-sim/instructions.cc1
1 files changed, 1 insertions, 0 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);