3d arrays in memory

Hello to all,

I have to deal with a 2D grid of 3D vertices and I want use double precision in my code.
The double3 data-type does not exist (because it would be 192-bit, i suppose)
For this reason I would like to use 3d arrays in device memory.
In other words, I want map the 2D-mesh onto a 3D matrix of depth 3 (x,y,z for each vertex), while
width and height of the matrix are the same of the mesh.
I guess in this way it should be easy to get coalesced accesses to the global memory,
isn’t it?

Could you suggest me another way?
Can I create a 3d array also in shared memory?
Could you provide me some source code examples of 3d memory usage?
In order to get better performance, width*height of the matrix should be multiple of half-warp?

Thanks in advance

Francesco

ops…i forgot an important question :)

how have I to allocate the 3d array on the host?
It should be a double*** ?

Thank you again

Francesco