boolean vector short-circuit evaluation.

I have been trying to do something like this but I don’t get as efficient as I would like.
Let’s suppose I have a vector with zeros or ones. I want to scan the vector. If I find a one, exit.
I don’t want to process a huge vector when the one is at the beginning.

Is there any way I can abort a kernel or do some kind of short-circuit evaluation, which having to wait until all the blocks have been executed?