OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gfortran.dg/] [gomp/] [appendix-a/] [a.12.1.f90] - Blame information for rev 694

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 694 jeremybenn
! { dg-do compile }
2
      SUBROUTINE A12( X, XOLD, N, TOL )
3
      REAL X(*), XOLD(*), TOL
4
      INTEGER N
5
      INTEGER C, I, TOOBIG
6
      REAL ERROR, Y, AVERAGE
7
      EXTERNAL AVERAGE
8
      C=0
9
      TOOBIG = 1
10
!$OMP PARALLEL
11
        DO WHILE( TOOBIG > 0 )
12
!$OMP DO PRIVATE(I)
13
            DO I = 2, N-1
14
               XOLD(I) = X(I)
15
            ENDDO
16
!$OMP SINGLE
17
            TOOBIG = 0
18
!$OMP END SINGLE
19
!$OMP DO PRIVATE(I,Y,ERROR), REDUCTION(+:TOOBIG)
20
            DO I = 2, N-1
21
               Y = X(I)
22
               X(I) = AVERAGE( XOLD(I-1), X(I), XOLD(I+1) )
23
               ERROR = Y-X(I)
24
               IF( ERROR > TOL .OR. ERROR < -TOL ) TOOBIG = TOOBIG+1
25
            ENDDO
26
!$OMP MASTER
27
            C=C+1
28
            PRINT *, "Iteration ", C, " TOOBIG=", TOOBIG
29
!$OMP END MASTER
30
        ENDDO
31
!$OMP END PARALLEL
32
      END SUBROUTINE A12

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.