26 _previousCellWeights.clear();
27 _previousCellWeights.insert( _currentCellWeights.begin(), _currentCellWeights.end() );
29 _currentCellWeights.clear();
32 for (
auto& p: _previousCellWeights) {
33 _localRankWeight += p.second;
41 if ( _previousCellWeights.count(spacetreeNumber)==0 ) {
45 return _previousCellWeights.at(spacetreeNumber);
52 if ( _currentCellWeights.count(spacetreeNumber)==0 ) {
53 _currentCellWeights.insert( std::pair<int,double>(spacetreeNumber,0.0) );
57 _currentCellWeights[spacetreeNumber] += weight;
Create a lock around a boolean semaphore region.
void free()
Free the lock.