| 1 |
! { dg-options "-O3 -ffast-math -floop-nest-optimize -floop-block -fdump-tree-graphite-all" } |
| 2 |
|
| 3 |
INTEGER, PARAMETER :: N=1024 |
| 4 |
REAL*8 :: A(N,N), B(N,N), C(N,N) |
| 5 |
REAL*8 :: t1,t2 |
| 6 |
A=0.1D0 |
| 7 |
B=0.1D0 |
| 8 |
C=0.0D0 |
| 9 |
CALL cpu_time(t1) |
| 10 |
CALL mult(A,B,C,N) |
| 11 |
CALL cpu_time(t2) |
| 12 |
write(6,*) t2-t1,C(1,1) |
| 13 |
END program |
| 14 |
|
| 15 |
SUBROUTINE mult(A,B,C,N) |
| 16 |
REAL*8 :: A(N,N), B(N,N), C(N,N) |
| 17 |
INTEGER :: I,J,K,N |
| 18 |
DO J=1,N |
| 19 |
DO I=1,N |
| 20 |
DO K=1,N |
| 21 |
C(I,J)=C(I,J)+A(I,K)*B(K,J) |
| 22 |
ENDDO |
| 23 |
ENDDO |
| 24 |
ENDDO |
| 25 |
END SUBROUTINE mult |
| 26 |
|
| 27 |
! { dg-final { scan-tree-dump "tiled by" "graphite" } } |