OpenMP Synchronization (2)
Explicit directives provide finer control
- BARRIER — must be hit by all threads in team
- CRITICAL (name), END CRITICAL —
- Only one thread may enter at a time
- ATOMIC — Single-statement critical section
- for reduction
- FLUSH (list) — “Synchronization point at
- which the implementation is required to
- provide a consistent view of memory”
- ORDERED — For pipelining loop iterations