memory consistency in openCL

Does work-items access objects of global memory consistently. I mean to ask if I have a variable ‘x’ is passed with __global keyword to a kernel with 2 work-groups and each work-group having 5 work-items. The kernel code just performs the operation x=x+1;
At the end of kernel exection what will be the value of x. Will it always be 10?

Thanks

hi,
no it wont be 10.
without barrier or other synchronisation u will get random results.
be aware that barrier is only possible within a workgroup.

ciao
timo