I have trouble understanding this concept. I've researched a lot online and the only thing I understood is that threads need to access consecutive data.
So if we have an array of 10000 integers, if thread i
accesses i
-th number of the array, then the memory will be coalescing.
What if instead of having 10000 threads for all the integers, we decide to have 500 threads where each thread accesses two consecutive integers? Will memory coalescing be possible in this case?
And what if we decide to allow a thread to access more than 2 values, for example 10?
How would memory coalescing behave in this case? And when does "consecutive access" stop being "consecutive" in the example I described above?
Thank you in advance