next up previous contents
Next: Argument Remapping Up: HPF and Procedures Previous: Aligning to Dummy Arguments

 

Mapping Function Results

Clearly, must be able to map array-valued FUNCTION results,

   MODULE Block_Dist_1D_Template_Onto_P
     !HPF$ PROCESSORS, DIMENSION(2)  :: P
     !HPF$ TEMPLATE, DIMENSION(4)    :: T
     !HPF$ DISTRIBUTE (BLOCK) ONTO P :: T
   END MODULE Block_Dist_1D_Template_Onto_p

   FUNCTION ArF(A,B)
    USE Block_Dist_1D_Template_Onto_P
    IMPLICIT NONE
     REAL, INTENT(IN) :: A(:), B(:)
     REAL, DIMENSION(SIZE(A)) :: ArF
     !HPF$ ALIGN A(:) WITH *T(:)
     !HPF$ ALIGN B(:) WITH *T(:)
     !HPF$ ALIGN ArF(:) WITH T(:)
       ...
   END FUNCTION ArF

Here the result of the function is aligned to one of the dummy arguments.

An explicit interface should always be given containing all mapping information relating to dummy arguments and the function result.

Return to corresponding overview page gif


next up previous contents
Next: Argument Remapping Up: HPF and Procedures Previous: Aligning to Dummy Arguments

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