load/store host data inside kernel?

Hi ,

I am wondering that somehow is it possible to read/write host data from kernel while running?

Thanks in advance

See zero-copy buffers

While it is tempting to use OpenCL 1.x zero-copy buffers (via the CL_MEM_USE_HOST_PTR or CL_MEM_ALLOC_HOST_PTR flags) to share data between the host and the kernel while the kernel is running, OpenCL 1.x provides no consistency guarantees in this scenario. So there’s no way to know when (if?) data written by one side will be visible to the other. I would look at the Shared Virtual Memory features in OpenCL 2.0 for this. OpenCL 2.0 has rules about consistency that make this scenario usable.