2 /* { dg-options "-O2" } */
3 /* { dg-additional-options "-std=c99" { target c } } */
4 /* { dg-additional-options "-msse2" { target sse2_runtime } } */
5 /* { dg-additional-options "-mavx" { target avx_runtime } } */
18 #pragma omp parallel master num_threads(4) private (p) shared(a)
21 p
= omp_get_thread_num ();
24 #pragma omp taskloop nogroup
25 for (i
= 0; i
< N
; ++i
)
27 if (omp_get_thread_num () >= 4)
32 #pragma omp parallel num_threads(4)
34 #pragma omp master taskloop lastprivate (i, l) firstprivate (q)
35 for (i
= 0; i
!= N
; i
= i
+ 1)
38 if (i
!= N
|| l
!= N
- 1)
40 #pragma omp parallel master taskloop num_threads(4) \
41 lastprivate (i, l) firstprivate (q)
42 for (i
= 0; i
< N
- 5; i
+= 2)
47 if (i
!= N
- 4 || l
!= N
- 6)
49 #pragma omp parallel master taskloop simd num_threads(4)
50 for (i
= 0; i
< N
; i
++)
54 #pragma omp parallel num_threads(4)
57 #pragma omp master taskloop simd collapse(2)
58 for (i
= 0; i
< 2; i
+= 2)
59 for (j
= 0; j
< N
; j
++)
62 for (i
= 0; i
< N
; i
++)
63 if (a
[i
] != 2 * i
+ 1)