Skip to content

Conversation

kboyarinov
Copy link
Contributor

No description provided.

Creates a ``join_node`` that uses the function objects ``b0``, ``b1``, ... , ``bN`` to determine
the tags for the input ports ``0`` through ``N``.

**Constraints:**: only participates in overload resolution if ``std::tuple_size<OutputTuple>::value`` is ``2 + sizeof...(BN)``.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Introducing this constraint changes can change the behavior for the existing code.
The design of the key_matching join_node implies that the number of argument is equivalent to the number of elements in the tuple.
oneTBB implementation generates a compile-time error if it is not the case. With this constraint, this overload would not participate in overload resolution, that will be different compiler-time error in most cases.

Comment on lines +43 to +44
template <typename B0, typename... BN>
join_node( graph &g, B0 b0, BN... bn );
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we consider adding this constructor as a breaking change, the alternative is to keep the "old" set of constructors and introduce the variadic constructor to handle cases when number of elements is more than 10.

Existing constructors will match better for 2-10 arguments and the old behavior is guaranteed to be preserved.

But on the other hand, a set of existing constructors will be generated from a variadic by the compiler and the only difference in the behavior is the constraint (that can be omitted if we consider it breaking).

@akukanov akukanov added the TBB label Oct 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants