6.3.6 C*$* assert do prefer (serial)

The C*$* assert do prefer (serial) assertion tells KAP to prefer serial ordering for the DO loop immediately following this assertion. Unlike C*$* assert do (serial) , assert do prefer (serial) does not inhibit optimization of outer loops.

The following code example shows how C*$* assert do prefer (serial) works:

DO 100 i=1,N
           DO 100 J = 1, N
C*$* ASSERT DO PREFER (SERIAL)
            DO 200 K = 1, N
                X(I,J,K) = X(I,J,K) * Y(I,J)
      200      CONTINUE
               DO 300 K = 1, N
               X(I,J,K) = X(I,J,K) + Z(I,K)
      300      CONTINUE
      100      CONTINUE

The C*$* assert do prefer (serial) assertion allows optimization over the whole loop nest, while trying to keep the DO 200 K loop serial. Compare this example with the C*$* assert do (serial) example to see how the two assertions produce different results with identical loop structures.


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