Basic HTML version of Foils prepared August 7 98

Foil 4 B. FORALL statements, etc.
The Single-Statement FORALL

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


Syntax:
  • FORALL ( index-spec-list [,mask-expr] ) forall-assignment
  • index-spec is int-variable = triplet-spec
  • forall-assignment is ordinary assignment or pointer assignment
Semantics:
  • Equivalent to array assignment in Fortran 90
  • For each value of indices, check the mask
  • Compute right-hand sides for unmasked values
  • Make assignments to left-hand sides for unmasked values
  • Multiple assignments to the same location are not standard-conforming (i.e. are undefined)
Note: FORALL is not a general-purpose parallel loop!



© 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