Intel(R) Threading Building Blocks Doxygen Documentation  version 4.2.3
tbb::flow::interface10::split_node< TupleType, Allocator > Class Template Reference

split_node: accepts a tuple as input, forwards each element of the tuple to its More...

#include <flow_graph.h>

Inheritance diagram for tbb::flow::interface10::split_node< TupleType, Allocator >:
Collaboration diagram for tbb::flow::interface10::split_node< TupleType, Allocator >:

Public Types

typedef TupleType input_type
 
typedef Allocator allocator_type
 
typedef internal::wrap_tuple_elements< N, internal::multifunction_output, TupleType >::type output_ports_type
 
- Public Types inherited from tbb::flow::interface10::receiver< TupleType >
typedef TupleType input_type
 The input type of this receiver. More...
 
typedef internal::async_helpers< TupleType >::filtered_type filtered_type
 
- Public Types inherited from tbb::flow::interface10::internal::untyped_receiver
typedef untyped_sender predecessor_type
 The predecessor type for this node. More...
 

Public Member Functions

 split_node (graph &g)
 
 split_node (const split_node &other)
 
output_ports_typeoutput_ports ()
 
- Public Member Functions inherited from tbb::flow::interface10::graph_node
 graph_node (graph &g)
 
virtual ~graph_node ()
 
- Public Member Functions inherited from tbb::flow::interface10::receiver< TupleType >
bool try_put (const typename internal::async_helpers< TupleType >::filtered_type &t)
 Put an item to the receiver. More...
 
bool try_put (const typename internal::async_helpers< TupleType >::async_type &t)
 
- Public Member Functions inherited from tbb::flow::interface10::internal::untyped_receiver
virtual ~untyped_receiver ()
 Destructor. More...
 
template<typename X >
bool try_put (const X &t)
 Put an item to the receiver. More...
 
virtual bool register_predecessor (predecessor_type &)
 Add a predecessor to the node. More...
 
virtual bool remove_predecessor (predecessor_type &)
 Remove a predecessor from the node. More...
 

Protected Member Functions

tasktry_put_task (const TupleType &t) __TBB_override
 Put item to successor; return task to run the successor if possible. More...
 
void reset_node (reset_flags f) __TBB_override
 
void reset_receiver (reset_flags) __TBB_override
 put receiver back in initial state More...
 
graphgraph_reference () __TBB_override
 
- Protected Member Functions inherited from tbb::flow::interface10::receiver< TupleType >
virtual tasktry_put_task_wrapper (const void *p, bool is_async) __TBB_override
 
- Protected Member Functions inherited from tbb::flow::interface10::internal::untyped_receiver
template<typename X >
tasktry_put_task (const X &t)
 
virtual bool is_continue_receiver ()
 

Private Types

typedef receiver< TupleType > base_type
 

Private Attributes

output_ports_type my_output_ports
 

Static Private Attributes

static const int N = tbb::flow::tuple_size<TupleType>::value
 

Additional Inherited Members

- Protected Attributes inherited from tbb::flow::interface10::graph_node
graphmy_graph
 
graph_nodenext
 
graph_nodeprev
 

Detailed Description

template<typename TupleType, typename Allocator = cache_aligned_allocator<TupleType>>
class tbb::flow::interface10::split_node< TupleType, Allocator >

split_node: accepts a tuple as input, forwards each element of the tuple to its

Definition at line 1258 of file flow_graph.h.

Member Typedef Documentation

◆ allocator_type

template<typename TupleType , typename Allocator = cache_aligned_allocator<TupleType>>
typedef Allocator tbb::flow::interface10::split_node< TupleType, Allocator >::allocator_type

Definition at line 1263 of file flow_graph.h.

◆ base_type

template<typename TupleType , typename Allocator = cache_aligned_allocator<TupleType>>
typedef receiver<TupleType> tbb::flow::interface10::split_node< TupleType, Allocator >::base_type
private

Definition at line 1260 of file flow_graph.h.

◆ input_type

template<typename TupleType , typename Allocator = cache_aligned_allocator<TupleType>>
typedef TupleType tbb::flow::interface10::split_node< TupleType, Allocator >::input_type

Definition at line 1262 of file flow_graph.h.

◆ output_ports_type

template<typename TupleType , typename Allocator = cache_aligned_allocator<TupleType>>
typedef internal::wrap_tuple_elements< N, internal::multifunction_output, TupleType >::type tbb::flow::interface10::split_node< TupleType, Allocator >::output_ports_type

Definition at line 1275 of file flow_graph.h.

Constructor & Destructor Documentation

◆ split_node() [1/2]

template<typename TupleType , typename Allocator = cache_aligned_allocator<TupleType>>
tbb::flow::interface10::split_node< TupleType, Allocator >::split_node ( graph g)
inlineexplicit

Definition at line 1277 of file flow_graph.h.

1277  : graph_node(g)
1278  {
1279  tbb::internal::fgt_multioutput_node<N>(tbb::internal::FLOW_SPLIT_NODE, &this->my_graph,
1280  static_cast<receiver<input_type> *>(this), this->output_ports());
1281  }
output_ports_type & output_ports()
Definition: flow_graph.h:1294

◆ split_node() [2/2]

template<typename TupleType , typename Allocator = cache_aligned_allocator<TupleType>>
tbb::flow::interface10::split_node< TupleType, Allocator >::split_node ( const split_node< TupleType, Allocator > &  other)
inline

Definition at line 1282 of file flow_graph.h.

1282  : graph_node(other.my_graph), base_type(other)
1283  {
1284  tbb::internal::fgt_multioutput_node<N>(tbb::internal::FLOW_SPLIT_NODE, &this->my_graph,
1285  static_cast<receiver<input_type> *>(this), this->output_ports());
1286  }
output_ports_type & output_ports()
Definition: flow_graph.h:1294
receiver< TupleType > base_type
Definition: flow_graph.h:1260

Member Function Documentation

◆ graph_reference()

template<typename TupleType , typename Allocator = cache_aligned_allocator<TupleType>>
graph& tbb::flow::interface10::split_node< TupleType, Allocator >::graph_reference ( )
inlineprotectedvirtual

Implements tbb::flow::interface10::internal::untyped_receiver.

Definition at line 1309 of file flow_graph.h.

References __TBB_override.

1309  {
1310  return my_graph;
1311  }

◆ output_ports()

template<typename TupleType , typename Allocator = cache_aligned_allocator<TupleType>>
output_ports_type& tbb::flow::interface10::split_node< TupleType, Allocator >::output_ports ( )
inline

Definition at line 1294 of file flow_graph.h.

1294 { return my_output_ports; }

◆ reset_node()

template<typename TupleType , typename Allocator = cache_aligned_allocator<TupleType>>
void tbb::flow::interface10::split_node< TupleType, Allocator >::reset_node ( reset_flags  f)
inlineprotectedvirtual

Implements tbb::flow::interface10::graph_node.

Definition at line 1302 of file flow_graph.h.

1302  {
1303  if (f & rf_clear_edges)
1305 
1306  __TBB_ASSERT(!(f & rf_clear_edges) || internal::clear_element<N>::this_empty(my_output_ports), "split_node reset failed");
1307  }
#define __TBB_ASSERT(predicate, comment)
No-op version of __TBB_ASSERT.
Definition: tbb_stddef.h:165

◆ reset_receiver()

template<typename TupleType , typename Allocator = cache_aligned_allocator<TupleType>>
void tbb::flow::interface10::split_node< TupleType, Allocator >::reset_receiver ( reset_flags  f)
inlineprotectedvirtual

put receiver back in initial state

Implements tbb::flow::interface10::internal::untyped_receiver.

Definition at line 1308 of file flow_graph.h.

1308 {}

◆ try_put_task()

template<typename TupleType , typename Allocator = cache_aligned_allocator<TupleType>>
task* tbb::flow::interface10::split_node< TupleType, Allocator >::try_put_task ( const TupleType &  t)
inlineprotectedvirtual

Put item to successor; return task to run the successor if possible.

Implements tbb::flow::interface10::receiver< TupleType >.

Definition at line 1297 of file flow_graph.h.

1297  {
1298  // Sending split messages in parallel is not justified, as overheads would prevail.
1299  // Also, we do not have successors here. So we just tell the task returned here is successful.
1301  }
output_ports_type & output_ports()
Definition: flow_graph.h:1294
static task * emit_this(graph &g, const T &t, P &p)
Definition: flow_graph.h:658

Member Data Documentation

◆ my_output_ports

template<typename TupleType , typename Allocator = cache_aligned_allocator<TupleType>>
output_ports_type tbb::flow::interface10::split_node< TupleType, Allocator >::my_output_ports
private

Definition at line 1333 of file flow_graph.h.

◆ N

template<typename TupleType , typename Allocator = cache_aligned_allocator<TupleType>>
const int tbb::flow::interface10::split_node< TupleType, Allocator >::N = tbb::flow::tuple_size<TupleType>::value
staticprivate

Definition at line 1259 of file flow_graph.h.


The documentation for this class was generated from the following file:

Copyright © 2005-2019 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its subsidiaries in the United States and other countries.

* Other names and brands may be claimed as the property of others.