3 implicit none (type, external)
7 integer, contiguous
:: a(0:)
11 if (omp_get_thread_num () /= 0) &
16 !$omp masked filter (0)
17 if (omp_get_thread_num () /= 0) &
22 !$omp masked filter (7)
23 if (omp_get_thread_num () /= 7) &
28 !$omp masked filter (x)
29 if (omp_get_thread_num () /= x
) &
34 !$omp masked taskloop simd filter (x) shared(a) grainsize (12) simdlen (4)
38 !$omp end masked taskloop simd
44 implicit none (type, external)
50 !$omp parallel num_threads (4)
57 if (a(128) /= 1 .or
. a(129) /= 1 .or
. a(130) /= 0 .or
. a(131) /= 0) &
60 !$omp parallel num_threads (4)
67 if (a(128) /= 2 .or
. a(129) /= 2 .or
. a(130) /= 0 .or
. a(131) /= 1) &
70 !$omp parallel num_threads (8)
77 if (a(128) /= 3 .or
. a(129) /= 3 .or
. a(130) /= 1 .or
. a(131) /= 1) &
80 !$omp parallel num_threads (8)
87 if (a(128) /= 4 .or
. a(129) /= 4 .or
. a(130) /= 2 .or
. a(131) /= 2) &
93 ! The filter expression can evaluate to different values in different threads.
94 !$omp parallel masked num_threads (8) filter (omp_get_thread_num () + 1)
95 a(omp_get_thread_num ()) = a(omp_get_thread_num ()) + 1
96 !$omp end parallel masked
102 ! And multiple threads can be filtered.
103 !$omp parallel masked num_threads (8) filter (iand (omp_get_thread_num (), not(1)))
104 a(omp_get_thread_num ()) = a(omp_get_thread_num ()) + 1
105 !$omp end parallel masked