Is it possible to allocate multidimensional arrays on GPU’s global memory?
Actually, I allocate 2 dimensional arrays using linear addressing, hence using just a dimension.
Then, as I need arrays of 2D arrays, I managed to do the following:
-A type a is allocated on host memory (  is static, but you might also consider it dynamic, it’s the same);
-A type **a_device is allocated on the device, in this case with 10sizeof(type ) size;
-For i=0…9 a[i] is allocated with the correct dimension (widthheight of 2D array)
-At last, I copy a’s contents into a_device’s ones, and it works.
Now, for further dimensions this trick is not possible, as I cannot access a_device[n].
Is there a way to allocate multidimensional arrays on device’s memory?