MCPcopy Create free account
hub / github.com/NVIDIA/nvcomp / main

Function main

examples/low_level_quickstart_example.cpp:160–181  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

158}
159
160int 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}

Callers

nothing calls this directly

Calls 1

execute_exampleFunction · 0.85

Tested by

no test coverage detected