Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Windows reports the total percentage of the CPU, that is, over all cores taken together. So, if your program runs one thread and it saturates one core of a four core machine, Windows will report 25%.

If your task is parallelizable, you can try adding

Parallelism().set(nproc=NN)

somewhere above the calculation. For "NN" substitute the number of threads you want to use.

Note that not all algorithms can be parallelized, so the directive might or might not help.