-
Notifications
You must be signed in to change notification settings - Fork 524
[docs] document the plumbing
APIs and so forth that are used to make your own parallel iterators
#177
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
Comments
There's src/par_iter/README.md with a design discussion, and I'd also suggest people to work by example from existing iterators. IMO it's hard to know what's lacking until people start asking questions, which is how we got the I'm also not sure whether @nikomatsakis wants the internals to be considered part of the stable API, which might be another reason to hide their docs. |
Thanks for that pointer. → Link: par_iter/README.md I just started working on it, but the lack of starting point in the docs had put me off for a long time, this time I just decided to toss in the https://github.com/bluss/rust-ndarray/compare/par-iter-wip-1?expand=1 No work needed to implement ParallelIterator for AxisIter, since it already supports iteration and splitting. That's great! Just needed to figure out the boiler plate then. The import list tells you that there is a moderate amount of it: +use rayon::par_iter::ParallelIterator;
+use rayon::par_iter::IndexedParallelIterator;
+use rayon::par_iter::ExactParallelIterator;
+use rayon::par_iter::BoundedParallelIterator;
+use rayon::par_iter::internal::{Consumer, UnindexedConsumer};
+use rayon::par_iter::internal::bridge;
+use rayon::par_iter::internal::ProducerCallback;
+use rayon::par_iter::internal::Producer;
+ Right at this point when I'm showing the WIP is when I realize that the |
It's been publically indicated it is unsure which parts of the library are for external consumption. Here and in https://github.com/nikomatsakis/rayon/pull/188#issuecomment-269626504 The crucial parts for implementing parallel iterators are also hidden from docs. While this is unclear, it is not possible to depend on rayon for the purpose of implementing ParallelIterator and related traits. (Which is frustrating, because implementation in ndarray is now almost done, at least well enough for the first release.) |
See #209 -- I didn't actually add any new documentation yet, but I did un-hide some of those APIs required for implementing iterators, and this opens the door for writing proper documentation on them. |
Using strategy "2" of an intermediate crate called ndarray-parallel is in the works rust-ndarray/ndarray#264 |
I'm bumping this up to 1.0 milestone -- I think at least some basic docs are needed, just because I want to turn on |
internal
APIs and so forth that are used to make your own parallel iterators
internal
APIs and so forth that are used to make your own parallel iterators plumbing
APIs and so forth that are used to make your own parallel iterators
Done |
This would be very helpful. Is there any existing documentation?
Also, for usability reasons, I guess the internal methods and parts are hidden in rustdoc. But it's working against those that want to implement parallel iterators.
The text was updated successfully, but these errors were encountered: