| 158 | } |
| 159 | |
| 160 | int main() |
| 161 | { |
| 162 | // Initialize a random array of chars |
| 163 | const size_t in_bytes = 1000000; |
| 164 | char* uncompressed_data; |
| 165 | |
| 166 | cudaMallocHost(&uncompressed_data, in_bytes); |
| 167 | |
| 168 | std::mt19937 random_gen(42); |
| 169 | |
| 170 | // char specialization of std::uniform_int_distribution is |
| 171 | // non-standard, and isn't available on MSVC, so use short instead, |
| 172 | // but with the range limited, and then cast below. |
| 173 | std::uniform_int_distribution<short> uniform_dist(0, 255); |
| 174 | for (size_t ix = 0; ix < in_bytes; ++ix) { |
| 175 | uncompressed_data[ix] = static_cast<char>(uniform_dist(random_gen)); |
| 176 | } |
| 177 | |
| 178 | execute_example(uncompressed_data, in_bytes); |
| 179 | return 0; |
| 180 | |
| 181 | } |
nothing calls this directly
no test coverage detected