Skip to content

Commit 12fb858

Browse files
committed
Clarify new single await-push command generation.
1 parent afa68a9 commit 12fb858

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

include/grid.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,8 @@ class region_builder {
273273
m_boxes.push_back(box);
274274
}
275275

276+
// Adds a set of boxes to the region builder, skipping empty boxes,
277+
// by calling `add` for each element instead of a single `insert(end)`.
276278
void add(const box_vector<Dims>& boxes) & {
277279
m_boxes.reserve(m_boxes.size() + boxes.size());
278280
for(const auto& b : boxes) {

src/command_graph_generator.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,6 @@ void command_graph_generator::generate_await_pushes(batch& current_batch, const
402402
if(!box.empty() && !wcs.is_fresh()) { missing_parts_boxes.push_back(box); }
403403
}
404404

405-
// There is data we don't yet have locally. Generate an await push command for it.
406405
if(!missing_parts_boxes.empty()) {
407406
assert(m_num_nodes > 1);
408407
auto& required_boxes = per_buffer_required_boxes[bid]; // allow default-insert
@@ -411,6 +410,7 @@ void command_graph_generator::generate_await_pushes(batch& current_batch, const
411410
}
412411
}
413412

413+
// There is data we don't yet have locally. Generate an await push command for it.
414414
for(auto& [bid, boxes] : per_buffer_required_boxes) {
415415
auto& buffer = m_buffers.at(bid);
416416
auto region = std::move(boxes).into_region(); // moved-from after next line!

0 commit comments

Comments
 (0)