|
|
|
|
|
by geon
4404 days ago
|
|
> On a GPU, you get things like both branches execute, but then it just throws away the half that shouldn't have run It's not that weird. You don't really have thousands of parallell processors, but a single processor, operating on thousands of values. (Like SIMD on steroids.) Since all operations must be done identically on all values, a "branch" is really doing both branches and recombining them with a mask of equally many booleans - as you say "throwing away" the unwanted branch. |
|