0

The following C++ code is for Intel TBB. This code was generated by the Flow Graph as well. I have 2 compilation errors:

No matching function for call to 'make_edge'
No matching function for call to 'make_edge'

Here is code with definitions:

 function_node< tbb::flow::tuple<char *,char *>, char * > result_reporter(position3_g0, 1, []( const tbb::flow::tuple<char *,char *> & in ) -> char * {...

function_node< char *, char * > sott_target_node(position3_g0, unlimited, []( char *buffer ) -> char * {

Here is the TBB calling code that creates the compilation errors

make_edge( result_join, result_reporter);

make_edge( sott_target_node, input_port< 2 >( result_join ));

I would glady provide all the code but StackOverflow prevent too much code with little description. Can any one help out figure out these errrors? Thanks

Bryan Downing
  • 207
  • 2
  • 14

1 Answers1

2

You are trying to use the input of the function_node incorrectly. A function_node with an input of tuple<char *, char *> takes a predecessor with a tuple<char *, char *> output.

If this is what you want (that there be two inputs to the node each of char * type, and an output of char *) you should use a combination of an indexer_node (which has multiple input ports, and any input on any port will cause a message to be emitted with the port number and the input wrapped) that connects to a function_node that takes the output type of the indexer_node. Please see the documentation, and ask if you have any questions.

cahuson
  • 826
  • 4
  • 10
  • If you need the node to only be fired when it receives an output from all of its predecessors, You need a join_node. https://software.intel.com/en-us/node/506236 . There are three policies for joining; I'd guess you want a queueing join. The indexer_node immediately forwards each message it receives from each port; the join waits until it has at least one input at each input port before it forwards them. The output of the join is a tuple. – cahuson Jan 02 '17 at 18:01