Given the following assignments:
A(2:99) = (A(:98)+A(3:))/2 ! neighbour calculations B(22:56)= 4.0*ATAN(1.0) ! section of B calculated C(:) = SUM(D,DIM=1) ! Sum down a column
Assuming the `owner-computes' rule, the following distributions would be examples of good HPF programming,
!HPF$ DISTRIBUTE (BLOCK) ONTO P :: A !HPF$ DISTRIBUTE (CYCLIC) ONTO P :: B !HPF$ DISTRIBUTE (BLOCK) ONTO P :: C ! or (CYCLIC) !HPF$ DISTRIBUTE (*,BLOCK) ONTO P :: D ! or (*,CYCLIC)
For more information, click here