Best way to transfer pictures to the kernel ?

Discussion created by spectral on Sep 10, 2010
Latest reply on Sep 14, 2010 by douglas125


We have an application that must be able to work on image (texture) and it should run on CPU and GPU.

So, I would like to know if there is a way to efficiently transfer theses data to the kernel ?

1 - If I'm on the CPU, I transfer an array of bytes as any other information.
This way it work too for the GPU.

2 - If I'm on the GPU, I can use OpenGL interop ! But it will not work on the CPU !!!

So, is there a way to create one unique method to transfer and to work on theses data without looking if we are on the CPU or GPU?

If I'm on the GPU, will I got better performance if I use textures ? Or it is better to have my image in global memory ?