[Moved] Passing value from device to host during kernel execution

moved to programming forum:

https://devtalk.nvidia.com/default/topic/1031335/cuda-programming-and-performance/how-to-update-host-memory-variable-from-device-to-host-during-kernel-execution-in-opencl/