7.2.8 C*$* assert no sync

If a loop has been optimized by KAP and you note that KAP was cautious and added unnecessary synchronization code, as shown in the following example, the C*$* assert no sync assertion may improve run-time speedup.

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 as follows:

   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 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


Previous Page | Next Page | Contents | Index |
Command-Line Qualifiers

Copyright © Digital Equipment Corporation. 1999. All Rights Reserved.