std :: ml::gpu_cuda
Function std::cuda_copy_to_device
int cuda_copy_to_device(unsigned long dev, []const unsigned char host)Byte copies (host.len bytes) between host memory and a raw device address (e.g. a CudaBuf's dev plus an offset, or memory from cuMemAlloc), through the same path as cuda_write / cuda_read (pinned lanes from 1 MiB up). cuda_copy_to_device returns once 'host' may be reused; cuda_copy_to_host waits for queued work first. 1 on success.