cudaMalloc3D is cudaMallocPitch faster than cudaMalloc3D


I’m using both 2D and 3D objects, and looking at simplifying my code as much as possible. My question is, is it important (and beneficial speedwise) to allocate the 2D objects with cudaMallocPitch (and copy with cudaMemcpy2D etc.) or would it be just as good to allocate them with cudaMalloc3D (as I will be doing this anyway with the 3D objects) but with depth equal to 1? Presumably the memory taken up would be the same, is there any real advantage of letting the GPU know its working with a 2D object?

Thanks in advance,