next up previous contents
Next: The ON Clause Up: HPF_CRAFT Functional Summary Previous: Subprogram Interfaces

The INDEPENDENT Directive

The INDEPENDENT directive is part of HPF_CRAFT with the same semantics as in HPF. However, within INDEPENDENT loops the values of private data may vary from processor to processor. INDEPENDENT applied to FORALL has identical syntax and semantics as in HPF.

An HPF independent loop optionally may have a NEW clause. The NEW clause is not required by HPF_CRAFT for default (not explicitly mapped) data. In HPF_CRAFT data defaults to private so values may differ from processor to processor.

Private data has slightly different behavior than data specified in the NEW clause. The value of a private datum on each processor can be used beyond a single iteration of the loop. Private data may be used to compute local sums, for example. The values of data items named in a NEW clause may not be used beyond a single iteration. The NEW clause asserts that the INDEPENDENT directive would be valid if new objects were created for the variables named in the clause for each iteration of the loop. The semantics of the NEW clause are identical in HPF_CRAFT and HPF.

The semantics of an INDEPENDENT applied to loops containing private data references changes with respect to the private data. The change can be summarized to say that instead of indicating that iterations have no dependencies upon one-another, with respect to the private data, iterations on different processors have no dependencies upon one-another.