2 Replies Latest reply on Jun 1, 2011 3:17 PM by SiegeLord


      Programming guide clarification

      So I read the section 4.5 in the APP programming guide and I am confused by the difference between options 3 and 5. Now keep that in mind that I am on Linux so I have no zero-copy support at this time (SDK 2.4).

      Option 3 suggests using two buffers, one created with CL_MEM_READ_WRITE and one with CL_MEM_ALLOC_HOST_PTR. The application interacts with the latter buffer, and then uses clEnqueueCopyBuffer to copy between two buffers. The former buffer is passed to the kernel. The guide suggests that this results in the maximum transfer times.

      Option 5 suggests using only the CL_MEM_ALLOC_HOST_PTR. The guide suggests that this results in transfers across the PCIe during the kernel execution.

      So my question is... should I be using option 3 in my code right now (without any zero-copy support) instead of option 5? Most of my buffers are initialized at the start of my code and are never touched again.