Warp in two dimension

Well, i’ve been working on two dimensional blocks; however, i noticed that there is a big amount of divergent branches; hence, I think I don’t know how warp works in two dimension.

in 1 dimension, every 32 threads are considered as one warp, what about in two dimension? In which order should the threads be included in a warp?
For example;
s_data[0][0] s_data[0][1] … s_data[0][15]
s_data[1][0] s_data[1][1] … s_data[1][15]

are these in the same warp if they were called by threads?? (consider blocksize as 16x16)

thanks in advance.


Loleeta

hi,
the Programming Guide (2.3) says the folowing:
The way a block is split into warps is always the same; each warp contains threads of consecutive, increasing thread IDs with the first warp containing thread 0. Section 2.2 describes how thread IDs relate to thread indices in the block.

thus, given a 16x16 block, you have 16 halfwarps, 8 warps.
the threads with treadIDx.y ={0,1} form the first warp, treadIDx.y ={2,3} the second warp and so on

greetings,
downforme

Thank you,
That’ll help :)