VECTOR ALIGNED and VECTOR UNALIGNED

General Compiler Directive: Specifies that all data is aligned or no data is aligned in a DO loop.

Syntax

cDEC$ VECTOR ALIGNED

cDEC$ VECTOR UNALIGNED

c

Is one of the following: C (or c), !, or *. (See Syntax Rules for Compiler Directives.)

Description

These directives override efficiency heuristics in the optimizer. The qualifiers UNALIGNED and ALIGNED instruct the compiler to use, respectively, unaligned and aligned data movement instructions for all array references. This disables all the advanced alignment optimizations of the compiler, such as determining alignment properties from the program context or using dynamic loop peeling to make references aligned.

Caution iconCaution

The directives VECTOR ALIGNED and VECTOR UNALIGNED 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.

Furthermore, instructing the compiler to implement all array references with aligned data movement instructions will cause a runtime exception if some of the access patterns are actually unaligned.

See Also