Changes between Version 45 and Version 46 of Next-GenOpenMPTransformation


Ignore:
Timestamp:
10/31/19 14:29:37 (7 years ago)
Author:
wuwenhao
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Next-GenOpenMPTransformation

    v45 v46  
    440440      transfromed(BLOCK)
    441441
    442       $omp_barrier_and_flush(team); //check data race
     442      $omp_barrier(team); //check data race included
    443443
    444444      $read_set_pop(); $write_set_pop();
     
    491491    ...
    492492  }
    493   $omp_barrier_and_flush();
     493  $omp_barrier(team);
    494494}
    495495}}}
     
    512512
    513513  if (_omp_tid == _omp_single_dist) {
    514     translate(S);
    515   }
    516 
    517   $omp_barrier_and_flush(team);
     514    translate(BLOCK);
     515  }
     516
     517  $omp_barrier(team);
    518518} // single construct (end)
    519519}}}
     
    545545    transfromed(BLOCK)
    546546  }
    547   $barrier_and_flush(team);
     547  $omp_barrier(team);
    548548} // worksharing-loop construct (end)
    549549}}}
     
    571571    transfromed(BLOCK)
    572572  }
    573   $omp_barrier_and_flush(team);
     573  $omp_barrier(team);
    574574} // worksharing-loop construct (end)
    575575}}}
     
    603603
    604604{{{
    605 $omp_barrier_and_flush(team);
     605$omp_barrier(team);
    606606}}}
    607607
     
    616616// critical block with unspecified name
    617617#pragma omp critical
    618   BLOCKA
     618  BLOCK_A
    619619
    620620// critical block with specified name
    621621#pragma omp critical(x)
    622   BLOCKX
     622  BLOCK_X
    623623}}}
    624624
     
    627627{{{
    628628...
    629 _Bool _critical_ = $false;
    630 _Bool _critical_x = $false;
     629_Bool critical_ = $false;
     630_Bool critical_x = $false;
    631631
    632632...
    633633
    634634// critical block with unspecified name
    635 $when (!_critical_) _critical_=$true;
    636   translate(BLOCKA)
    637   _critical_=$false;
     635$yield();
     636$when (!critical_) critical_ = $true;
     637$check_no_data_race(team);
     638  translate(BLOCK_A)
     639  critical_ = $false;
    638640
    639641// critical block with specified name
    640 $when (!_critical_x) _critical_x=$true;
    641   translate(BLOCKX);
    642   _critical_x=$false;
     642$yield();
     643$when (!critical_x) critical_x = $true;
     644$check_no_data_race(team);
     645  translate(BLOCK_X);
     646  critical_x = $false;
    643647}}}
    644648
     
    746750    $omp_reduction_combine(MULT, _omp_rdc_1_prod, prod);
    747751
    748     $omp_barrier_and_flush(team); //check data race
     752    $omp_barrier(team); //check data race
    749753    ..
    750754  }
     
    786790  $omp_reduction_combine(ADD, _omp_rdc_1_isum, isum);
    787791
    788   $omp_barrier_and_flush(team);
     792  $omp_barrier(team);
    789793} // worksharing-loop construct (end)
    790794}}}