read the same position in global mem

What happened when some threads read the same position in global mem?
Will they wait in sequence?


If the threads belong do different warps, they will most likely not get in each others way (meaning no perf penalty). If they belong to the same halfwarp, then by definition you don’t have coalescing. The perf hit due to uncoalesced access will greatly exceed any serialization that may happen due to access to the same location, so, again, you’ll see no per impact of reading same vs different locations.

To summarize, this won’t be a performance issue either way.


If you know that beforehand, you may want to bind a texture. Reading texture at same location is very fast.

But the size of texture is limited…

if u are reading from the same block then it is a good idea to read one into shared mem in the begging of the kernel (or before u start using this data) then syncthreads, and use the shared mem. it is much faster.