I’m need to initialize some RGB images as 2D textures (so as float3 is not possible, I should use float4). I know that if I want to use both dimensions for indexing, I’ve to copy data from a cudaArray.
The problem is that I can’t find the right way to copy the data I have to the cudaArray.
I’m working with C++, so suppose that I’ve the data into 3 different arrays data.R(), data.G(), data.B(). Now, how can I do cudaMemcpyToArray???
Did I need to copy first data to a float4 array, float per float, and then use cudaMemcpyToArray?
Isn’t there any other more efficient way to do that?
Thanks in advanced!