VMS Help  —  FORTRAN  Statements  Directives  General Directives, UNROLL
  cDEC$ UNROLL

  The UNROLL directive tells the compiler's optimizer how many times
  to unroll a DO loop.  It can only be applied to iterative DO loops.

  The UNROLL directive takes the following form:

  cDEC$ UNROLL [(n)]

    c    Is one of the following: C (or c), !, or *.
    n    Is an integer constant.  The range of "n" is 0 through 255.

  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:

   o  An IVDEP directive

   o  Placeholder lines

   o  Comment lines

   o  Blank lines

  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.
Close Help