Changes between Version 2 and Version 3 of library_barrier
- Timestamp:
- Aug 4, 2014, 3:11:53 PM (11 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
library_barrier
v2 v3 1 = The Barrier Library = 1 2 2 3 The [source:soft/giet_vm/giet_libs/barrier.c barrier.c] and [source:soft/giet_vm/giet_libs/barrier.h barrier.h] … … 5 6 6 7 There is actually two types of barriers: 7 1. The "giet_barrier_t" is a simple sense-reversing barrier. It can be safely used several times (in a loop for example), 8 9 == A) Simple Barrier == 10 11 The "giet_barrier_t" is a simple sense-reversing barrier. It can be safely used several times (in a loop for example), 8 12 but it does not scale, and should not be used when the number of expected tasks is larger than few tens. 13 9 14 The available functions are: 10 15 * '''barrier_init( giet_barrier_t * barrier, unsigned int ntasks )‘‘‘ 11 16 * '''barrier_wait( giet_barrier_t * barrier )''' 12 1. The ''giet_sbt_barrier_t" can be used in multi-clusters architectures, and is implemented as a physically distributed Sliced-Binary-Tree (SBT). 17 18 Neither the barrier_init(), nor the barrier_wait() function contains a system call. 19 20 == B) Distributed Barrier == 21 22 The ''giet_sbt_barrier_t" can be used in multi-clusters architectures, and is implemented as a physically distributed Sliced-Binary-Tree (SBT). 13 23 To use this distributed barrier, some placement constraints must be respected: 14 24 * The number of tasks must be a power of 2. … … 17 27 * The lower left involved cluster is cluster(0,0) 18 28 19 Neither the barrier_init(), nor the barrier_wait() function require a syscall. 20 For both types of barriers, the barrier initialisation should be done by one single task. 29 The available functions are: 30 * '''sbt_barrier_init( giet_sbt_barrier_t * barrier, unsigned int ntasks )‘‘‘ 31 * '''sbt_barrier_wait( giet_sbt_barrier_t * barrier )''' 21 32 33 The sbt_barrier_init() contains a system call, but the sbt_barrier_wait does not. 34 35 '''WARNING:''' For both types of barriers, the barrier initialisation should be done by one single task. 36