i was just wondering why there is no cudaMemcpy3dToArray function. can anyone explain?

in cudaMemcpy3D, can the source be a ptr and the destination a cudaarray?

Look into the programming reference. There is the use of cudaMemcpy3D explained and you can copy linear memory to a CUDA Array.

i’ve seen the reference manual, but it is a little ambivalent. It sayas that if a CUDA Array is involved, the parameter extent shold be defined in terms of the elements, but if you look at the struct extent it says that it should be the size in bites.

The problem is that i can not make a copy from a memory array allocated using cudamalloc3d to a CUDA Array using cudamemcpy3d. how should i do the devicetodevice copy? any ideas?

use “cudaMemcpyDeviceToDevice” argument to “cudaMemcpy3D”