4 Replies Latest reply on Apr 16, 2012 7:02 AM by tzachi.cohen

    Pinned memory and CL_MEM_ALLOC_HOST_PTR for clEnqueueWriteBuffer()

    ginquo

      Hello,

       

      According to the AMD APP OpenCL Programming Guide, the best way to assure optimal buffer host-device write-performance is to use pinned memory using the CL_MEM_ALLOC_HOST_PTR flag with clCreateBuffer().

       

      But I'm currently unsure how this is supposed to work. The way I'm currently doing it leads to segmentation faults on both Linux and Windows with the AMD driver.

       

      Here's what I'm doing: