9.1.1 Original Program Listing (O)

The o switch requests an annotated listing of the original program, for example:

 KAP/Digital_VMS_F  V3.1 k271625 970317  ATIMESB  Source   05-Apr-1997 09:31:22
 Page 1

 Footnotes  Actions   DO Loops  Line

                                 1
                                 2   C Simple Matrix Multiply example.
                                 3
                                 4     PROGRAM ATIMESB
                                 5
                                 6     PARAMETER M=500, N=400, P=500
                                 7
                                 8     DIMENSION A(1:M,1:N),B(1:N,1:P),C(1:M,1:P)
                                 9
                                10
                                11   C Initialize the matrices
                                12
 1                    +---------13    DO 10 J=1,N
 2          SO        !+--------14      DO 10 I=1,M
            SO        !*        15      A(I,J) = 1.5
                      !*________16   10   CONTINUE
                                17
 1                    +---------18    DO 20 J=1,P
 2          SO        !+--------19      DO 20 I=1,N
            SO        !*        20      B(I,J) = 3.0
                      !*________21   20   CONTINUE
                                22
                                23   C Compute C = A * B
                                24
            SO                  25    CALL MATMUL(A, M, B, N, C, P)
                                26    END

 Abbreviations Used
  SO       scalar optimization

 Footnote List
   1: not vectorized             Not an inner loop.
   2: scalar optimization        Loop unrolled 4 times to improve scalar performance.

 KAP/Digital_VMS_F  V3.1 k271625 970317  ATIMESB  Source   05-Apr-1997  09:31:22
 Page 2

 Footnotes     Actions     DO    Line
                           Loops
                                 27
                                 28
                                 29   SUBROUTINE MATMUL(A, LDA, B, LDB, C, LL)
                                 30   REAL A(LDA,LDB), B(LDB,LL), C(LDA,LL)
                                 31   INTEGER LDA,LDB,LL
                                 32
 1 2 3 4 5 6   NO SO        +----33   DO 20 J=1,LL
 1 3 4 5 6     NO LR SO     !+---34     DO 20 I=1,LDA
               SO           !*   35     C(I,J) =0.0
 1 5 6 7       NO LR SO INF !*+--36       DO 20 K=1,LDB
 8             DD SO        !*!  37       C(I,J) = C(I,J) + ( A(I,K) * B(K,J) )
                            !*!__38 20   CONTINUE
                                 39
                                 40    RETURN
                                 41
                                 42    END

 Abbreviations Used
  NO       not optimized
  LR       loop reordering
  DD       data dependence
  SO       scalar optimization
  INF      informational

 Footnote List
   1: not optimized          Loop was asserted serial by directive.
   2: not vectorized         Not an inner loop.
   3: scalar optimization    Cleanup-loop for loop unrolling added.
   4: scalar optimization    Loop unrolled 3 times to improve scalar performance.
   5: scalar optimization    Strip loop for strip mining with block size 24.
   6: scalar optimization    Block loop for strip mining with block size 24.
   7: informational          Unrolling of this loop was not done because
                             heuristic says size is ok asis.
   8: data dependence        Data dependence involving this line due to variable C.


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