HTML version of Scripted Foils prepared 11 November 1996

Foil 27 Reductions in INDEPENDENT DO Loops

From CPS615-End of Numerical Integration and Very End of HPF Delivered Lectures of CPS615 Basic Simulation Track for Computational Science -- 24 October 96. by Geoffrey C. Fox *
Secs 116.6
1 Many applications of INDEPENDENT DO loops do require reductions as they are typically calculating independently quantities but storing results as parts of various averages
2 e.g. in High Enegry Physics Data Analysis, each measured event can be computed via an INDEPENDENT DO but one wishes to find a particular observable (histogram, scatterplot) which is averaged over each event
3 Financial modelling is similar
4 x = 0
5 !HPF$ INDEPENDENT, NEW(xinc), REDUCTION(x)
6 do i = 1 , N
  • call sub(i, xinc)
  • x = x + xinc
7 END DO
8 xinc is a separate new variable each iteration but result is accumulated into global x

Table Font Size


© 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 Fri Aug 15 1997