5 #pragma omp parallel num_threads (6)
8 #pragma omp task depend(out: c)
10 #pragma omp task depend(out: a)
12 #pragma omp task depend(out: b)
14 /* The above 3 tasks can be scheduled in any order. */
15 #pragma omp task depend(in: a) depend(mutexinoutset: c)
17 #pragma omp task depend(in: b) depend(mutexinoutset: c)
19 /* The above 2 tasks are mutually exclusive and need to wait
20 for the first and second or first and third tasks respectively. */
21 #pragma omp task depend(in: c)
23 /* The above task needs to wait for the mutexinoutset tasks. */