3 extern "C" void abort ();
11 #pragma omp declare reduction (bar : int : omp_out += omp_in)
12 #pragma omp parallel reduction (bar : s) reduction(S::operator+ : j)
14 if (s.a != 4 * j) abort ();
16 #pragma omp declare reduction (bar : S : baz (omp_out, omp_in))
17 static void baz (S &x, S &y) { x.a += y.a; }
30 #pragma omp declare reduction (bar : int : omp_out += omp_in)
31 #pragma omp parallel reduction (bar : t) reduction (S::bar : s) \
32 reduction(T<N>::operator+ : j)
33 s.a = 4, t.a = 5, j = 1;
34 if (s.a != 4 * j || t.a != 5 * j) abort ();
36 #pragma omp declare reduction (bar : T<N> : baz (omp_out, omp_in))
37 static void baz (T &x, T &y) { x.a += y.a; }