3 Replies Latest reply on Jun 1, 2011 1:29 PM by nareshsankapelly

    Difference between mapping and copying

    richeek.arya

      Hi all,

      I have a conceptual question regarding reading the data back from the GPU to host. Can I use clEnqueueReadBuffer() or clEnqueueMapBuffer() interchangeably? Which one is better? I read about both of them but  I am confused about the difference between mapping and copying?

      Also when we create buffer usign clCreateBuffer we have different flag options. For CL_MEM_USE_HOST_PTR table 4.3 of AMD OpenCL programming guide mentions:

      ------ Location ------ ------- Map Mode------ ------Map Location---
      ----Device Memory---- ----Copy---- ---- Pinned Host Memory---


      Could anyone please explain the significance of Map Location here? Can I use any of the clEnqueueReadBuffer() or clEnqueueMapBuffer() here to read the data back?

      I appreciate any help.

       

      Richeek