Changes between Version 3 and Version 4 of OpenMPTransformation
- Timestamp:
- 04/19/14 22:41:15 (12 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
OpenMPTransformation
v3 v4 84 84 As with loops, you really want to check these are independent and only do the interleaving exploration as a last resort. 85 85 86 === `single` === 87 88 Nondeterministically choose a thread, i.e, `$choose_int(threads)`. That thread executes the code, the rest skip it. 89 The question is, which thread does the choosing? The first thread to arrive at that construct? Once again, try to determine if it matters. If the modifications and reads do not involve and private data, it doesn't matter which thread does it, so make it thread 0. 90 91 There is a barrier at the end. 86 92 87 93 94 === `barrier` === 88 95 96 Provide some system functions for this. All the threads in the team (threads[i]) register with a barrier object and partake in the barrier. Can re-use that barrier object for multiple barriers. 89 97 98 === `critical` === 99 100 Basically, use a lock for each critical name, plus one for the "no name". All threads must obtain lock to enter the critical section, then release it. 101 102 === `atomic` === 103 104 This is just `$atomic`. 105 106 === `ordered` === 107 108 This can only be used inside and OMP `for` loop in which the pragma used the `ordered` clause. (Check that.) It indicates that the specified region must be executed in iteration order. 109
