-
Notifications
You must be signed in to change notification settings - Fork 506
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rename split_off to split_off_left (as discussed in PR #189) #198
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thoughts?
let a = self.a.drive_unindexed(consumer.split_off()); | ||
let b = self.b.drive_unindexed(consumer.split_off()); | ||
let a = self.a.drive_unindexed(consumer.split_off_left()); | ||
let b = self.b.drive_unindexed(consumer.split_off_left()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, pre-existing, but I wonder if here it would be better to do:
let reducer = consumer.to_reducer();
let a = self.a.drive_unindexed(consumer.split_off_left());
let b = self.b.drive_unindexed(consumer);
reducer.reduce(a, b);
Seems like it would avoid an unnecessary split, which is better for the find_first
code
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed, I'll push that change.
d088271
to
dc0f576
Compare
LGTM! |
ndarray will attempt to use UnindexedProducer/this in a way where there is no ordering, I hope that it can be supported in some way? (Either split is not before/after the other) ascii art |
@bluss That's... challenging. I guess |
Perhaps those need to be in an |
In theory ndarray could offer a regular old iterator called .unorder_iter() which has no guaranteed element order (just whatever order is quicker to iterate). In the sense of defining the parallel iterator over that sequence, I think it's fine. Just like how the sequential version of find_first ( |
@bluss I'm not sure I quite follow, but it feels like that can be modeled "locally" as saying that the order of items from matrix iterators is not defined (much like the order of hashmap's iterator is not defined). This sort of implies that |
In other words, I'm not sure we need to surface this distinction in the traits, though I agree we could. |
Maybe that's worth a note in the |
The correspondence to arbitrary order sequential iterators clears it up nicely I think. |
No description provided.