| 86 | typename byte_offset_type, |
| 87 | typename std::enable_if<IsMemCpy, int>::type = 0> |
| 88 | void init_input(ContainerMemCpy& h_input_for_memcpy, |
| 89 | ContainerCopy& /*h_input_for_copy*/, |
| 90 | std::mt19937_64& rng, |
| 91 | byte_offset_type total_num_bytes) |
| 92 | { |
| 93 | std::independent_bits_engine<std::mt19937_64, 64, uint64_t> bits_engine{rng}; |
| 94 | |
| 95 | const size_t num_ints = rocprim::detail::ceiling_div(total_num_bytes, sizeof(uint64_t)); |
| 96 | h_input_for_memcpy = std::vector<unsigned char>(num_ints * sizeof(uint64_t)); |
| 97 | |
| 98 | // generate_n for uninitialized memory, pragmatically use placement-new, since there are no |
| 99 | // uint64_t objects alive yet in the storage. |
| 100 | std::for_each( |
| 101 | reinterpret_cast<uint64_t*>(h_input_for_memcpy.data()), |
| 102 | reinterpret_cast<uint64_t*>(h_input_for_memcpy.data() + num_ints * sizeof(uint64_t)), |
| 103 | [&bits_engine](uint64_t& elem) { ::new(&elem) uint64_t{bits_engine()}; }); |
| 104 | } |
| 105 | |
| 106 | template<bool IsMemCpy, |
| 107 | typename ContainerMemCpy, |
nothing calls this directly
no test coverage detected