next up previous contents
Next: Collapsing Dimensions Up: Passing Array Sections Previous: Array Arguments Example 1

 

Array Arguments Example 2

It is much simpler but less efficient to use prescriptive distributions.

Unless the HPF compiler is really smartgif, the following rewrite of Zubbie, using prescriptive distribution directives, will generate two remappings. What will probably happen is that the compiler will remap the dummy arguments so that they are distributed (BLOCK,BLOCK).

     SUBROUTINE Zubbie(x,y,z)
!HPF$ TEMPLATE, DIMENSION(4,6)            :: T
!HPF$ PROCESSORS, DIMENSION(2,2)          :: P
      REAL, INTENT(INOUT), DIMENSION(:,:) :: x, y
      REAL, INTENT(INOUT), DIMENSION(:,:) :: z
!HPF$ DISTRIBUTE (BLOCK,BLOCK) ONTO P     :: x, y, z
      ...

This will give the following distribution:

This means that all three arguments are remapped on entry and on exit which will be very inefficient.

Return to corresponding overview page gif


next up previous contents
Next: Collapsing Dimensions Up: Passing Array Sections Previous: Array Arguments Example 1

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