next up previous contents
Next: Problems with Modules Up: Procedures Previous: Consequences

 

Templates and Modules

Modules are now supported by most compilers. Should make TEMPLATE s, PROCESSORS and DISTRIBUTE statements global:

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

Makes things easier,

    SUBROUTINE Subby(A,B,RES)
     USE Global_Mapping_Info
     IMPLICIT NONE
     REAL, DIMENSION(:,:), INTENT(IN) :: A, B
     REAL, DIMENSION(:,:), INTENT(OUT) :: RES
!HPF$ ALIGN WITH *T :: A, B, RES
       ...
    END SUBROUTINE Subby

Note: not for PURE procedures.

For more information, click here gif

Now try this question gif


next up previous contents
Next: Problems with Modules Up: Procedures Previous: Consequences

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