Intel® Fortran Compiler XE 13.1 User and Reference Guides
General Compiler Directive: Overrides default heuristics for vectorization of DO loops. It can also affect certain optimizations.
cDEC$ VECTOR [clause[[,] clause]...]
Is one of the following: C (or c), !, or * (see Syntax Rules for Compiler Directives).
Is an optional vectorization or optimizer clause. It can be one or more of the following:
The VECTOR and NOVECTOR directives control vectorization of the DO loop that directly follows the directive.
The VECTOR directive should be used with care. Overriding the efficiency heuristics of the compiler should only be done if you are absolutely sure the vectorization will improve performance.
The compiler normally does not vectorize DO loops that have a large number of non-unit stride references (compared to the number of unit stride references).
In the following example, vectorization would be disabled by default, but the directive overrides this behavior:
!DEC$ VECTOR ALWAYS
do i = 1, 100, 2
! two references with stride 2 follow
a(i) = b(i)
There may be cases where you want to explicitly avoid vectorization of a loop; for example, if vectorization would result in a performance regression rather than an improvement. In these cases, you can use the NOVECTOR directive to disable vectorization of the loop.
In the following example, vectorization would be performed by default, but the directive overrides this behavior:
do i = 1, 100
a(i) = b(i) + c(i)