Changes between Version 3 and Version 4 of OpenMPTransformation


Ignore:
Timestamp:
04/19/14 22:41:15 (12 years ago)
Author:
siegel
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • OpenMPTransformation

    v3 v4  
    8484As with loops, you really want to check these are independent and only do the interleaving exploration as a last resort.
    8585
     86=== `single` ===
     87
     88Nondeterministically choose a thread, i.e, `$choose_int(threads)`.   That thread executes the code, the rest skip it.
     89The 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
     91There is a barrier at the end.
    8692
    8793
     94=== `barrier` ===
    8895
     96Provide 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.
    8997
     98=== `critical` ===
     99
     100Basically, 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
     104This is just `$atomic`.
     105
     106=== `ordered` ===
     107
     108This 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