copying image from CPU to GPU // CUDA memory allocation

Hello,

I have a question regarding memory allocation on CUDA. Receiving an image from CPU calling dwImageStreamer_receiveCUDA(&frameCUDARaw, 10000, m_streamerInput2CUDA) function it does not seem to be necessary to allocate memory for dwImageCuda frameCUDARaw with cudaMallocPitch(). I’m just wondering why? When is it necessary to do memory allocation for dwImageCUDA?

Thanks!

Best,
Alexey

Dear Alexey,
Just for your information, Image streamer is used to transfer frames from producer to consumer. The producer actually allocates the memory. Using image streamer helps in avoiding duplicate memory allocations on consumer side and unneccessary data transfers.