Basic HTML version of Foils prepared 26 September 1996

Foil 104 SUM, SUM_PREFIX and SUM_SCATTER defined

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


1 X=SUM(A) sums all elements of A and places result in scalar X
2 Y = SUM_PREFIX(A) sets array Y of same size as A so that Y(i) has the sum of all A(j) for 1 <= j <= i
3 Y = SUM_SCATTER(A,B, IND) sets array element Y(i) as the sum of array element B(i) plus those elements of A(j) where IND(j) = I
  • X = SUM_SCATTER( flux, X, INDEX) is equivalent to
  • FORALL (i=1:N)
    • X(INDEX(i)) = X(INDEX(i)) + flux(i)
  • END FORALL assuming INDEX(i) just permutes numbers 1 to N and has no repeated values

in Table To:


© 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