split_node#
[flow_graph.split_node]
A split_node sends each element of the incoming std::tuple to the output port that matches the element index
in the incoming tuple.
// Defined in header <oneapi/tbb/flow_graph.h>
namespace oneapi {
namespace tbb {
namespace flow {
    template < typename TupleType >
    class split_node : public graph_node, public receiver<TupleType> {
    public:
        explicit split_node( graph &g );
        split_node( const split_node &other );
        ~split_node();
        bool try_put( const TupleType &v );
        using output_ports_type = /*implementation-defined*/ ;
        output_ports_type& output_ports();
    };
} // namespace flow
} // namespace tbb
} // namespace oneapi
Requirements:
The type
TupleTypemust be an instantiation ofstd::tuple.
split_node is a receiver<TupleType> and has a tuple of sender output ports. Each of output
ports is specified by corresponding tuple element type. This node receives a tuple at its single input
port and generates a message from each element of the tuple, passing each to the corresponding output port.
split_node has a discarding and broadcast-push properties.
split_node has unlimited concurrency, and behaves as a broadcast_node with multiple output ports.
Member functions#
- 
split_node(const split_node &other)#
 Constructs a
split_nodethat has the same initial state thatotherhad when it was constructed. Thesplit_nodethat is constructed has a reference to the samegraphobject asother. The predecessors and successors ofotherare not copied.
- 
~split_node()#
 Destructor
- 
bool try_put(const TupleType &v)#
 Broadcasts each element of the incoming tuple to the nodes connected to the
split_nodeoutput ports. The element at indexiofvwill be broadcast through theith output port.Returns:
true
- 
output_ports_type &output_ports()#
 Returns: a
std::tupleof output ports.