Sets a threshold for the auto-parallelization of loops.
Linux and macOS:
- Is an integer whose value is the threshold for the auto-parallelization of loops. Possible values are 0 through 100.Ifnis 0, loops get auto-parallelized always, regardless of computation work volume.Ifnis 100, loops get auto-parallelized when performance gains are predicted based on the compiler analysis data. Loops get auto-parallelized only if profitable parallel execution is almost certain.The intermediate 1 to 99 values represent the percentage probability for profitable speed-up. For example,n=50 directs the compiler to parallelize only if there is a 50% probability of the code speeding up if executed in parallel.
- Loops get auto-parallelized only if profitable parallel execution is almost certain. This is also the default if you do not specifyn.
This option sets a threshold for the auto-parallelization of loops based on the probability of profitable execution of the loop in parallel. To use this option, you must also specify option
This option is useful for loops whose computation work volume cannot be determined at compile-time. The threshold is usually relevant when the loop trip count is unknown at compile-time.
The compiler applies a heuristic that tries to balance the overhead of creating multiple threads versus the amount of work available to be shared amongst the threads.