-
Notifications
You must be signed in to change notification settings - Fork 510
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
Add an Iterator::scan equivalent #329
Comments
I'd like to try this out, but I'm having a hard time understanding the notes from the wiki.
Ok, so the iterator will be
I'm not sure what this means. VecTree? Is this just the "split tree", in which the nodes are the segments as The last three points are also unclear, but I don't want to flat out take a guess at what is meant, as it might be clear if I can understand the above 😄 |
I also asked @nikomatsakis to clarify, because I don't really get it either. 😄 I can answer about |
Sorry for not responding. I'll try to figure out what I meant and write it up. ;) |
Just dropped by to +1 this since I was looking to compute a prefix sum with rayon. |
hi, I've done a LOT of prefix sum implementations. I also have a "successors" implementation in my crate. |
@wagnerf42 There is a 'TODO: wip' in the code you linked to. care to elaborate? Possibly related/useful is this information about doing this kind of stuff on the GPU: https://people.eecs.berkeley.edu/~driscoll/cs267/papers/gpugems3_ch39.html. If I understand it correctly, it explains that even the first traversal/ creation of the tree (that the first post in this issue refers to) could be done in parallel, with every higher level of the tree being worked on by half of the threads of the lower level. |
I has been 5 years. ^^ |
It has, but it is never too late to add a cool and useful feature 😉 |
Agree! It would be excited to see |
I'm interested in working on this. I've tried to write some code to test out the ideas here and in #393. I think a LinkedList might be sufficient, rather than adding the overhead of a tree. |
could you give some details on how you want to do it ? there are several ways, with different pros and cons |
Generally following the way proposed in the first comment of this issue, but without the VecTree (also discussed here):
The first step would use a consumer, then some sequential work, and the last step would create a producer (it can be indexed with a little extra work). |
I heard from someone who wanted to use my above PR in their project, so I've released it as a separate crate: https://crates.io/crates/rayon-scan |
@nikomatsakis's notes from the wiki:
The text was updated successfully, but these errors were encountered: