4 integer, parameter :: a
= 6
6 !$omp declare reduction (foo : integer : combiner1 (omp_out, omp_in)) &
7 !$omp & initializer (initializer1 (omp_priv, omp_orig))
8 !$omp declare reduction (.add. : integer : &
9 !$omp & combiner1 (omp_out, omp_in)) &
10 !$omp & initializer (initializer1 (omp_priv, omp_orig))
11 interface operator (.add
.)
15 integer function f1 (x
, y
)
16 integer, intent (in
) :: x
, y
19 elemental
subroutine combiner1 (x
, y
)
20 integer, intent (inout
) :: x
21 integer, intent (in
) :: y
24 subroutine initializer1 (x
, y
)
35 !$omp declare reduction (+ : dt : combiner2 (omp_in, omp_out)) &
36 !$omp & initializer (initializer2 (omp_priv))
37 interface operator (+)
41 type(dt
) function f2 (x
, y
)
42 type(dt
), intent (in
) :: x
, y
45 subroutine combiner2 (x
, y
)
48 end subroutine combiner2
49 subroutine initializer2 (x
)
50 type(dt
), intent(out
) :: x
52 end subroutine initializer2
59 !$omp parallel do reduction (.add.: j) reduction (+ : d)
61 j
= j
.add
.iand (i
, -4)
64 if (d
%x
/= 5050 .or
. j
/= 4903) STOP 2