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

Bug in flow graph documentation ?

Daniel_G_5
Beginner
208 Views

Hi,

I've tried to compile and run this code with tbb 4.1:

http://software.intel.com/sites/products/documentation/doclib/tbb_sa/help/reference/flow_graph/message_flow_graph_example.htm

But found some errors, the changes I did to make it work was to replace:

broadcast_node<int> input;

for

broadcast_node<int> input(g);

and 

make_edge( squarer, std::get<0>( join.inputs() ) );
make_edge( cuber, std::get<1>( join.inputs() ) );

for:

make_edge( squarer, std::get<0>( join.input_ports() ) );
make_edge( cuber, std::get<1>( join.input_ports() ) );

With that I could compile with tbb 4.1 

Regards,

0 Kudos
1 Reply
Christophe_H_Intel
208 Views

Hello, Daniel,

Thank you for pointing the problem out.  The blog you mentioned was written before two changes:

  1. The names of the ports for the join and the other tuple-based nodes were changed to be more-descriptive,
  2. The nodes were tracked by the graph they belong to for the purpose of resetting.

We should update the code to reflect the changes (we have been discussing this subject recently, but have yet to have a good general solution.)

Best Regards,
Chris

0 Kudos
Reply