Skip to content

Commit

Permalink
voloctree: optimize communications of adaption information
Browse files Browse the repository at this point in the history
  • Loading branch information
andrea-iob committed Jun 12, 2024
1 parent 0c25394 commit 28c1fe9
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/voloctree/voloctree_mapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1714,7 +1714,9 @@ void VolOctreeMapper::_communicateMappedAdaptionInfo(const std::vector<adaption:
int mentity;
recvBuffer >> mentity;

mapping::Info info;
m_partitionIR.map_rank_inverseMapping[rank].erase(id);
auto infoItr = m_partitionIR.map_rank_previousMapping[rank].insert({id, mapping::Info()}).first;
mapping::Info &info = infoItr->second;
info.type = mapping::Type(mtype);
info.entity = mapping::Entity(mentity);
int nmap;
Expand All @@ -1725,8 +1727,6 @@ void VolOctreeMapper::_communicateMappedAdaptionInfo(const std::vector<adaption:
info.ids.push_back(idref);
info.ranks.push_back(m_rank);
}
m_partitionIR.map_rank_previousMapping[rank][id] = info;
m_partitionIR.map_rank_inverseMapping[rank].erase(id);
}

int nofInfo;
Expand All @@ -1738,7 +1738,8 @@ void VolOctreeMapper::_communicateMappedAdaptionInfo(const std::vector<adaption:
int entity;
recvBuffer >> entity;

adaption::Info info;
adaptionInfoRef->emplace_back();
adaption::Info &info = adaptionInfoRef->back();
info.type = adaption::Type(type);
info.entity = adaption::Entity(entity);
int ncurrent;
Expand All @@ -1758,7 +1759,6 @@ void VolOctreeMapper::_communicateMappedAdaptionInfo(const std::vector<adaption:
int arank;
recvBuffer >> arank;
info.rank = arank;
adaptionInfoRef->push_back(info);
}

++nCompletedRecvs;
Expand Down

0 comments on commit 28c1fe9

Please sign in to comment.