| 32 | |
| 33 | template <typename T> |
| 34 | T* dalloc(size_t n) { |
| 35 | T* p = nullptr; |
| 36 | ck(cudaMalloc(&p, n * sizeof(T)), "malloc"); |
| 37 | return p; |
| 38 | } |
| 39 | |
| 40 | template <typename T> |
| 41 | void up(T* d, const std::vector<T>& h) { ck(cudaMemcpy(d, h.data(), h.size() * sizeof(T), cudaMemcpyHostToDevice), "up"); } |
nothing calls this directly
no test coverage detected