next up previous contents
Next: 2D Distribution Example Up: Data Distribution Previous: BLOCK Distribution

 

CYCLIC Distribution

Deal out elements of an array to processors in a round robin fashion

        PROGRAM Round_Robin
         REAL, DIMENSION(20)      :: A
 !HPF$ PROCESSORS, DIMENSION(4)   :: P
 !HPF$ DISTRIBUTE (CYCLIC) ONTO P :: A
   ....

   figure14933
Figure 35: Visualisation of CYCLIC Distribution

If an array, A has tex2html_wrap_inline29362 elements and is mapped onto tex2html_wrap_inline29364 processors each processor gets (a maximum) total of tex2html_wrap29356 separate elements. See Figure 35.

As in the previous section, each processor gets five elements, but this time a different set of elements are received. The elements are dished out in a round-robin fashion starting from processor 1. The diagram indicates the elements that each processor is given.

The formula for the maximum number of elements that a processor can receive is the same as for BLOCK distribution.

Return to corresponding overview page gif




next up previous contents
Next: 2D Distribution Example Up: Data Distribution Previous: BLOCK Distribution

©University of Liverpool, 1997
Wed May 28 20:20:27 BST 1997
Not for commercial use.