c++array, cudaarray, texture

Hi,
If I want to use 3D texture do I need use 3D cudaarray. If I use 3D cudaarray do I use 3D c++ array to transform the data from cpu to gpu?

Yes, you need to use a 3D array (allocated using cudaMalloc3DArray) if you want to read the texture with tex3D() - see the simpleTexture3D sample in the SDK.

You don’t need to use a 3D array on the host (it’s all linear anyway) - you can transfer the data in almost any layout using cudaMemcpy3D.