6 elemental
subroutine omp_priv (x
, y
, z
)
8 real, intent (inout
) :: y
10 end subroutine omp_priv
11 elemental
real function omp_orig (x
)
12 real, intent (in
) :: x
15 !$omp declare reduction (omp_priv : real : &
16 !$omp & omp_priv (omp_orig (omp_in), omp_out, 1.0)) &
17 !$omp & initializer (omp_out (omp_priv, omp_in (omp_orig)))
18 real :: x (2:4, 1:1, -2:0)
21 !$omp parallel do reduction (omp_priv : x)
25 if (any (x
/= 2080.0)) call abort
27 elemental
subroutine omp_out (x
, y
)
28 real, intent (out
) :: x
29 real, intent (in
) :: y
31 end subroutine omp_out
32 elemental
real function omp_in (x
)
33 real, intent (in
) :: x
37 elemental
subroutine omp_priv (x
, y
, z
)
38 real, intent (in
) :: x
39 real, intent (inout
) :: y
40 real, intent (in
) :: z
41 y
= y
+ (x
- 4.0) + (z
- 1.0)
42 end subroutine omp_priv
43 elemental
real function omp_orig (x
)
44 real, intent (in
) :: x