Refer - https://developer.nvidia.com/blog/how-optimize-data-transfers-cuda-cc/ - https://docs.nvidia.com/cuda/cuda-c-best-practices-guide/index.html#data-transfer-between-host-and-device
Refer