# DISTRIBUTE POINT

General Compiler Directive: Specifies loop distribution. It suggests a location at which a DO loop can be split.

!DIR$ DISTRIBUTE POINT

Loop distribution causes large loops to be distributed (split) into smaller ones. The resulting loops contain a subset of the instructions from the initial loop. Loop distribution can enable software pipelining to be applied to more loops. It can also reduce register pressure and improve both instruction and data cache use.

If the directive is placed before a loop, the compiler will determine where to distribute; data dependencies are observed.

If the directive is placed inside a loop, the distribution is performed after the directive and any loop-carried dependencies are ignored. Currently only one distribute directive is supported if the directive is placed inside the loop.

## Example

    !DIR$ DISTRIBUTE POINT
       do i =1, m
         b(i) = a(i) +1
         ....
         c(i) = a(i) + b(i) ! Compiler will decide
         ! where to distribute.
         ! Data dependencies are
         ! observed
         ....
         d(i) = c(i) + 1
       enddo
       do i =1, m
         b(i) = a(i) +1
         ....
    !DIR$ DISTRIBUTE POINT
         call sub(a, n)! Distribution will start here,
         ! ignoring all loop-carried
         ! depedencies
         c(i) = a(i) + b(i)
         ....
         d(i) = c(i) + 1
       enddo

Parent topic: C to D

## See Also

General Compiler Directives
Syntax Rules for Compiler Directives
Rules for General Directives that Affect DO Loops