This is just cutesy on CPUs, but is a big part of GPU programming.
replies(1):
add<<<1, 1>>>(N, x, y);
All N adds are conceptually done in parallel, with no side effects. In practice, hundreds or thousands of adds are done simultaneously, depending on the available hardware.This is true branchless programming.
[1] https://developer.nvidia.com/blog/even-easier-introduction-c...