Initializes an image with random values
| 94 | |
| 95 | // Initializes an image with random values |
| 96 | void initImage(ImageBuffer& image, Random& rng, float minValue, float maxValue) |
| 97 | { |
| 98 | for (size_t i = 0; i < image.getSize(); ++i) |
| 99 | image.set(i, minValue + rng.getFloat() * (maxValue - minValue)); |
| 100 | image.toDevice(); |
| 101 | } |
| 102 | |
| 103 | // Runs a benchmark and returns the total runtime |
| 104 | double runBenchmark(DeviceRef& device, const Benchmark& bench) |
no test coverage detected