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

   figure12594
Figure 18: Visualisation of BLOCK Distribution

If an array, A has tex2html_wrap_inline23600 elements and is mapped onto tex2html_wrap_inline23602 processors each processor gets a block of (a maximum) of tex2html_wrap23594 elements. See Figure 18.

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.


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

Adam Marshall ©University of Liverpool, 1996
Fri Dec 6 15:03:35 GMT 1996
Not for commercial use.