| 36 | return d; |
| 37 | } |
| 38 | template <typename T> std::vector<T> down(const T* d, size_t n) { |
| 39 | std::vector<T> h(n); |
| 40 | ck(cudaMemcpy(h.data(), d, n * sizeof(T), cudaMemcpyDeviceToHost), "download"); |
| 41 | return h; |
| 42 | } |
| 43 | uint16_t f2h(float f) { __half h = __float2half(f); return *reinterpret_cast<uint16_t*>(&h); } |
| 44 | |
| 45 | int bad = 0; |
no test coverage detected