| 84 | } |
| 85 | |
| 86 | bool HostExecutor::Memcpy(Stream *stream, void *host_dst, |
| 87 | const DeviceMemoryBase &gpu_src, uint64 size) { |
| 88 | // Enqueue the [asynchronous] memcpy on the stream (HostStream) associated |
| 89 | // with the HostExecutor. |
| 90 | void *src_mem = const_cast<void *>(gpu_src.opaque()); |
| 91 | AsHostStream(stream)->EnqueueTask( |
| 92 | [host_dst, src_mem, size]() { memcpy(host_dst, src_mem, size); }); |
| 93 | return true; |
| 94 | } |
| 95 | |
| 96 | bool HostExecutor::Memcpy(Stream *stream, DeviceMemoryBase *gpu_dst, |
| 97 | const void *host_src, uint64 size) { |
nothing calls this directly
no test coverage detected