Set num_threads to 50 on 32-bit hppa in two libgomp loop tests
[official-gcc.git] / libgomp / testsuite / libgomp.oacc-c-c++-common / vector-length-128-10.c
blob0658cfde7ad4ea800c15f7d728c40ebc0c1aad24
1 /* { dg-do run } */
3 #include <stdlib.h>
5 #define N 1024
7 unsigned int a[N];
8 unsigned int b[N];
9 unsigned int c[N];
10 unsigned int n = N;
12 int
13 main (void)
15 for (unsigned int i = 0; i < n; ++i)
17 a[i] = i % 3;
18 b[i] = i % 5;
21 unsigned int res = 1;
22 unsigned long long res2 = 1;
23 #pragma acc parallel vector_length (128) copyin (a,b) reduction (+:res, res2) copy (res, res2)
25 #pragma acc loop vector reduction (+:res, res2)
26 for (unsigned int i = 0; i < n; i++)
28 res += ((a[i] + b[i]) % 2);
29 res2 += ((a[i] + b[i]) % 2);
33 if (res != 478)
34 abort ();
35 if (res2 != 478)
36 abort ();
38 return 0;