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.31.1.f90] - Rev 774

Go to most recent revision | Compare with Previous | Blame | View Log

! { dg-do compile }

      SUBROUTINE A31_1(A, B, X, Y, N)
        INTEGER N
        REAL X(*), Y(*), A, B
!$OMP PARALLEL DO PRIVATE(I) SHARED(X, N) REDUCTION(+:A) &
!$OMP& REDUCTION(MIN:B)
        DO I=1,N
           A = A + X(I)
           B = MIN(B, Y(I))
!  Note that some reductions can be expressed in
!  other forms. For example, the MIN could be expressed as
!  IF (B > Y(I)) B = Y(I)
         END DO
      END SUBROUTINE A31_1

Go to most recent revision | Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

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