The problem with passing array sections to procedures is how to describe the current mapping of the dummy arguments. The example below specifies an alignment between the actual arguments: B and Res and the align-target, A. In order to avoid any remapping when the subroutine Zubbie is invoked, the relationship (alignment) between its dummy arguments should be fully described. Specifying this alignment is going to be non-trivial due to the way in which the actual arguments are referenced (sectioned).
REAL, DIMENSION(4,6) :: A, B REAL, DIMENSION(2,3) :: Res !HPF$ PROCESSORS, DIMENSION(2,2) :: P !HPF$ ALIGN B(:,:) WITH A(:,:) !HPF$ ALIGN Res(:,:) WITH A(::2,::2) !HPF$ DISTRIBUTE (BLOCK,BLOCK) ONTO P :: A, B, Res ... CALL Zubbie(A(1:2,1::2),B(3:4,2::2),Res)
If we require a descriptive distribution, what should interface look like?
Return to corresponding overview page