Is it possible to use cudaMemcpy for device to host copies inside kernel?

Hi, I heard that cudamemcpy is supported in device code for device to device copies. Is it possible to use cudamemcpy inside a kernel for device to host copies?

Thanks

No.

http://docs.nvidia.com/cuda/cuda-c-programming-guide/index.html#api-reference

“Only device-to-device memcpy is permitted”