I am some confusion on the use of memory flags that i want to be clear with.
1. CL_MEM_USE_HOST_PTR - it is only valid if the host pointer is not null. If, specified , it indicates that the application wants the OpenCL implementation to use memory referenced by the host pointer as the storage bits for the memory object. Does it mean that memory object created on the device basically refers to the memory initialized on the host and the memory resides on the host, no memory data is copied to the device from the host.
2. CL_MEM_ALLOC_HOST_PTR - specifies that the buffer should be allocated in from host-accessible memory. Does it mean that buffer will be allocated on the device using the host memory , but no memory data will be copied to the device ?
3. CL_MEM_COPY_HOST_PTR - if specified, then it indicates that the application wants the OpenCL implementation to allocate memory for the memory object and copy data from memory referenced by host pointer. It means that memory object is allocated on the device and data is copied from the host to device while the creation of the buffer.
Did i understand it right?