| 48 | |
| 49 | template<class T> |
| 50 | inline auto get_random_data(size_t size, T min, T max) |
| 51 | -> typename std::enable_if<std::is_integral<T>::value, std::vector<T>>::type |
| 52 | { |
| 53 | std::random_device rd; |
| 54 | std::default_random_engine gen(rd()); |
| 55 | std::uniform_int_distribution<T> distribution(min, max); |
| 56 | std::vector<T> data(size); |
| 57 | std::generate(data.begin(), data.end(), [&]() { return distribution(gen); }); |
| 58 | return data; |
| 59 | } |
| 60 | |
| 61 | template<class T> |
| 62 | inline void hip_read_device_memory(std::vector<T> &host_destination, T *device_source) |
nothing calls this directly
no test coverage detected