thanks for your answer. i was abke to rearrange my threads so that one thtead only mod. one uint8.
in the case of nearest neighbors this is mich more difficult, since i
do not know what neighbor i will find in a specific thread.
i also tried to include semaphores but somehow these does not work correctly in opencl.
do you know if the atomic_or is able to do the synchronization?
i will try this, and report if it works.
thanks and ciao