- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
When it's logged...hahaha... sorry, couldn't resist.
I was asked this question "When is a task graph not a tree in TBB?" I couldn't think of a good answer. Does anyone have an example of a task graph that isn't a tree?
AJ
I was asked this question "When is a task graph not a tree in TBB?" I couldn't think of a good answer. Does anyone have an example of a task graph that isn't a tree?
AJ
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I suppose technically it's a forest, because there can be multiple root tasks. If you want to simulate a directed acyclic graph of dependencies (examples aplenty), you have to find a supporting tree (would that always be a subgraph?) that is represented directly in TBB (which doesn't do dags), and fill in the missing dependencies by adding empty_task children of the dependent tasks to be explicitly spawned by their dependencies on completion (or use release_ref() as implemented in the "Pipeline" thread).

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page