The UNROLL directive tells the compiler's optimizer how many times to unroll a DO loop. This directive can only be applied to iterative DO loops.
The UNROLL takes the following form:
Rules and Behavior
The UNROLL directive must precede the DO statement for each DO loop it affects. No source code lines, other than the following, can be placed between the UNROLL directive statement and the DO statement:
If n is specified, the optimizer unrolls the loop n times. If n is omitted, or if it is outside the allowed range, the optimizer picks the number of times to unroll the loop.
The UNROLL directive overrides any setting of loop unrolling from the command line.
For More Information:
For details on syntax rules for all general directives, see Section 15.1.1.