Memory Questions Question about texture Memory and copy memory to another device....

Hi guys,

Question 1:
Is there way to copy memory from a device to another device?
Example: I want to copy memory from my tesla to my Geforce card?
Or is this only possible if you copy first to your Host memory and then to your Device Memory?

Question 2:

So I read an image in CUDA, and now i want to do a denoising (SDK example) of the image.
The image is already stored in the CUDA memory. Now in the code of the denoising they are using textures.

That’s the way how the the imagedenoising is reading data in to the CUDA memory…
cutilSafeCall( cudaMemcpyToArray( cu_array, 0, 0, InputData, size, cudaMemcpyHostToDevice));

But i already stored the image!! So now i need to read the image back from the CUDA memory to the Host memory and copies it back to the CUDA memory.

So my question to you, is there no other possibility?

At the moment:
I read the image back from the CUDA memory to the Host

cutilSafeCall( cudaMemcpy( InputData, CUDA_img, size, cudaMemcpyDeviceToHost) );

And then copy this memory back to the device…

cutilSafeCall( cudaMemcpyToArray( cu_array, 0, 0, CUDAData, size, cudaMemcpyHostToDevice));

Best regards,
Jorn De Baerdemaeker

Hi,

the only way is device -> host -> another_device

You can make a cudaMemcpyToArray from device to device:

cutilSafeCall( cudaMemcpyToArray( cu_array, 0, 0, CUDA_img, size, cudaMemcpyDeviceToDevice));

Regards

Navier