Changes between Version 18 and Version 19 of OpenMPTransformation


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

--

Legend:

Unmodified
Added
Removed
Modified
  • OpenMPTransformation

    v18 v19  
    120120* 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
    121121
     122Function
     123{{{
     124  barrier_and_flush();
     125}}}
     126does a barrier on `_barrier` and a flush on all shared variables.
     127
    122128=== Translating `parallel` ===
    123129
     
    137143    $omp_gws _gws = $omp_gws_create($here, _nthreads);
    138144    $gbarrier _gbarrier = $gbarrier_create($here, _nthreads);
     145    // declare shared variables and corresponding state variables
     146    // initialize all state components to -1
    139147    void _thread(int _tid) {
    140148      $omp_ws _ws = $omp_ws_create($here, _gws, _tid);
     
    176184    translate(S);
    177185  }
    178   $barrier_call(_barrier);
     186  barrier_and_flush();
    179187}
    180188}}}
     
    216224    } /* end of switch */
    217225  } /* end of while loop */
    218   $barrier_call(_barrier);
     226  barrier_and_flush();
    219227}
    220228}}}
     
    235243  translate(S);
    236244}
    237 $barrier_call(_barrier);
     245barrier_and_flush();
    238246}}}
    239247
     
    250258{{{
    251259$omp_barrier_arrive(_ws, 58);
    252 $barrier_call(_barrier);
     260barrier_and_flush();
    253261}}}
    254262