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?

Ben

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.

http://forums.nvidia.com/index.php?showtopic=168303

Thanks everyone, that answers my question

Ben