next up previous
Next: AssertInstrument Up: Polaris Assertions and Previous: AssertPrivateRefs

AssertReadOnlyRefs

The AssertReadOnlyRefs assertion describes reference sites within a loop which access the private portion of an array. Any given array can have regions which are flagged ``private'', ``read-only'', ``shared'' and ``reduction'' within a given loop. Accordingly, expressions within the loop can access these different parts. In order for a loop to be parallelized, we require that a single access site refer only to a single of these parts. When a reference site is identified as accessing only the read-only section of an array, an AssertPrivateRefs assertion is inserted for the array.

The AssertReadOnlyRefs assertion includes a loop label and a list of array reference expressions, which are accessing the read-only portion of those arrays with respect to that loop. The array reference expressions in the loop which match those on the assertion will be considered to access the read-only section of the given array.

The CSRD directive corresponding to the AssertPrivateRefs assertion appears after the DO statement to which it refers. An example of the CSRD$ directive for this assertion is:

CSRD$ READ_ONLY_REFS ('ADDUP_do#1', a(k), b(k))

An example of its usage is as follows:

CSRD$ PARALLEL (J)
CSRD$ LOOPLABEL 'ADDUP_do#1'
      DO J = 1, N
CSRD$ FIRSTVALUE q, z(1:m:1)
CSRD$ PRIVATE a(1:m), b(1:m), x, y
CSRD$ LASTVALUE b(1:m:1), a(1:m:1)
         . . . 
CSRD$ LOOPLABEL 'ADDUP_do#1#1'
         DO K = 1, M
CSRD$ READ_ONLY_REFS ('ADDUP_do#1', a(k), b(k))

      END DO



Jay Hoeflinger
Mon Apr 21 11:52:18 CDT 1997