Basic HTML version of Foils prepared August 7 98

Foil 10 Determinate Behavior of FORALL

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


Consider the statement:
  • FORALL ( i = 1:n ) a(ix(i)) = a(i)
If ix has no repeated values (e.g. ix is a permutation), this is well-defined
  • Note that a(i) is always the łold˛ value, not the new one computed elsewhere in the FORALL
If ix has repeated values (e.g. ix(i)=i/2), this is not defined by HPF
  • The compiler may take any action it feels appropriate
  • Assigning one of the possible values is appropriate
  • Reporting an error is appropriate
  • Assigning a random number is appropriate



© 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