Changes between Version 32 and Version 33 of OpenMPTransformation


Ignore:
Timestamp:
04/26/14 08:19:36 (12 years ago)
Author:
siegel
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • OpenMPTransformation

    v32 v33  
    119119 * of the top of the loop.  It is needed to check that all threads
    120120 * encounter the same worksharing statements in the same order.
    121  * Parameter start is the initial value of the loop variable;
    122  * end is its final value; and inc is the increment (which can be
     121 * The implementation will need the value start, the initial value of the loop variable;
     122 * end is its final value; and inc, the increment (which can be
    123123 * positive or negative).   These values can all be obtained by getting
    124124 * the loop statement from the location and evaluating the expressions
     
    382382=== Translating `atomic` ===
    383383
    384 This is just `$atomic`.  Or nothing, since assignment expressions are already atomic in CIVL-C.  The question is, what to do with non-atomic updates. They should register as race conditions.
     384In general, reads and writes to shared variables will be processed using the protocols described above (dealing with state variables and ownership, etc.).  However if the operation occurs within an omp atomic construct, it is translated differently.
     385
     386If sequentially consistent atomic...
     387
     388If non-sequentially consistent atomic...
     389
    385390
    386391===  Translating`ordered` ===
     
    414419    int i = info.iters[_i][0];
    415420     ...
    416       $when (order1==i) {
    417         translate(S);
    418         order1++;
    419       }
     421    $when (order1==i) {
     422      translate(S1);
     423      order1++;
     424    }
    420425      ...
    421       $when (order2==i) {
    422         translate(S2);
    423         order2++;
    424       }
     426    $when (order2==i) {
     427      translate(S2);
     428      order2++;
     429    }
    425430      ...
    426431  }