I want to learn more about Loading Data Structures in CUDA, especially loading 2D arrays examples and came across a PDF on loading structured data by Nvidia
“Loading Structured Data Efficiently With Cuda”
When you want to load an array of structures from global memory to shared memory:
Just use integer pointers to cast the src and destination and load the array of structures as array of integers into shared memory(no matter what data-types the structure carries)! Now, u got all coalescing in place!
The only restriction is that “n*sizeof(struct)” has to be a multiple of sizeof(int) – you can always pad it to get it!
Once you are in shared memory - it does NOT matter much (as much as global memory)
:smile2: