Inside a kernal function, suppose we have the following code:
// Block Index int bx = blockIdx.x; int by = blockIdx.y; // Thread Index int tx = threadIdx.x; int ty = threadIdx.y;
So, when the kernal is called, is it executed parallelly by all the threads so that the above variables have different values for different threads?
Or is it executed by all the blocks in parallel??
I’m not clear on how the kernal is executed and what the assignments blockIdx.x, threadIdx.x…etc mean?
Can I please get help on this? :mellow: