Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
lroberts36 committed Nov 1, 2024
1 parent d7ba65d commit 91771ad
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
12 changes: 7 additions & 5 deletions src/bvals/comms/combined_buffers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,8 @@ void CombinedBuffersRankPartition::PackAndSend(const std::set<Uid_t> &vars) {
}

//----------------------------------------------------------------------------------------
bool CombinedBuffersRankPartition::TryReceiveAndUnpack(mpi_message_t *message, const std::set<Uid_t> &vars) {
bool CombinedBuffersRankPartition::TryReceiveAndUnpack(mpi_message_t *message,
const std::set<Uid_t> &vars) {
const auto &var_set = vars.size() == 0 ? all_vars : vars;
// Make sure the var-boundary buffers are available to write to
for (auto uid : var_set) {
Expand All @@ -123,7 +124,7 @@ bool CombinedBuffersRankPartition::TryReceiveAndUnpack(mpi_message_t *message, c
}
}

//if (!all_allocated)
// if (!all_allocated)
RebuildBndIdsOnDevice(vars);

auto &bids = bnd_ids_device;
Expand Down Expand Up @@ -305,7 +306,8 @@ bool CombinedBuffersRank::IsAvailableForWrite(MeshData<Real> *pmd) {
}

//----------------------------------------------------------------------------------------
bool CombinedBuffersRank::TryReceiveAndUnpack(MeshData<Real> *pmd, int partition, mpi_message_t *message) {
bool CombinedBuffersRank::TryReceiveAndUnpack(MeshData<Real> *pmd, int partition,
mpi_message_t *message) {
PARTHENON_REQUIRE(buffers_built,
"Trying to recv combined buffers before they have been built");
PARTHENON_REQUIRE(combined_bufs.count(partition) > 0,
Expand Down Expand Up @@ -366,8 +368,8 @@ bool CombinedBuffers::IsAvailableForWrite(MeshData<Real> *pmd, BoundaryType b_ty
bool available{true};
for (int rank = 0; rank < Globals::nranks; ++rank) {
if (combined_send_buffers.count({rank, b_type})) {
available = available &&
combined_send_buffers.at({rank, b_type}).IsAvailableForWrite(pmd);
available =
available && combined_send_buffers.at({rank, b_type}).IsAvailableForWrite(pmd);
}
}
return available;
Expand Down
4 changes: 2 additions & 2 deletions src/interface/mesh_data.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -235,8 +235,8 @@ class MeshData {
return block_data_[0]->GetBoundsK(std::forward<Ts>(args)...);
return IndexRange{-1, -2};
}
const auto &GetUids() const {return block_data_[0]->GetUids();}

const auto &GetUids() const { return block_data_[0]->GetUids(); }

template <class... Args>
void Add(Args &&...args) {
Expand Down
4 changes: 2 additions & 2 deletions src/interface/meshblock_data.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -562,8 +562,8 @@ class MeshBlockData {
return this->varUidIn_.count(Variable<Real>::GetUniqueID(v));
});
}
const auto &GetUids() const {return varUidIn_;}

const auto &GetUids() const { return varUidIn_; }

void SetAllVariablesToInitialized() {
std::for_each(varVector_.begin(), varVector_.end(),
Expand Down

0 comments on commit 91771ad

Please sign in to comment.