There are many cudaMemcpy variants which can be seen at NVIDIA CUDA Library: cudaMemcpy. Variants include functions such as cudaMemcpy2D (which copies a 2D matrix from one memory area to another), cudaMemcpyAsync (which is asynchronous on the host and can return before the copy completes), and many others.
Note that almost every function also includes an asynchronous variant. Many of the functions also take a cudaMemcpyKind argument (one of cudaMemcpyHostToHost, cudaMemcpyHostToDevice, cudaMemcpyDeviceToHost, or cudaMemcpyDeviceToDevice), which specifies the direction the copy is being performed.
cudaMemcpy
should remind you of message passing.This comment was marked helpful 0 times.
For now, implemented as a DMA.
This comment was marked helpful 0 times.
There are many
cudaMemcpy
variants which can be seen at NVIDIA CUDA Library: cudaMemcpy. Variants include functions such ascudaMemcpy2D
(which copies a 2D matrix from one memory area to another),cudaMemcpyAsync
(which is asynchronous on the host and can return before the copy completes), and many others.Note that almost every function also includes an asynchronous variant. Many of the functions also take a
cudaMemcpyKind
argument (one ofcudaMemcpyHostToHost
,cudaMemcpyHostToDevice
,cudaMemcpyDeviceToHost
, orcudaMemcpyDeviceToDevice
), which specifies the direction the copy is being performed.This comment was marked helpful 0 times.