- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
Perhaps, it is a newbie question.
Here is the question:
I have N integers from 0..N-1. The integers arrive without order.
A sequencer node can put them in order.
Then, I would like to create pairs as follows:
(0,1), (1,2), (2,3), ..., (N-2, N-1) .
How could this implemented with the flow graph?
I cannot make it work with a join node as I tried to feedback the output to one of the inputs but it does not even start the graph.
I tried to create my own multifunction node which implements this pairwise behavior, but it either stops to early or gets stuck in an infinite loop.
Is there an example with this behavior that I am not aware of?
Thank you
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Thanks for posting in Intel Communities.
You can use function_node to generate integers from 0 to N-2.
We can create a user-defined body on incoming messages that create a pair and pass this class to function_node.
Please refer to the below link for more details:
https://spec.oneapi.io/versions/latest/elements/oneTBB/source/flow_graph/func_node_cls.html
We can also use join_node by creating two function_nodes and combine into pairs of consecutive integers using join_node.
Refer to the below link for more details:
https://spec.oneapi.io/versions/latest/elements/oneTBB/source/flow_graph.html
Thanks & Regards,
Noorjahan.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
We haven't heard back from you. Could you please provide an update on your issue?
Thanks & Regards,
Noorjahan.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I have not heard back from you, so I will close this inquiry now. If you need further assistance, please post a new question.
Thanks & Regards,
Noorjahan.

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