ivdep

Date:

09-24-2013

NAME

IVDEP - Cray Compiler directive; ignore vector dependencies in the loop immediately following the directive

SYNOPSIS

!DIR$ IVDEP [ SAFEVL=vlen | INFINITEVL ]
#pragma _CRI IVDEP [ SAFEVL=vlen | INFINITEVL ]

IMPLEMENTATION

Cray Linux Environment (CLE)

DESCRIPTION

When the IVDEP directive appears before a loop, the compiler ignores vector dependencies, including explicit dependencies, in any attempt to vectorize the loop. The directive applies to only the first loop that appears after the directive within the same program unit.

For array operations, the complete right-hand side (RHS) expression be evaluated before the assignment to the array or array section on the left-hand side (LHS). If possible dependencies exist between the RHS expression and the LHS assignment target, the compiler creates temporary storage to hold the RHS expression result. If an IVDEP directive appears before an array syntax statement, the compiler ignores potential dependencies and suppresses the creation and use of array temporaries for that statement. Using array syntax statements allows you to reference referencing arrays in a compact manner. Array syntax allows you to use either the array name, or the array name with a section subscript, to specify actions on all the elements of an array, or array section, without using DO loops.

Whether or not IVDEP is used, conditions other than vector dependencies can inhibit vectorization.

The IVDEP directive supports the following options:

vlen

Specifies a vector length in which no dependency will occur. This must be an integer between 1 and 1024 inclusive.

INFINITEVL

Specifies an infinite save vector length. That is, no dependency will occur at any vector length.

If no vlen is specified, the default vector length used in infinity.

If a loop with an IVDEP directive is enclosed within another loop with an IVDEP directive, the directive on the outer loop is ignored.

When the Cray compiler vectorizes a loop, it may reorder the statements in the source code to remove vector dependencies. When IVDEP is specified, the statements in the loop or array syntax statement are assumed to contain no dependencies as written, and the compiler does not reorder loop statements.

SEE ALSO

intro_directives(7)

Cray Fortran Reference Manual