Change split functions to work on box instead of chunk#323
Conversation
|
Check-perf-impact results: (000e2892abb21ddd1ae413a5c86d7d95) ❓ No new benchmark data submitted. ❓ |
Pull Request Test Coverage Report for Build 15258506201Warning: This coverage report may be inaccurate.This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
Details
💛 - Coveralls |
fknorr
left a comment
There was a problem hiding this comment.
I like it!
If I'm not mistaken you could also define command_graph_generator::assigned_chunk in terms of boxes and get rid of even more casts without much hassle - buffer_access_map already operates on boxes.
Also, a drive-by suggestion:
diff --git a/src/command_graph_generator.cc b/src/command_graph_generator.cc
index da56682e..3cfb6d22 100644
--- a/src/command_graph_generator.cc
+++ b/src/command_graph_generator.cc
@@ -117,11 +117,9 @@ std::vector<const command*> command_graph_generator::build_task(const task& tsk)
}
void command_graph_generator::report_overlapping_writes(const task& tsk, const box_vector<3>& local_chunks) const {
- const chunk<3> full_chunk{tsk.get_global_offset(), tsk.get_global_size(), tsk.get_global_size()};
-
// Since this check is run distributed on every node, we avoid quadratic behavior by only checking for conflicts between all local chunks and the
// region-union of remote chunks. This way, every conflict will be reported by at least one node.
- const box<3> global_chunk(subrange(full_chunk.offset, full_chunk.range));
+ const box<3> global_chunk(subrange(tsk.get_global_offset(), tsk.get_global_size()));
auto remote_chunks = region_difference(global_chunk, region(box_vector<3>(local_chunks))).into_boxes();
// detect_overlapping_writes takes a single box_vector, so we concatenate local and global chunks (the order does not matter)|
Check-perf-impact results: (17d2daea565336edd0421cacd8138ced) ❓ No new benchmark data submitted. ❓ |
chunkis a purely user-facing type (and of questionable usefulness at that), and since all of our internal tracking is built aroundbox, splitting should follow suit.