In former versions of OpenCV there was the function Stream::enqueueUpload that could be used to upload data to the GPU asynchronously together with CudaMe
Stream::enqueueUpload
CudaMe
It can be done now via void GpuMat::upload(InputArray arr, Stream& stream) method:
void GpuMat::upload(InputArray arr, Stream& stream)
cv::cuda::GpuMat d_mat; cv::cuda::HostMem h_mat; cv::cuda::Stream stream; d_mat.upload(h_mat, stream);