Greetings Overflowers,
- The data structure is an acyclic tree of arbitrary number of nodes.
- Shallower nodes are dependent on the results of deeper nodes.
- The final result can simply be calculated by traversing the tree recursively.
- If I had unlimited threads, I would assign each node one thread or even more.
- Threads assigned to shallower nodes would wait for those of deeper nodes to finish.
- However, I only have limited threads; sometimes more, sometimes less than total nodes.
Any thoughts on how to traverse such trees and eventually get the final results with limited threads ?
Regards