1 Reply Latest reply on Oct 27, 2016 2:15 AM by dipak

    clEnqueueMapBuffer and CL_MEM_USE_HOST_PTR


      I have created a buffer with a pinned host memory buffer BUFFER using the CL_MEM_USE_HOST_PTR flag.

      When I map the buffer, can I assume that the returned pointer will always equal BUFFER ?

        • Re: clEnqueueMapBuffer and CL_MEM_USE_HOST_PTR

          Yes. As AMD OpenCL Optimization guide says:

 Copy Memory Objects:

          For CL_MEM_USE_HOST_PTR and CL_MEM_ALLOC_HOST_PTR the same map location is used for all maps; thus, the pointer returned is always in the same memory area.


          Also you can refer "OpenCL Memory Object Properties - Table 2 " in section "1.3.2 Placement"