Basic HTML version of Foils prepared August 7 98

Foil 34 Typical Uses of HPF Library

From DoD HPF Training -- 3. Parallel Constructs in HPF DoD Training and Others -- 1995-98. by Chuck Koelbel -- Rice University


Accumulations through indirection arrays
  • x = SUM_SCATTER( flux, x, nbr(1,1:n) )
  • x = SUM_SCATTER( -flux, x, nbr(2,1:n) )
  • ! Equivalent to the following
  • DO i = 1, n
    • x(nbr(1,i)) = x(nbr(1,i)) + flux(i)
    • x(nbr(2,i)) = x(nbr(2,i)) - flux(i)
  • END DO
Manipulating array-based sparse structures
  • inum(1:n) = MAX( iend(1:n)-ibeg(1:n)+1, 0 )
  • ibeg_new(1:n) = SUM_PREFIX(inum(1:n)) + 1
  • iend_new(1:n) = ibeg_new(1:n)+inum(1:n)-1
  • ! Moving the data left as exercise for reader



© 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 Aug 9 1998