helllo,
If I declare the call config like below,
grid(20,30,1) and block(16,8,1) and
Kernel<<<grid,block>>>();
global void Kernel()
{
int idx = __umul24(blockIdx.x,blockDim.x) + threaIdx.x;
int idy = __umul24(blockIdx.y,blockDim.y) + threadIdx.y;
…
}
What are the maximum values of idx and idy??
Nico
2
All index values are zero-based, hence the ‘-1’
max idx = (20-1)*16 + (16-1) = 319
max idy = (30-1)*8 + (8-1) = 319
N.
I think max idy = (30-1)*8 + (8-1) = 239. right?
Nico
4
Yeah, sorry about that, the previous value must’ve still been in my clipboard when I pasted it :)
N.