Changes between Version 32 and Version 33 of OpenMPTransformation
- Timestamp:
- 04/26/14 08:19:36 (12 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
OpenMPTransformation
v32 v33 119 119 * of the top of the loop. It is needed to check that all threads 120 120 * encounter the same worksharing statements in the same order. 121 * Parameter start isthe initial value of the loop variable;122 * end is its final value; and inc isthe increment (which can be121 * 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 123 123 * positive or negative). These values can all be obtained by getting 124 124 * the loop statement from the location and evaluating the expressions … … 382 382 === Translating `atomic` === 383 383 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. 384 In 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 386 If sequentially consistent atomic... 387 388 If non-sequentially consistent atomic... 389 385 390 386 391 === Translating`ordered` === … … 414 419 int i = info.iters[_i][0]; 415 420 ... 416 $when (order1==i) {417 translate(S);418 order1++;419 }421 $when (order1==i) { 422 translate(S1); 423 order1++; 424 } 420 425 ... 421 $when (order2==i) {422 translate(S2);423 order2++;424 }426 $when (order2==i) { 427 translate(S2); 428 order2++; 429 } 425 430 ... 426 431 }
