vector

Date:

06-19-2023

NAME

vector, novector, VECTOR, NOVECTOR - Controls vectorization of DO loops. It may affect specific optimizations.

SYNOPSIS

!DIR$ VECTOR [clause[, clause]... ]
!DIR$ NOVECTOR
!dec$ vector [clause[, clause]... ]

DESCRIPTION

The novector directive suppresses compiler attempts to vectorize loops and array syntax statements. It overrides any other vectorization-related directives, as well as the -h vector and -O vectorn command line options. These directives are ignored if vectorization or scalar optimization has been disabled.

In Fortran, prior to CCE 9.0, the Fortran NOVECTOR directive applied to the rest of the program unit, unless subsequently superseded by a VECTOR directive, as described below. Beginning with CCE 9.0, the VECTOR and NOVECTOR directives apply only to the next loop. The Cray Fortran -h vector_classic option is provided in order to provide the pre-CCE 9.0 behavior and cause the VECTOR and NOVECTOR directives to behave as toggle switches, controlling vectorization for the remainder of the program unit unless superseded by the countervailing directive.

Prior to CCE 9.0, NOVECTOR applies to the rest of the program unit unless superseded by a VECTOR directive. When NOVECTOR has been used within the same program unit, VECTOR causes the compiler to resume its attempts to vectorize loops and array syntax statements. After a VECTOR directive is specified, automatic vectorization is enabled for all loop nests.

The VECTOR directive supports the following optional clauses:

ALWAYS

Vectorize the loop that immediately follows the directive. This directive states a vectorization preference and does not guarantee that the loop has no memory-dependence hazard. This directive has the same effect as the prefervector(7) directive.

ALIGNED

Directs the compiler to generate aligned data movement instructions for array references when vectorizing. For current INTEL processors, data alignment is necessary for efficient vectorization. Use with care to improve performance. If some of the access patterns are actually unaligned, using the ALIGNED clause may generate incorrect code. This directive also directs the compiler to ignore explicit and implicit vector dependencies.

UNALIGNED

Directs the compiler to generate unaligned data movement instructions for all array references when vectorizing.

SEE ALSO

intro_directives(7), prefervector(7)

Cray Fortran Reference Manual