Replies: 1 comment 4 replies
-
To follow up on my own question, I was able to find a partial but not efficient solution using
However, it's not efficient - I need to create all tasks before I can spawn any of them, losing parallelism. Without being able to explicitly fork a task, I would need to turn my logic into something that implements |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
In Java's FJP, using
ForkJoinTask
, I can program in this pattern:This is the pattern I would ordinarily apply for instance for a parallel backtracking problem where I have to spawn tasks at decision points. I need to apply this pattern recursively, and expect the framework to implement helping.
How would I express this pattern in Rayon/does Rayon support this type of dynamic task parallelism?
Thanks.
ps: I have seen the
rayon::join
function, but it supports spawning only two tasks.If I were to use
rayon::join
, I'd be forced to rewrite my app to dowhich would require a complete refactoring of my existing backtracking code, which is written in this style:
Beta Was this translation helpful? Give feedback.
All reactions