1 extern "C" void abort ();
3 struct S { S (); S (unsigned long long int, int); ~S (); static int cnt1, cnt2, cnt3; unsigned long long int s; int t; };
15 S::S (unsigned long long int x, int y) : s (x), t (y)
17 #pragma omp atomic update
25 if (t < 3 || t > 9 || (t & 1) == 0)
41 if (o->t != 5 || i->t != 9)
46 #pragma omp declare reduction (+: S : omp_out.s += omp_in.s) \
47 initializer (omp_priv (0, 3))
48 #pragma omp declare reduction (*: S : rbaz (&omp_out, &omp_in)) \
49 initializer (rbar (&omp_priv, &omp_orig))
61 #pragma omp taskloop reduction (+:x) in_reduction (+:b)
62 for (int i = 0; i < 64; i++)
70 unsigned long long int
71 bar (int *a, unsigned long long int &b)
73 unsigned long long int xs = 1;
74 unsigned long long int &x = xs;
75 #pragma omp taskloop reduction (*:x) in_reduction (*:b)
76 for (int i = 0; i < 64; i++)
78 #pragma omp task in_reduction (*:x)
80 #pragma omp task in_reduction (*:b)
87 baz (int i, int *a, int *c)
89 #pragma omp task in_reduction (*:h) in_reduction (+:g)
93 if ((g.t != 7 && g.t != 3) || (h.t != 5 && h.t != 9))
101 int i, j, a[64], b = 0, c[64];
102 unsigned long long int d = 1, e;
104 for (i = 0; i < 64; i++)
107 c[i] = 1 + ((i % 3) != 1);
115 #pragma omp taskgroup task_reduction (+:b)
117 #pragma omp taskgroup task_reduction (*:d)
119 #pragma omp taskloop reduction (+: g, m) reduction (*: h, n)
120 for (i = 0; i < 64; ++i)
126 if ((g.t != 7 && g.t != 3) || (h.t != 5 && h.t != 9)
127 || (m.t != 7 && m.t != 3) || (n.t != 5 && n.t != 9))
131 if (n.s != (1ULL << 43) || n.t != 5)
134 if (j != 63 * 64 || b != 63 * 64 * 2)
136 if (e != (1ULL << 43) || d != (1ULL << 21))
138 if (g.s != 63 * 64 * 10 || g.t != 7)
140 if (h.s != (1ULL << 42) || h.t != 5)
142 if (ms.s != 63 * 64 * 4 || ms.t != 7)
149 int c1 = S::cnt1, c2 = S::cnt2, c3 = S::cnt3;
151 if (S::cnt1 + S::cnt2 - c1 - c2 != S::cnt3 - c3)