- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello oneTBB community,
I am new to oneTBB and was wondering about the following. I have an image processing "pipeline" with the following simplified processing chain:
| | | |
V V V V
... Input Input Input Input ...
/ | \ / | \ / | \ / | \
| X | X | X |
\ | / \ | / \ | / \ | /
V V V V V V V V V V V V
... Output Output Output Output
Basically, each output image depends on three successive input images. Or to put it the other way around, each input gets fed to three outputs. The input data is an endless image stream from a camera. So the "task graph" of the above pipeline is infinite.
I tried reading into oneTBB docs, and also proTBB (book about flow graphs), but got overwhelmed and confused. I would be happy to get some pointers on which concept from oneTBB could be used to implement the pipeline above. In reality, the Input and Output stages perform internal processing, however that can be easily absorbed into a finite acyclic graph each.
Best,
Tobias
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Tobias,
Sorry for a delayed response.
For you particular use case consider having a maltifunction node with three outputs each of each gets connected to the corresponding input port of the tag matching join node. The multifunction node's body has internal, perhaps, atomic counter (make sure you don't have data races, especially if unlimited concurrency specified during multifunction node construction) that signifies the output port to send a message to.
Tags of the join node designate the index of the three successive input images so that tag zero means it is one of the three images from the first algorithm iteration, tag one - --//-- from the second algorithm iteration and so on. Connect as a successor of the join node some processing node (e.g. function node) so that it gets a tuple of three images that all correspond to one common tag.
You can also put an input node(s) at the beginning of the graph that would generate images and feed them to the multifunction node.
You may also apply one of the flow graph resource consumption tricks (e.g. introduce token-based scheme by adding buffer node with your own tokens).
Regards,
Aleksei
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Tobias,
Your question was addressed to TBB developers and will be handled in a timely manner.
Have a nice day ahead!
Mariya
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Tobias,
Sorry for a delayed response.
For you particular use case consider having a maltifunction node with three outputs each of each gets connected to the corresponding input port of the tag matching join node. The multifunction node's body has internal, perhaps, atomic counter (make sure you don't have data races, especially if unlimited concurrency specified during multifunction node construction) that signifies the output port to send a message to.
Tags of the join node designate the index of the three successive input images so that tag zero means it is one of the three images from the first algorithm iteration, tag one - --//-- from the second algorithm iteration and so on. Connect as a successor of the join node some processing node (e.g. function node) so that it gets a tuple of three images that all correspond to one common tag.
You can also put an input node(s) at the beginning of the graph that would generate images and feed them to the multifunction node.
You may also apply one of the flow graph resource consumption tricks (e.g. introduce token-based scheme by adding buffer node with your own tokens).
Regards,
Aleksei
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Tobias,
Did Aleksei's recommendation help you?
If yes, I would mark this forum topic as solved.
Thanks, Mariya
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Tobias,
We haven’t heard back from you. This thread won't be monitored anymore. For further issues and queries, please start a new thread.
Thanks, Mariya
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page