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
|