Intel® oneAPI Threading Building Blocks
Ask questions and share information about adding parallelism to your applications when using this threading library.

flow graph join node

dophine
Beginner
247 Views
Hi,

After reading the reference, I still don't quite understand the difference bewteen reserving and queuing policy og joim node.
Is there anyone who can explain more detail and appreciate if an example is provided?

Regards,
Dophine
0 Kudos
1 Reply
RafSchietekat
Valued Contributor III
247 Views
As far as I understand from my limited exposure so far, this is sort of a two-way commit, triggered by the potential readiness of all inputs. The join_node then asks each input to confirm (first phase), and only consumes the input if confirmation is unanimous (second phase); the rest are implementation details. It requires that each source is capable of buffering, otherwise you have to use the queuing policy instead, or insert a buffering node yourself between the join node and individual sources.

It is less clear to me how this balances out between cardinality control (a message is used exactly once even if a source has another successor), or flow control (no buildup in infinite buffers). It is also not clear to me why a potentially wasted copy is already made during try_reserve() and not during try_consume(). I may even be way off the mark, so please take this with caution and possibly correct & augment as required.
0 Kudos
Reply