Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Typically in SIMT, all lanes in a "simd" (aka subgroup in Vulkanspeak) share the same program counter. However, there is an execution mask so not all lanes are active. Thus, to simulate "if A then B else C", you evaluate A for each lane to derive a mask, jump to C if the mask is empty, evaluate B only for the enabled lanes, invert the mask, skip over C if the mask is then empty, and evaluate C only for the enabled lanes. Loops also work, with similar logic (the real loop terminates when the predicate is false for all lanes).


Consider applying for YC's Winter 2027 batch! Applications are open till November 2.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: