AnsweredAssumed Answered

pinned buffer OpenCL vs CUDA

Question asked by arvin99 on Jan 8, 2014
Latest reply on Jan 13, 2014 by nou

Hi,

I am new with OpenCL so maybe it is a stupid question.

I already know how to use pinned buffer, zero copy buffer, or device buffer in OpenCL.

I have a question that really make me confuse:


What is the different between using pinned host memory in OpenCL and pinned host memory in CUDA ??

    

After I do some research, I found that using pinned host memory in CUDA means you create data with cudaMalllocHost (location: pinned host memory) and send the data to the buffer on device (location: device memory).

It is explained at this link :http://devblogs.nvidia.com/parallelforall/how-optimize-data-transfers-cuda-cc/  and inside several CUDA books.

But, in OpenCL using pinned host memory means you create data with malloc (location: host memory) and send the data to the buffer on pinned host memory (location: pinned host memory).

Am I right?? 


And, if I create data with malloc in OpenCL, it must be moved from pageable memory to pinned memory and after that the transfer begin from pinned memory to buffer in pinned host memory is n't it??

This is according to image from link  :http://devblogs.nvidia.com/parallelforall/how-optimize-data-transfers-cuda-cc/:


pinned-1024x541

 


 



   

 

Message was edited by: Arvin Arvin

Outcomes