- [8.2] Data-parallel programming synced in rounds.
- [8.3] Used when shared variables written by some threads in a round need to be read by other threads in next round.
- [8.14] Also used when message-passing in rounds.
- [8.5] Barrier synchronization for \(p\) threads using
Barrier(p)
(\(\mathcal O(p)\))
- [8.3] 2 methods
- 2 syncs
- Read globals into locals, then
sync()
- Write to non-overlapping globals, then
sync()
- Single sync
- 2 copies of shared variables
- Read from 1st copy and write to 2nd copy
sync()
, then swap references
Copyright © 2021 Chua Hou.