Developer Guide and Reference

Contents

vec-threshold, Qvec-threshold

Sets a threshold for the vectorization of loops.

Syntax

Linux and macOS:
-vec-threshold
[
n
]
Windows:
/Qvec-threshold
[[
:]
n
]
Arguments
n
Is an integer whose value is the threshold for the vectorization of loops. Possible values are 0 through 100.
If
n
is 0, loops get vectorized always, regardless of computation work volume.
If
n
is 100, loops get vectorized when performance gains are predicted based on the compiler analysis data. Loops get vectorized only if profitable vector-level 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 vectorize only if there is a 50% probability of the code speeding up if executed in vector form.
Default
-vec-threshold100
or
/Qvec-threshold100
Loops get vectorized only if profitable vector-level parallel execution is almost certain. This is also the default if you do not specify
n
.
Description
This option sets a threshold for the vectorization of loops based on the probability of profitable execution of the vectorized loop in parallel.
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.
Alternate Options
None

Product and Performance Information

1

Intel's compilers may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors. These optimizations include SSE2, SSE3, and SSSE3 instruction sets and other optimizations. Intel does not guarantee the availability, functionality, or effectiveness of any optimization on microprocessors not manufactured by Intel. Microprocessor-dependent optimizations in this product are intended for use with Intel microprocessors. Certain optimizations not specific to Intel microarchitecture are reserved for Intel microprocessors. Please refer to the applicable product User and Reference Guides for more information regarding the specific instruction sets covered by this notice.

Notice revision #20110804