Changes between Version 17 and Version 18 of OpenMPTransformation


Ignore:
Timestamp:
04/20/14 21:09:54 (12 years ago)
Author:
siegel
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • OpenMPTransformation

    v17 v18  
    104104=== Translating shared variables ===
    105105
     106For each shared variable `v` introduce a second variable `v_state`.  The type of `v_state` is obtained from the type of `v` by replacing all primitive types (leaf nodes in the type tree) by `int`.  Initially all these ints are -1.
     107
     108A write to (some part of) the shared variable by thread tid:
     109* if the state value is -1, set it to tid, then do the write
     110* if the state value is tid, do the write
     111* else report a data race.
     112
     113A read from (some part of) the shared variable by thread tid:
     114* if the state value is -1 or tid, do the read
     115* else report a data race.
     116
     117Translating `flush`of (some part of) the shared variable by thread tid:
     118* if the state value is -1: no-op
     119* if the state value is tid: set it to -1
     120* else: some other thread has some write to the variable which it hasn't flushed.  Not exactly sure what is supposed to happen, but I think this is like a race condition
     121
    106122=== Translating `parallel` ===
    107123