Aborting kernel

Is there any way that a single thread can cause an entire kernel to abort? Or do all threads have to reach the final return statement?


Check a flag in global memory at the start of each thread.

In allot of situations such a solution can have unexpected outcome, for it to really work you need a global sync which is another tricky subject.


Thanks everyone, that answers my question