| 347 | |
| 348 | template <class DType> |
| 349 | void copy_to_cpu(DType* hptr, DType* dptr, std::vector<int> shape) { |
| 350 | CUDA_CHECK(cudaMemcpy( |
| 351 | hptr, dptr, |
| 352 | std::accumulate(shape.begin(), shape.end(), 1, std::multiplies<int>()) * |
| 353 | sizeof(DType), |
| 354 | cudaMemcpyDeviceToHost)); |
| 355 | } |
| 356 | |
| 357 | template <class DType> |
| 358 | void copy_to_cpu_async(DType* hptr, DType* dptr, std::vector<int> shape, |
nothing calls this directly
no outgoing calls
no test coverage detected