When I create a buffer with CL_MEM_COPY_HOST_PTR, do I have to still enqueue the memory object to do the actual copying? In the MatrixMultiplication example the buffer is created using CL_MEM_USE_HOST_PTR and the object is never enqueued for writing.
More confusing is BinarySearch. outputBuffer is created as CL_MEM_WRITE_ONLY, but it is called as an arg to clEnqueueWriteBuffer. Why? The kernel can't read it.