Intel(R) Threading Building Blocks Doxygen Documentation  version 4.2.3
tbb::flow::interface11::function_node< Input, Output, Policy, Allocator > Class Template Reference

Implements a function node that supports Input -> Output. More...

#include <flow_graph.h>

Inheritance diagram for tbb::flow::interface11::function_node< Input, Output, Policy, Allocator >:
Collaboration diagram for tbb::flow::interface11::function_node< Input, Output, Policy, Allocator >:

Public Types

typedef Input input_type
 
typedef Output output_type
 
typedef internal::function_input< input_type, output_type, Policy, internals_allocatorinput_impl_type
 
typedef internal::function_input_queue< input_type, internals_allocatorinput_queue_type
 
typedef internal::function_output< output_typefOutput_type
 
typedef input_impl_type::predecessor_type predecessor_type
 
typedef fOutput_type::successor_type successor_type
 
- Public Types inherited from internal::function_input< Input, continue_msg, queueing, cache_aligned_allocator< Input > >
typedef Input input_type
 
typedef continue_msg output_type
 
typedef function_body< input_type, output_typefunction_body_type
 
typedef function_input< Input, continue_msg, queueing, cache_aligned_allocator< Input > > my_class
 
typedef function_input_base< Input, queueing, cache_aligned_allocator< Input >, my_classbase_type
 
typedef function_input_queue< input_type, cache_aligned_allocator< Input > > input_queue_type
 
- Public Types inherited from internal::function_input_base< Input, queueing, cache_aligned_allocator< Input >, function_input< Input, continue_msg, queueing, cache_aligned_allocator< Input > > >
typedef Input input_type
 The input type of this receiver. More...
 
typedef receiver< input_type >::predecessor_type predecessor_type
 
typedef predecessor_cache< input_type, null_mutex > predecessor_cache_type
 
typedef function_input_queue< input_type, cache_aligned_allocator< Input > > input_queue_type
 
typedef tbb::internal::allocator_rebind< cache_aligned_allocator< Input >, input_queue_type >::type queue_allocator_type
 
- Public Types inherited from internal::function_output< continue_msg >
typedef continue_msg output_type
 
typedef sender< output_type >::successor_type successor_type
 
typedef broadcast_cache< output_typebroadcast_cache_type
 

Public Member Functions

template<typename Body >
__TBB_NOINLINE_SYM function_node (graph &g, size_t concurrency, __TBB_FLOW_GRAPH_PRIORITY_ARG1(Body body, node_priority_t priority=tbb::flow::internal::no_priority))
 Constructor. More...
 
__TBB_NOINLINE_SYM function_node (const function_node &src)
 Copy constructor. More...
 
- Public Member Functions inherited from tbb::flow::interface11::graph_node
 graph_node (graph &g)
 
virtual ~graph_node ()
 
- Public Member Functions inherited from internal::function_input< Input, continue_msg, queueing, cache_aligned_allocator< Input > >
 function_input (graph &g, size_t max_concurrency,)
 
 function_input (const function_input &src)
 Copy constructor. More...
 
 ~function_input ()
 
Body copy_function_object ()
 
output_type apply_body_impl (const input_type &i)
 
taskapply_body_impl_bypass (const input_type &i)
 
- Public Member Functions inherited from internal::function_input_base< Input, queueing, cache_aligned_allocator< Input >, function_input< Input, continue_msg, queueing, cache_aligned_allocator< Input > > >
 __TBB_STATIC_ASSERT (!((internal::has_policy< queueing, queueing >::value) &&(internal::has_policy< rejecting, queueing >::value)), "queueing and rejecting policies can't be specified simultaneously")
 
 function_input_base (graph &g, __TBB_FLOW_GRAPH_PRIORITY_ARG1(size_t max_concurrency, node_priority_t priority))
 Constructor for function_input_base. More...
 
 function_input_base (const function_input_base &src)
 Copy constructor. More...
 
virtual ~function_input_base ()
 Destructor. More...
 
tasktry_put_task (const input_type &t) __TBB_override
 
bool register_predecessor (predecessor_type &src) __TBB_override
 Adds src to the list of cached predecessors. More...
 
bool remove_predecessor (predecessor_type &src) __TBB_override
 Removes src from the list of cached predecessors. More...
 
- Public Member Functions inherited from tbb::flow::interface11::receiver< Input >
virtual ~receiver ()
 Destructor. More...
 
bool try_put (const Input &t)
 Put an item to the receiver. More...
 
virtual __TBB_DEPRECATED bool register_predecessor (predecessor_type &)
 Add a predecessor to the node. More...
 
virtual __TBB_DEPRECATED bool remove_predecessor (predecessor_type &)
 Remove a predecessor from the node. More...
 
- Public Member Functions inherited from internal::function_output< continue_msg >
 function_output (graph &g)
 
 function_output (const function_output &other)
 
bool register_successor (successor_type &r) __TBB_override
 Adds a new successor to this node. More...
 
bool remove_successor (successor_type &r) __TBB_override
 Removes a successor from this node. More...
 
tasktry_put_task (const output_type &i)
 
broadcast_cache_typesuccessors ()
 
graph & graph_reference () const
 

Protected Member Functions

internal::broadcast_cache< output_type > & successors () __TBB_override
 
void reset_node (reset_flags f) __TBB_override
 
- Protected Member Functions inherited from internal::function_input< Input, continue_msg, queueing, cache_aligned_allocator< Input > >
void reset_function_input (reset_flags f)
 
- Protected Member Functions inherited from internal::function_input_base< Input, queueing, cache_aligned_allocator< Input >, function_input< Input, continue_msg, queueing, cache_aligned_allocator< Input > > >
void reset_function_input_base (reset_flags f)
 
void reset_receiver (reset_flags f) __TBB_override
 
graph & graph_reference () const __TBB_override
 
tasktry_get_postponed_task (const input_type &i)
 
- Protected Member Functions inherited from tbb::flow::interface11::receiver< Input >
virtual void reset_receiver (reset_flags f=rf_reset_protocol)=0
 put receiver back in initial state More...
 
virtual bool is_continue_receiver ()
 

Private Types

typedef cache_aligned_allocator< Input > internals_allocator
 

Private Member Functions

 __TBB_STATIC_ASSERT ((tbb::internal::is_same_type< Allocator, null_type >::value), "Allocator template parameter for flow graph nodes is deprecated and will be removed. " "Specify TBB_DEPRECATED_FLOW_NODE_ALLOCATOR to temporary enable the deprecated interface.")
 

Friends

template<typename R , typename B >
class run_and_put_task
 
template<typename X , typename Y >
class internal::broadcast_cache
 
template<typename X , typename Y >
class internal::round_robin_cache
 

Additional Inherited Members

- Public Attributes inherited from tbb::flow::interface11::receiver< Input >
__TBB_DEPRECATED typedef Input input_type
 The input type of this receiver. More...
 
__TBB_DEPRECATED typedef sender< Input > predecessor_type
 The predecessor type for this node. More...
 
- Protected Attributes inherited from tbb::flow::interface11::graph_node
graphmy_graph
 
graph_nodenext
 
graph_nodeprev
 
- Protected Attributes inherited from internal::function_input< Input, continue_msg, queueing, cache_aligned_allocator< Input > >
function_body_typemy_body
 
function_body_typemy_init_body
 
- Protected Attributes inherited from internal::function_input_base< Input, queueing, cache_aligned_allocator< Input >, function_input< Input, continue_msg, queueing, cache_aligned_allocator< Input > > >
graph & my_graph_ref
 
const size_t my_max_concurrency
 
size_t my_concurrency
 
input_queue_typemy_queue
 
predecessor_cache< input_type, null_mutex > my_predecessors
 
- Protected Attributes inherited from internal::function_output< continue_msg >
broadcast_cache_type my_successors
 
graph & my_graph_ref
 

Detailed Description

template<typename Input, typename Output = continue_msg, typename Policy = queueing, typename Allocator = __TBB_DEFAULT_NODE_ALLOCATOR(Input)>
class tbb::flow::interface11::function_node< Input, Output, Policy, Allocator >

Implements a function node that supports Input -> Output.

Definition at line 1448 of file flow_graph.h.

Member Typedef Documentation

◆ fOutput_type

template<typename Input , typename Output = continue_msg, typename Policy = queueing, typename Allocator = __TBB_DEFAULT_NODE_ALLOCATOR(Input)>
typedef internal::function_output<output_type> tbb::flow::interface11::function_node< Input, Output, Policy, Allocator >::fOutput_type

Definition at line 1474 of file flow_graph.h.

◆ input_impl_type

template<typename Input , typename Output = continue_msg, typename Policy = queueing, typename Allocator = __TBB_DEFAULT_NODE_ALLOCATOR(Input)>
typedef internal::function_input<input_type,output_type,Policy,internals_allocator> tbb::flow::interface11::function_node< Input, Output, Policy, Allocator >::input_impl_type

Definition at line 1472 of file flow_graph.h.

◆ input_queue_type

template<typename Input , typename Output = continue_msg, typename Policy = queueing, typename Allocator = __TBB_DEFAULT_NODE_ALLOCATOR(Input)>
typedef internal::function_input_queue<input_type, internals_allocator> tbb::flow::interface11::function_node< Input, Output, Policy, Allocator >::input_queue_type

Definition at line 1473 of file flow_graph.h.

◆ input_type

template<typename Input , typename Output = continue_msg, typename Policy = queueing, typename Allocator = __TBB_DEFAULT_NODE_ALLOCATOR(Input)>
typedef Input tbb::flow::interface11::function_node< Input, Output, Policy, Allocator >::input_type

Definition at line 1470 of file flow_graph.h.

◆ internals_allocator

template<typename Input , typename Output = continue_msg, typename Policy = queueing, typename Allocator = __TBB_DEFAULT_NODE_ALLOCATOR(Input)>
typedef cache_aligned_allocator<Input> tbb::flow::interface11::function_node< Input, Output, Policy, Allocator >::internals_allocator
private

Definition at line 1460 of file flow_graph.h.

◆ output_type

template<typename Input , typename Output = continue_msg, typename Policy = queueing, typename Allocator = __TBB_DEFAULT_NODE_ALLOCATOR(Input)>
typedef Output tbb::flow::interface11::function_node< Input, Output, Policy, Allocator >::output_type

Definition at line 1471 of file flow_graph.h.

◆ predecessor_type

template<typename Input , typename Output = continue_msg, typename Policy = queueing, typename Allocator = __TBB_DEFAULT_NODE_ALLOCATOR(Input)>
typedef input_impl_type::predecessor_type tbb::flow::interface11::function_node< Input, Output, Policy, Allocator >::predecessor_type

Definition at line 1475 of file flow_graph.h.

◆ successor_type

template<typename Input , typename Output = continue_msg, typename Policy = queueing, typename Allocator = __TBB_DEFAULT_NODE_ALLOCATOR(Input)>
typedef fOutput_type::successor_type tbb::flow::interface11::function_node< Input, Output, Policy, Allocator >::successor_type

Definition at line 1476 of file flow_graph.h.

Constructor & Destructor Documentation

◆ function_node() [1/2]

template<typename Input , typename Output = continue_msg, typename Policy = queueing, typename Allocator = __TBB_DEFAULT_NODE_ALLOCATOR(Input)>
template<typename Body >
__TBB_NOINLINE_SYM tbb::flow::interface11::function_node< Input, Output, Policy, Allocator >::function_node ( graph g,
size_t  concurrency,
__TBB_FLOW_GRAPH_PRIORITY_ARG1(Body body, node_priority_t priority=tbb::flow::internal::no_priority  
)
inline

Constructor.

Definition at line 1488 of file flow_graph.h.

1495  fOutput_type(g) {
1496  tbb::internal::fgt_node_with_body( CODEPTR(), tbb::internal::FLOW_FUNCTION_NODE, &this->my_graph,
1497  static_cast<receiver<input_type> *>(this), static_cast<sender<output_type> *>(this), this->my_body );
1498  }

References CODEPTR, tbb::internal::fgt_node_with_body(), internal::function_input< Input, continue_msg, queueing, cache_aligned_allocator< Input > >::my_body, and tbb::flow::interface11::graph_node::my_graph.

Here is the call graph for this function:

◆ function_node() [2/2]

template<typename Input , typename Output = continue_msg, typename Policy = queueing, typename Allocator = __TBB_DEFAULT_NODE_ALLOCATOR(Input)>
__TBB_NOINLINE_SYM tbb::flow::interface11::function_node< Input, Output, Policy, Allocator >::function_node ( const function_node< Input, Output, Policy, Allocator > &  src)
inline

Copy constructor.

Definition at line 1522 of file flow_graph.h.

1522  :
1523  graph_node(src.my_graph),
1524  input_impl_type(src),
1525  fOutput_type(src.my_graph) {
1526  tbb::internal::fgt_node_with_body( CODEPTR(), tbb::internal::FLOW_FUNCTION_NODE, &this->my_graph,
1527  static_cast<receiver<input_type> *>(this), static_cast<sender<output_type> *>(this), this->my_body );
1528  }

References CODEPTR, tbb::internal::fgt_node_with_body(), internal::function_input< Input, continue_msg, queueing, cache_aligned_allocator< Input > >::my_body, and tbb::flow::interface11::graph_node::my_graph.

Here is the call graph for this function:

Member Function Documentation

◆ __TBB_STATIC_ASSERT()

template<typename Input , typename Output = continue_msg, typename Policy = queueing, typename Allocator = __TBB_DEFAULT_NODE_ALLOCATOR(Input)>
tbb::flow::interface11::function_node< Input, Output, Policy, Allocator >::__TBB_STATIC_ASSERT ( (tbb::internal::is_same_type< Allocator, null_type >::value ,
"Allocator template parameter for flow graph nodes is deprecated and will be removed. " "Specify TBB_DEPRECATED_FLOW_NODE_ALLOCATOR to temporary enable the deprecated interface."   
)
private

◆ reset_node()

template<typename Input , typename Output = continue_msg, typename Policy = queueing, typename Allocator = __TBB_DEFAULT_NODE_ALLOCATOR(Input)>
void tbb::flow::interface11::function_node< Input, Output, Policy, Allocator >::reset_node ( reset_flags  f)
inlineprotectedvirtual

◆ successors()

template<typename Input , typename Output = continue_msg, typename Policy = queueing, typename Allocator = __TBB_DEFAULT_NODE_ALLOCATOR(Input)>
internal::broadcast_cache<output_type>& tbb::flow::interface11::function_node< Input, Output, Policy, Allocator >::successors ( )
inlineprotectedvirtual

Implements internal::function_input< Input, continue_msg, queueing, cache_aligned_allocator< Input > >.

Definition at line 1549 of file flow_graph.h.

1549 { return fOutput_type::my_successors; }

References internal::function_output< Output >::my_successors.

Referenced by tbb::flow::interface11::function_node< Input, Output, Policy, Allocator >::reset_node().

Here is the caller graph for this function:

Friends And Related Function Documentation

◆ internal::broadcast_cache

template<typename Input , typename Output = continue_msg, typename Policy = queueing, typename Allocator = __TBB_DEFAULT_NODE_ALLOCATOR(Input)>
template<typename X , typename Y >
friend class internal::broadcast_cache
friend

Definition at line 1545 of file flow_graph.h.

◆ internal::round_robin_cache

template<typename Input , typename Output = continue_msg, typename Policy = queueing, typename Allocator = __TBB_DEFAULT_NODE_ALLOCATOR(Input)>
template<typename X , typename Y >
friend class internal::round_robin_cache
friend

Definition at line 1546 of file flow_graph.h.

◆ run_and_put_task

template<typename Input , typename Output = continue_msg, typename Policy = queueing, typename Allocator = __TBB_DEFAULT_NODE_ALLOCATOR(Input)>
template<typename R , typename B >
friend class run_and_put_task
friend

Definition at line 1544 of file flow_graph.h.


The documentation for this class was generated from the following file:
CODEPTR
#define CODEPTR()
Definition: _flow_graph_trace_impl.h:297
__TBB_ASSERT
#define __TBB_ASSERT(predicate, comment)
No-op version of __TBB_ASSERT.
Definition: tbb_stddef.h:165
tbb::flow::interface11::graph_node::my_graph
graph & my_graph
Definition: _flow_graph_impl.h:464
tbb::internal::fgt_node_with_body
static void fgt_node_with_body(void *, string_index, void *, void *, void *)
Definition: _flow_graph_trace_impl.h:330
__TBB_FLOW_GRAPH_PRIORITY_ARG1
#define __TBB_FLOW_GRAPH_PRIORITY_ARG1(arg1, priority)
Definition: _flow_graph_impl.h:40
tbb::flow::concurrency
concurrency
An enumeration the provides the two most common concurrency levels: unlimited and serial.
Definition: flow_graph.h:105
tbb::flow::interface11::function_node::successors
internal::broadcast_cache< output_type > & successors() __TBB_override
Definition: flow_graph.h:1549
tbb::flow::interface11::function_node::fOutput_type
internal::function_output< output_type > fOutput_type
Definition: flow_graph.h:1474
internal::node_cache::clear
void clear()
Definition: _flow_graph_cache_impl.h:54
tbb::flow::interface11::graph_node::graph_node
graph_node(graph &g)
Definition: flow_graph.h:887
internal::function_output::my_successors
broadcast_cache_type my_successors
Definition: _flow_graph_node_impl.h:920
tbb::flow::interface11::rf_clear_edges
@ rf_clear_edges
Definition: _flow_graph_impl.h:161
internal::function_input< Input, continue_msg, queueing, cache_aligned_allocator< Input > >::my_body
function_body_type * my_body
Definition: _flow_graph_node_impl.h:517
internal::function_input_base< Input, queueing, cache_aligned_allocator< Input >, function_input< Input, continue_msg, queueing, cache_aligned_allocator< Input > > >::my_predecessors
predecessor_cache< input_type, null_mutex > my_predecessors
Definition: _flow_graph_node_impl.h:185
internal::node_cache::empty
bool empty()
Definition: _flow_graph_cache_impl.h:35
internal::function_input::reset_function_input
void reset_function_input(reset_flags f)
Definition: _flow_graph_node_impl.h:508
tbb::flow::interface11::function_node::input_impl_type
internal::function_input< input_type, output_type, Policy, internals_allocator > input_impl_type
Definition: flow_graph.h:1472

Copyright © 2005-2020 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.