next up previous contents
Next: Argument Remapping Up: 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

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

For more information, click here gif


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

©University of Liverpool, 1997
Wed May 28 23:37:18 BST 1997
Not for commercial use.