I am trying to use the void function
for (size_t round = 0; round < 5; round++) {
cpu_time_start = get_cpu_time();
wall_time_start = get_wall_time();
scan.assign_clusters(epsilon, mu);
cpu_time_end = get_cpu_time();
wall_time_end = get_wall_time();
...
}
The first time gives 300 seconds, and the next four timings - 0.000002 seconds. This means that the void function call is assign_clustersoptimized. How can I make my program execute this reusable function call every time and still use optimization for the rest of the code?
I usually do to save the result of this function and then print it, but since it is a function void, do I have the same option?
I use the following optimization flags: -std=c++0x -march=native -O2
source
share