Copies memory allocated by one allocator to memory allocated with a different allocator.
Normally, copy operations can be supported by directly copying buffers with the host CPU (e.g., kMemCopy). The kAlloc_Copy method additionally supports copy operations involving non-host memory domains (e.g. Cuda device memory). Note, direct copy operations between two distinct foreign memory domains are not supported; if required, these kinds of copy operations must be performed in two steps, using a temporary host memory buffer in between.
- Parameters
-
destAlloc | Allocator associated with destination memory. |
dest | Destination for the memory copy. |
srcAlloc | Allocator associated with source memory. |
src | Source for the memory copy. |
size | Size of memory block to be copied, in bytes. |
context | Context for copy operation (allocator specific; may be required by some foreign domain allocators). |
- Returns
- Operation status.