| 328 | |
| 329 | template <class DType> |
| 330 | void copy_to_gpu(DType* hptr, DType* dptr, std::vector<int> shape) { |
| 331 | CUDA_CHECK(cudaMemcpy( |
| 332 | dptr, hptr, |
| 333 | std::accumulate(shape.begin(), shape.end(), 1, std::multiplies<int>()) * |
| 334 | sizeof(DType), |
| 335 | cudaMemcpyHostToDevice)); |
| 336 | } |
| 337 | |
| 338 | template <class DType> |
| 339 | void copy_to_gpu_async(DType* hptr, DType* dptr, std::vector<int> shape, |
nothing calls this directly
no outgoing calls
no test coverage detected