No performance gain after using openMP on a program optimize for sequential running
Even if your program benefits from using OpenMP, you won’t see it because you are measuring the wrong time. clock() returns the total CPU time spent in all threads. If you run with four threads and each runs for 1/4 of the time, clock() will still return the same value since 4*(1/4) = 1. You … Read more