quick question: warp mapping for 2-D kernel

I have a 2D kernel with 12x12 block dimensions; which threads are assigned to which warps? I’m currently getting a lot of divergent branches, and wish to reduce it. Sorry my internet search skills are particularly bad…

Thanks,
Nicholas

I wouldn’t mind having a definitive answer to this either.

I’ve always assumed the warp a thread belongs to is as follows: (note: I’ve got nothing to prove this or back it up, just my assumption)

[codebox]unsigned int warp = (threadIdx.y * blockDim.x + threadIdx.x) / 32;[/codebox]

All the answers are in the programming guide…

From chapter 2, under the heading “Thread Hierachy”