TBB flow graph conditional execution
问题 It possible to control execution path in the TBB Flow Graph dynamically, using output of a node as a condition variable to determine whether another node should be launched? 回答1: There are a couple ways to dynamically control where messages go in a flow::graph: You can explicitly put messages to other nodes in the body of a node. Notice that func_body puts a message to f1 or f2 , depending on the value of its input. The nodes are not attached by make_edge() , because the flow of messages is