Basic HTML version of Foils prepared 26 September 1996

Foil 112 PURE Functions in HPF

From HPCC Software Technologies Fall 96 -- Overview and HPF Delivered Lectures of CPS615 Basic Simulation Track for Computational Science -- 26 September 96. by Geoffrey C. Fox


PURE functions have no side effects
  • ALL Intrinsics are PURE
DO loops can call any functions and parallelism unclear as function call can destroy parallelism
  • DO I=1,1000
    • A(I) = FUNC(A(I-1),X)
  • END DO
If FUNC alters A(I-1) or in fact A(any index except I), then this loop cannot be easily parallelized
FORALL statements can only call PURE functions and these must NOT define any global (e.g. any element of A in example) or dummy (A(i-1) or X) variable
  • PURE functions can only INHERIT distribution and alignment statements



© Northeast Parallel Architectures Center, Syracuse University, npac@npac.syr.edu

If you have any comments about this server, send e-mail to webmaster@npac.syr.edu.

Page produced by wwwfoil on Sun Feb 22 1998