#define PARALLEL_SLICES 1
steady_clock::time_point start = steady_clock::now();
- for (int i = 0; i < 1000; ++i) {
+ unsigned num_iterations = 1000;
+ for (unsigned i = 0; i < num_iterations; ++i) {
unsigned num_slices = (WIDTH/8)*(HEIGHT/8)/BLOCKS_PER_STREAM;
glDispatchCompute(1, (num_slices+PARALLEL_SLICES-1)/PARALLEL_SLICES, 1);
}
glBindBuffer(GL_SHADER_STORAGE_BUFFER, 0); // unbind
printf("foo = 0x%x\n", glGetError());
- printf("Each iteration took %.3f ms.\n", 1e3 * duration<double>(now - start).count() / 1000);
+ printf("Each iteration took %.3f ms.\n", 1e3 * duration<double>(now - start).count() / num_iterations);
}