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

Join Node Tuple Size



I am a student and work on a project which requires to use parallel code. We opted to use Intel Threading Building Blocks. In this aplication I have to use a 9-tuple join node. I developed my code in Visual Studio 2012.

(So far) I have 2 problems with this.
1) I cannot create a 9-tuple.
I can create a 8 (or less) -tuple and I get no red underlining from VS but if I try to create the 9-tuple VS tells me
"Error: too many arguments for class template "std::tuple"".
2) The join_node has "internal" errors if I try to use a 6-tuple.
When I use a 5 (or less) -tuple it works fine, but as soon as I want to use a 6 (or more) -tuple I get errors at the constructor of the join_node as well as at the make_edge functions, specifically at the input_port<*>(join_node).
The error at the constructor is not underlined but if I try to run the code (with all the make_edges commented), I get errors in the _flow_graph_join_impl.h file.
(errors in the "intelJoinNodeConstructorErrors.jpg" file)
If I uncomment the make_edges, I get every make_edge underlined, which have the input_port<*>(join_node) as the second argument.
(errors in the "intelMakeEdgeErrors.jpg" file)

How can I solve these 2 problems?
I have attached the source file and the 2 images that show the errors.
The source code is not the original one, I have simplified it so that the errors are clearer in this version.

Thanks in advance,

Andrei Costinescu

0 Kudos
1 Reply

See for explanation of the issue with std::tuple size in VS2012. The solution is also described there: define the macro _VARIADIC_MAX to the tuple size that you need. The flow graph nodes respect that macro as well, so everything should be set then.

0 Kudos