Cuda atomics change flag
It looks to me like what you want is a “critical section” in your code. A critical section allows one thread to execute a sequence of instructions while preventing any other thread or threadblock from executing those instructions. A critical section can be used to control access to a memory area, for example, so as … Read more