Changes between Version 41 and Version 42 of OpenMPTransformation
- Timestamp:
- 06/10/14 14:15:40 (12 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
OpenMPTransformation
v41 v42 172 172 $omp_gshared x_gshared = $omp_gshared_create(gteam, &x); 173 173 174 $parfor (int _tid : 0..nthreads-1) {174 $parfor (int _tid : {0..nthreads-1}) { 175 175 $omp_team team = $omp_team_create($here, gteam, _tid); 176 176 $omp_shared x_shared = $omp_shared_create(team, x_gshared); … … 226 226 227 227 {{{ 228 // location 78:229 228 #pragma omp parallel for collapse(3) 230 229 for (i=0; i<n; i++) … … 370 369 === Translating `atomic` === 371 370 372 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. 371 In general, reads and writes to shared variables will be processed using the protocols described above. However if the operation occurs within an omp atomic construct, it is translated differently. 372 373 TODO: need to look up the rules on the different flavors of atomics. 373 374 374 375 If sequentially consistent atomic... … … 439 440 * `omp_get_num_threads()` => `_nthreads` 440 441 * `omp_get_thread_num()` => `_tid` 442 443
