CUDA Array cudaMallocArray Vs CudaAllocArray3D Is there a guideline on selecting MallocArray Vs Mall

For 1D and 2D textures. Is there a guideline on when to use cudaMallocArray versus cudaMallocArray3D (with unused dimensions set to 1).

How are the allocated memory structures different between the two ?

In general, I would like understand how one chooses between the following available memory allocation options (for textures)

  1. Linear memory Array (using cudaMalloc)

  2. Pitched Linear memory (cudaMallocPitch)

  3. cudaMallocArray

  4. cudaMallocArray3D

Appreciate if someone can point me to previous forum discussions that may have covered this.

Thank You.

  1. and 2) are same at most of conditions, but for alignment on device memory I often use cudaMallocPitch.

  2. is for storing data which could be used as a 2D texture reference, and 4) is ONLY for 3D texture reference.