This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
| Other format: | [Raw text] | |
REAL, ALLOCATABLE :: A(:,:), B(:,:), C(:,:), D(:,:), E(:,:), F(:,:)
! ... READ IN EXTEND OF ARRAYS ...
READ*,N
! ... ALLOCATE ARRAYS
ALLOCATE(A(N,N),B(N,N),C(N,N),D(N,N),E(N,N),F(N,N))
! ... READ IN ARRAYS
READ*,A,B
C = A + B D = A * C E = B * EXP(D) F = C * LOG(E)
where the four assignments all have the structure of loops like:
DO I = 1, N DO J = 1, N X(J,I) = OP(A(J,I), B(J,I)) ENDDO ENDDO
Obviously, this could benefit from loop fusion, by combining the four assignments in one loop.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |