Hi I have a question about the clCreateBuffer function. The second argument of this function describes the usage of data in the buffer. Now say if it is CL_MEM_COPY_HOST_PTR, that means that a straight copy happens between the host and device, and after that there is not link/map between the host and device where to set data in the device from the host ptr. But the other two options USE_HOST_PTR & ALLOC_HOST_PTR are a bit confusing.

If I select USE_HOST_PTR does that mean the memory is allocated on the device? If so when does it copy the data from host to the device?
For ALLOC_HOST_PTR does it ever allocate memory on the device, it must at some point copy memory across to the device for execution, when is this?

Iam guessing that the most efficient method is CL_MEM_COPY_HOST_PTR, but offcourse you are assuming that you are not going to change the data.