Say i have a kernel with a 2 dimensional block grid:
THREAD_w = 8
THREAD_h = 16
dim3 block(THREAD_w, THREAD_h, 1);
This gives me 2x16 = 128 threads per block.
I’d like to figure out from threadIdx which warp or half-warp i’m in,
in order to optimize my code by selecting random branching to alternate but follow the same paths inside each warp.
The manual is unclear as to how this is indexed for 2d grids like my example above.
Can someone clarify ?