join_node
[flow_graph.join_node]
入力ポートで受け取ったメッセージのセットからタプルを作成して、タプルをすべての後続 (サクセサー) にブロードキャストするノード。
// <oneapi/tbb/flow_graph.h> ヘッダーで定義
namespace oneapi {
namespace tbb {
namespace flow {
using tag_value = /*implementation-specific*/;
template<typename OutputTuple, class JoinPolicy = /*implementation-defined*/>
class join_node : public graph_node, public sender< OutputTuple > {
public:
using input_ports_type = /*implementation-defined*/;
explicit join_node( graph &g );
join_node( const join_node &src );
input_ports_type &input_ports( );
bool try_get( OutputTuple &v );
};
template<typename OutputTuple, typename K, class KHash=tbb_hash_compare<K> >
class join_node< OutputTuple, key_matching<K,KHash> > : public graph_node, public sender< OutputTuple > {
public:
using input_ports_type = /*implementation-defined*/;
explicit join_node( graph &g );
join_node( const join_node &src );
template<typename B0, typename B1> join_node( graph &g, B0 b0, B1 b1 );
template<typename B0, typename B1, typename B2>
join_node( graph &g, B0 b0, B1 b1, B2 b2 );
template<typename B0, typename B1, typename B2, typename B3>
join_node( graph &g, B0 b0, B1 b1, B2 b2, B3 b3 );
template<typename B0, typename B1, typename B2, typename B3, typename B4>
join_node( graph &g, B0 b0, B1 b1, B2 b2, B3 b3, B4 b4 );
template<typename B0, typename B1, typename B2, typename B3, typename B5>
join_node( graph &g, B0 b0, B1 b1, B2 b2, B3 b3, B4 b4, B5 b5 );
template<typename B0, typename B1, typename B2, typename B3, typename B5, typename B6>
join_node( graph &g, B0 b0, B1 b1, B2 b2, B3 b3, B4 b4, B5 b5, B6 b6 );
template<typename B0, typename B1, typename B2, typename B3, typename B5, typename B6, typename B6>
join_node( graph &g, B0 b0, B1 b1, B2 b2, B3 b3, B4 b4, B5 b5, B6 b6, B7 b7 );
template<typename B0, typename B1, typename B2, typename B3, typename B5, typename B6, typename B7>
join_node( graph &g, B0 b0, B1 b1, B2 b2, B3 b3, B4 b4, B5 b5, B6 b6, B7 b7 );
template<typename B0, typename B1, typename B2, typename B3, typename B5, typename B6, typename B7, typename B8>
join_node( graph &g, B0 b0, B1 b1, B2 b2, B3 b3, B4 b4, B5 b5, B6 b6, B7 b7, B8 b8 );
template<typename B0, typename B1, typename B2, typename B3, typename B5, typename B6, typename B7, typename B8, typename B9>
join_node( graph &g, B0 b0, B1 b1, B2 b2, B3 b3, B4 b4, B5 b5, B6 b6, B7 b7, B8 b8, B9 b9 );
input_ports_type &input_ports( );
bool try_get( OutputTuple &v );
};
} // namespace flow
} // namespace tbb
} // namespace oneapi要件:
OutputTupleタイプはstd::tupleのインスタンス化でなければなりません。タプルが格納する各タイプは、[defaultconstructible] の DefaultConstructible 要件、[copyconstructible] の CopyConstructible 要件、および [copyassignable] ISO C++ 標準の CopyAssignable 要件を満たす必要があります。JoinPolicyタイプは、join_nodeのバッファリング・ポリシーの 1 つとして指定する必要があります。KHashタイプは、HashCompare 要件を満たしている必要があります。Biタイプは、JoinNodeFunctionObject 要件を満たしている必要があります。
join_node は、graph_node および sender<OutputTuple> です。これには入力ポートのタプルが含まれます。OutputTuple の各タイプは、receiver<Type> です。異なるタイプの複数の入力レシーバーをサポートしており、受け取ったメッセージのタプルをすべての後続にブロードキャストします。join_node の入力ポートはすべて同じバッファリング・ポリシーを使用しなければなりません。
join_node の動作はバッファリングのポリシーに影響されます。
input_port テンプレート関数は、特定の入力ポートへの参照を取得する構文を単純化します。
join_node には、バッファリング と broadcast-push プロパティーがあります。
メンバーのタイプ
input_ports_type は、入力ポートへのエイリアスです。
メンバー関数
explicit join_node( graph &g );グラフ g に属する空の join_node を構築します。
template<typename B0, typename B1>
join_node( graph &g, B0 b0, B1 b1 );
template<typename B0, typename B1, typename B2>
join_node( graph &g, B0 b0, B1 b1, B2 b2 );
template<typename B0, typename B1, , typename B2, typename B3>
join_node( graph &g, B0 b0, B1 b1, B2 b2, B3 b3 );
template<typename B0, typename B1, , typename B2, typename B3, typename B4>
join_node( graph &g, B0 b0, B1 b1, B2 b2, B3 b3, B4 b4 );
template<typename B0, typename B1, , typename B2, typename B3, typename B5>
join_node( graph &g, B0 b0, B1 b1, B2 b2, B3 b3, B4 b4, B5 b5 );
template<typename B0, typename B1, , typename B2, typename B3, typename B5, typename B6>
join_node( graph &g, B0 b0, B1 b1, B2 b2, B3 b3, B4 b4, B5 b5, B6 b6 );
template<typename B0, typename B1, , typename B2, typename B3, typename B5, typename B6, typename B6>
join_node( graph &g, B0 b0, B1 b1, B2 b2, B3 b3, B4 b4, B5 b5, B6 b6, B7 b7 );
template<typename B0, typename B1, , typename B2, typename B3, typename B5, typename B6, typename B7>
join_node( graph &g, B0 b0, B1 b1, B2 b2, B3 b3, B4 b4, B5 b5, B6 b6, B7 b7 );
template<typename B0, typename B1, , typename B2, typename B3, typename B5, typename B6, typename B7, typename B8>
join_node( graph &g, B0 b0, B1 b1, B2 b2, B3 b3, B4 b4, B5 b5, B6 b6, B7 b7, B8 b8 );
template<typename B0, typename B1, , typename B2, typename B3, typename B5, typename B6, typename B7, typename B8, typename B9>
join_node( graph &g, B0 b0, B1 b1, B2 b2, B3 b3, B4 b4, B5 b5, B6 b6, B7 b7, B8 b8, B9 b9 );join_node の key_matching の特殊化でのみ利用できるコンストラクター。
関数オブジェクト b0、b1、… 、bN を使用して入力ポート 0 から N のタグを決定する join_node を作成します。
警告
join_node コンストラクターに渡す関数オブジェクトは例外をスローしてはなりません。これらは並列に呼び出され、純粋で、最小時間で、非ブロックでなければなりません。
join_node( const join_node &src )src の作成時の状態と同じ初期状態で join_node を作成します。先行リスト、入力ポートにあるメッセージ、後続はコピーされません。
input_ports_type &input_ports( )戻り値: レシーバーの std::tuple。各要素は receiver<T> から値を継承します。T はその入力で想定されるメッセージのタイプです。各タプル要素は、他の receiver<T> と同様に使用できます。ポートの動作は選択された join_node のポリシーに従います。
bool try_get( output_type &v )join_node のバッファリング・ポリシーに基づいてタプルを生成しようとします。
タプルの生成に成功した場合、生成したタプルを v にコピーして true を返します。それ以外は false を返します。
非メンバーのタイプ
using tag_value = /*implementation-specific*/;tag_value は、tag_matching ポリシーを定義する符号なしの整数タイプです。
デダクション・ガイド
template <typename Body, typename... Bodies>
join_node(graph&, Body, Bodies...)
->join_node<std::tuple<std::decay_t<input_t<Body>>, std::decay_t<input_t<Bodies>>...>, key_matching<output_t<Body>>>;
説明:
input_tは、渡された関数オブジェクトの入力引数タイプのエイリアスです。output_tは、渡された関数オブジェクトの戻り値タイプのエイリアスです。
