If a loop has been optimized by KAP and you note that KAP was
cautious and added unnecessary synchronization code, the C*$*
assert no sync
assertion may improve run-time speedup.
The following loop is an example:
DO 20 I = 1,N A (100 + I) = I C (100 + I) = A (I) D (100 + I) = C (I) 20 CONTINUE
KAP standard optimization synchronizes the loop by breaking it up in order to ensure the assignments occur in a valid order. However, this maximizes DO loop overhead, for example:
DO 2 I=1,N A(I+100) = I 2 CONTINUE DO 3 I=1,N C(I+100) = A(I) 3 CONTINUE DO 4 I=1,N D(I+100) = C(I) 4 CONTINUE
If, however, the value of N
will always be less than
or equal to 100, you can eliminate the synchronization overhead by
adding C*$* assert no sync
, as follows:
C*$* ASSERT NO SYNC DO 20 I=1,N A(I+100) = I C(I+100) = A(I) D(I+100) = C(I) 20 CONTINUE
Copyright © Digital Equipment Corporation. 1997.
All Rights Reserved.