Perform an asynchronous copy from another GPU memory array to the GPU memory managed by this CudaBuffer instance using the stream provided.
| 112 | // Perform an asynchronous copy from another GPU memory array to the GPU |
| 113 | // memory managed by this CudaBuffer instance using the stream provided. |
| 114 | void CopyFromGPUArray(const T* data, const size_t size) { |
| 115 | Reserve(size); |
| 116 | CHECK_EQ(cudaMemcpyAsync(data_, |
| 117 | data, |
| 118 | size * sizeof(T), |
| 119 | cudaMemcpyDeviceToDevice, |
| 120 | context_->DefaultStream()), |
| 121 | cudaSuccess); |
| 122 | } |
| 123 | |
| 124 | // Copy data from the GPU memory managed by this CudaBuffer instance to CPU |
| 125 | // memory. It is the caller's responsibility to ensure that the CPU memory |
no outgoing calls
no test coverage detected