diff --git a/test_conformance/device_execution/execute_block.cpp b/test_conformance/device_execution/execute_block.cpp index e10b7c6e..99589605 100644 --- a/test_conformance/device_execution/execute_block.cpp +++ b/test_conformance/device_execution/execute_block.cpp @@ -928,15 +928,16 @@ static const char* block_barrier[] = NL, " size_t gid = get_group_id(0);" NL, " size_t idx = gid*lsz;" NL, "" + NL, " res[tid]=lsz;" + NL, " barrier(CLK_GLOBAL_MEM_FENCE);" NL, " int (^kernelBlock)(int) = ^(int a)" NL, " {" - NL, " atomic_inc(res+idx);" + NL, " atomic_dec(res+idx);" NL, " barrier(CLK_GLOBAL_MEM_FENCE);" - NL, " return (int)abs(a - b) - (res[idx] != lsz ? 0 : 1);" + NL, " return (int)abs(a - b) - (res[idx] != 0 ? 0 : 1);" NL, " };" NL, "" NL, " int d = kernelBlock(2);" - NL, " barrier(CLK_GLOBAL_MEM_FENCE);" NL, " res[tid] = d;" NL, "}" NL