next up previous contents
Next: CYCLIC Distribution Up: Data Distribution Previous: DISTRIBUTE Directive

 

BLOCK Distribution

Give equal sized chunks of an array to each processor. For example,

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

   figure14907
Figure 34: Visualisation of BLOCK Distribution

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

Here, the array has 20 elements and this is distributed blockwise onto a four element processor chain. This means that by using the above formula each processor gets a block of 5 elements. The first processor gets the first block, a(1:5), the second gets elements A(6:10) and so on.

Return to corresponding overview page gif


next up previous contents
Next: CYCLIC Distribution Up: Data Distribution Previous: DISTRIBUTE Directive

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