-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Rewrite the parallel raytracing example with rayon
#1380
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
Conversation
I think we'll want to hold off on merging this until the upstream rayon PR is merged, but I wanted to post this for others interested! |
7f31e7f
to
badf5c1
Compare
badf5c1
to
a76a1e6
Compare
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.
🎉
a76a1e6
to
a77eecd
Compare
a77eecd
to
2e1030e
Compare
And now updated with the merged API on rayon-rs/rayon#636! r? @fitzgen |
Or actually you've already approved so I'll merge when green |
One of the best parts about concurrency in Rust is using `rayon` and how easy it makes parallelization of tasks, so it's the ideal example for parallel Rust on the web! Previously we've been unable to use `rayon` because there wasn't a way to customize how rayon threads themselves are spawned, but [that's now being developed for us][rayon]! This commit uses that PR to rewrite the `raytrace-parallel` example in this repository. While not a perfect idiomatic representation of using `rayon` I think this is far more idiomatic than the previous iteration of `raytrace-parallel`! I'm hoping that we can continue to iterate on this, but otherwise show it off as a good example of parallel Rust on the web. [rayon]: rayon-rs/rayon#636
2e1030e
to
eafc602
Compare
Thanks so much again for the help in |
One of the best parts about concurrency in Rust is using
rayon
and howeasy it makes parallelization of tasks, so it's the ideal example for
parallel Rust on the web! Previously we've been unable to use
rayon
because there wasn't a way to customize how rayon threads themselves are
spawned, but that's now being developed for us!
This commit uses that PR to rewrite the
raytrace-parallel
example inthis repository. While not a perfect idiomatic representation of using
rayon
I think this is far more idiomatic than the previous iterationof
raytrace-parallel
! I'm hoping that we can continue to iterate onthis, but otherwise show it off as a good example of parallel Rust on
the web.
Closes #1349