Intel(R) Threading Building Blocks Doxygen Documentation
version 4.2.3
|
Input and scheduling for a function node that takes a type Input as input. More...
#include <_flow_graph_node_impl.h>
Classes | |
class | operation_type |
Public Types | |
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, A > | input_queue_type |
typedef tbb::internal::allocator_rebind< A, input_queue_type >::type | queue_allocator_type |
![]() | |
typedef untyped_sender | predecessor_type |
The predecessor type for this node. More... | |
Public Member Functions | |
__TBB_STATIC_ASSERT (!((internal::has_policy< queueing, Policy >::value) &&(internal::has_policy< rejecting, Policy >::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... | |
task * | try_put_task (const input_type &t) __TBB_override |
Put item to successor; return task to run the successor if possible. More... | |
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... | |
![]() | |
bool | try_put (const typename internal::async_helpers< Input >::filtered_type &t) |
Put an item to the receiver. More... | |
bool | try_put (const typename internal::async_helpers< Input >::async_type &t) |
![]() | |
virtual | ~untyped_receiver () |
Destructor. More... | |
template<typename X > | |
bool | try_put (const X &t) |
Put an item to the receiver. More... | |
Protected Member Functions | |
void | reset_function_input_base (reset_flags f) |
void | reset_receiver (reset_flags f) __TBB_override |
graph & | graph_reference () const __TBB_override |
task * | try_get_postponed_task (const input_type &i) |
![]() | |
virtual task * | try_put_task_wrapper (const void *p, bool is_async) __TBB_override |
![]() | |
template<typename X > | |
task * | try_put_task (const X &t) |
virtual void | reset_receiver (reset_flags f=rf_reset_protocol)=0 |
put receiver back in initial state More... | |
virtual bool | is_continue_receiver () |
Protected Attributes | |
graph & | my_graph_ref |
const size_t | my_max_concurrency |
size_t | my_concurrency |
input_queue_type * | my_queue |
predecessor_cache< input_type, null_mutex > | my_predecessors |
Private Types | |
enum | op_type { reg_pred, rem_pred, try_fwd, tryput_bypass, app_body_bypass, occupy_concurrency } |
typedef function_input_base< Input, Policy, A, ImplType > | class_type |
typedef internal::aggregating_functor< class_type, operation_type > | handler_type |
Private Member Functions | |
task * | perform_queued_requests () |
void | handle_operations (operation_type *op_list) |
void | internal_try_put_task (operation_type *op) |
Put to the node, but return the task instead of enqueueing it. More... | |
void | internal_forward (operation_type *op) |
Creates tasks for postponed messages if available and if concurrency allows. More... | |
task * | internal_try_put_bypass (const input_type &t) |
task * | try_put_task_impl (const input_type &t, tbb::internal::true_type) |
task * | try_put_task_impl (const input_type &t, tbb::internal::false_type) |
task * | apply_body_bypass (const input_type &i) |
Applies the body to the provided input. More... | |
task * | create_body_task (const input_type &input) |
allocates a task to apply a body More... | |
task * | forward_task () |
This is executed by an enqueued task, the "forwarder". More... | |
task * | create_forward_task () |
void | spawn_forward_task () |
Spawns a task that calls forward() More... | |
![]() | |
void | operator= (const no_assign &)=delete |
no_assign (const no_assign &)=default | |
no_assign ()=default | |
Private Attributes | |
bool | forwarder_busy |
aggregator< handler_type, operation_type > | my_aggregator |
Friends | |
class | apply_body_task_bypass< class_type, input_type > |
class | forward_task_bypass< class_type > |
class | internal::aggregating_functor< class_type, operation_type > |
Additional Inherited Members | |
![]() | |
__TBB_DEPRECATED typedef Input | input_type |
The input type of this receiver. More... | |
__TBB_DEPRECATED typedef internal::async_helpers< Input >::filtered_type | filtered_type |
Input and scheduling for a function node that takes a type Input as input.
Definition at line 61 of file _flow_graph_node_impl.h.
|
private |
Definition at line 68 of file _flow_graph_node_impl.h.
|
private |
Definition at line 227 of file _flow_graph_node_impl.h.
typedef function_input_queue<input_type, A> internal::function_input_base< Input, Policy, A, ImplType >::input_queue_type |
Definition at line 76 of file _flow_graph_node_impl.h.
typedef Input internal::function_input_base< Input, Policy, A, ImplType >::input_type |
The input type of this receiver.
Definition at line 73 of file _flow_graph_node_impl.h.
typedef predecessor_cache<input_type, null_mutex > internal::function_input_base< Input, Policy, A, ImplType >::predecessor_cache_type |
Definition at line 75 of file _flow_graph_node_impl.h.
typedef receiver<input_type>::predecessor_type internal::function_input_base< Input, Policy, A, ImplType >::predecessor_type |
Definition at line 74 of file _flow_graph_node_impl.h.
typedef tbb::internal::allocator_rebind<A, input_queue_type>::type internal::function_input_base< Input, Policy, A, ImplType >::queue_allocator_type |
Definition at line 77 of file _flow_graph_node_impl.h.
|
private |
Enumerator | |
---|---|
reg_pred | |
rem_pred | |
try_fwd | |
tryput_bypass | |
app_body_bypass | |
occupy_concurrency |
Definition at line 62 of file _flow_graph_node_impl.h.
|
inline |
Constructor for function_input_base.
Definition at line 87 of file _flow_graph_node_impl.h.
|
inline |
Copy constructor.
Definition at line 99 of file _flow_graph_node_impl.h.
|
inlinevirtual |
Destructor.
Definition at line 113 of file _flow_graph_node_impl.h.
internal::function_input_base< Input, Policy, A, ImplType >::__TBB_STATIC_ASSERT | ( | ! | (internal::has_policy< queueing, Policy >::value) &&(internal::has_policy< rejecting, Policy >::value), |
"queueing and rejecting policies can't be specified simultaneously" | |||
) |
|
inlineprivate |
Applies the body to the provided input.
Definition at line 373 of file _flow_graph_node_impl.h.
Referenced by internal::function_input_base< Input, Policy, A, multifunction_input< Input, OutputPortSet, Policy, A > >::try_put_task_impl().
|
inlineprivate |
allocates a task to apply a body
Definition at line 378 of file _flow_graph_node_impl.h.
Referenced by internal::function_input_base< Input, Policy, A, multifunction_input< Input, OutputPortSet, Policy, A > >::internal_try_put_task(), internal::function_input_base< Input, Policy, A, multifunction_input< Input, OutputPortSet, Policy, A > >::perform_queued_requests(), and internal::function_input_base< Input, Policy, A, multifunction_input< Input, OutputPortSet, Policy, A > >::try_put_task_impl().
|
inlineprivate |
Definition at line 402 of file _flow_graph_node_impl.h.
Referenced by internal::function_input_base< Input, Policy, A, multifunction_input< Input, OutputPortSet, Policy, A > >::spawn_forward_task().
|
inlineprivate |
This is executed by an enqueued task, the "forwarder".
Definition at line 387 of file _flow_graph_node_impl.h.
|
inlineprotectedvirtual |
Implements tbb::flow::interface11::internal::untyped_receiver.
Definition at line 194 of file _flow_graph_node_impl.h.
Referenced by internal::function_input< Input, Output, Policy, A >::apply_body_impl_bypass(), and internal::function_input_base< Input, Policy, A, multifunction_input< Input, OutputPortSet, Policy, A > >::spawn_forward_task().
|
inlineprivate |
Definition at line 250 of file _flow_graph_node_impl.h.
|
inlineprivate |
Creates tasks for postponed messages if available and if concurrency allows.
Definition at line 329 of file _flow_graph_node_impl.h.
Referenced by internal::function_input_base< Input, Policy, A, multifunction_input< Input, OutputPortSet, Policy, A > >::handle_operations().
|
inlineprivate |
Definition at line 341 of file _flow_graph_node_impl.h.
Referenced by internal::function_input_base< Input, Policy, A, multifunction_input< Input, OutputPortSet, Policy, A > >::try_put_task_impl().
|
inlineprivate |
Put to the node, but return the task instead of enqueueing it.
Definition at line 312 of file _flow_graph_node_impl.h.
Referenced by internal::function_input_base< Input, Policy, A, multifunction_input< Input, OutputPortSet, Policy, A > >::handle_operations().
|
inlineprivate |
Definition at line 231 of file _flow_graph_node_impl.h.
Referenced by internal::function_input_base< Input, Policy, A, multifunction_input< Input, OutputPortSet, Policy, A > >::handle_operations(), and internal::function_input_base< Input, Policy, A, multifunction_input< Input, OutputPortSet, Policy, A > >::internal_forward().
|
inlinevirtual |
Adds src to the list of cached predecessors.
Reimplemented from tbb::flow::interface11::internal::untyped_receiver.
Definition at line 122 of file _flow_graph_node_impl.h.
|
inlinevirtual |
Removes src from the list of cached predecessors.
Reimplemented from tbb::flow::interface11::internal::untyped_receiver.
Definition at line 130 of file _flow_graph_node_impl.h.
|
inlineprotected |
Definition at line 171 of file _flow_graph_node_impl.h.
Referenced by internal::multifunction_input< Input, OutputPortSet, Policy, A >::reset(), and internal::function_input< Input, Output, Policy, A >::reset_function_input().
|
inlineprotected |
Definition at line 187 of file _flow_graph_node_impl.h.
Referenced by internal::function_input_base< Input, Policy, A, multifunction_input< Input, OutputPortSet, Policy, A > >::reset_function_input_base().
|
inlineprivate |
Spawns a task that calls forward()
Definition at line 410 of file _flow_graph_node_impl.h.
Referenced by internal::function_input_base< Input, Policy, A, multifunction_input< Input, OutputPortSet, Policy, A > >::handle_operations().
|
inlineprotected |
Definition at line 198 of file _flow_graph_node_impl.h.
Referenced by internal::function_input< Input, Output, Policy, A >::apply_body_impl_bypass(), and internal::multifunction_input< Input, OutputPortSet, Policy, A >::apply_body_impl_bypass().
|
inlinevirtual |
Put item to successor; return task to run the successor if possible.
Implements tbb::flow::interface11::receiver< Input >.
Definition at line 117 of file _flow_graph_node_impl.h.
|
inlineprivate |
Definition at line 350 of file _flow_graph_node_impl.h.
Referenced by internal::function_input_base< Input, Policy, A, multifunction_input< Input, OutputPortSet, Policy, A > >::try_put_task().
|
inlineprivate |
Definition at line 363 of file _flow_graph_node_impl.h.
|
friend |
Definition at line 206 of file _flow_graph_node_impl.h.
|
friend |
Definition at line 207 of file _flow_graph_node_impl.h.
|
friend |
Definition at line 228 of file _flow_graph_node_impl.h.
|
private |
Definition at line 226 of file _flow_graph_node_impl.h.
Referenced by internal::function_input_base< Input, Policy, A, multifunction_input< Input, OutputPortSet, Policy, A > >::handle_operations(), internal::function_input_base< Input, Policy, A, multifunction_input< Input, OutputPortSet, Policy, A > >::internal_forward(), and internal::function_input_base< Input, Policy, A, multifunction_input< Input, OutputPortSet, Policy, A > >::reset_function_input_base().
|
private |
Definition at line 229 of file _flow_graph_node_impl.h.
Referenced by internal::function_input_base< Input, Policy, A, multifunction_input< Input, OutputPortSet, Policy, A > >::forward_task(), internal::function_input_base< Input, Policy, A, multifunction_input< Input, OutputPortSet, Policy, A > >::function_input_base(), internal::function_input_base< Input, Policy, A, multifunction_input< Input, OutputPortSet, Policy, A > >::internal_try_put_bypass(), internal::function_input_base< Input, Policy, A, multifunction_input< Input, OutputPortSet, Policy, A > >::register_predecessor(), internal::function_input_base< Input, Policy, A, multifunction_input< Input, OutputPortSet, Policy, A > >::remove_predecessor(), internal::function_input_base< Input, Policy, A, multifunction_input< Input, OutputPortSet, Policy, A > >::try_get_postponed_task(), and internal::function_input_base< Input, Policy, A, multifunction_input< Input, OutputPortSet, Policy, A > >::try_put_task_impl().
|
protected |
Definition at line 182 of file _flow_graph_node_impl.h.
Referenced by internal::function_input_base< Input, Policy, A, multifunction_input< Input, OutputPortSet, Policy, A > >::handle_operations(), internal::function_input_base< Input, Policy, A, multifunction_input< Input, OutputPortSet, Policy, A > >::internal_forward(), internal::function_input_base< Input, Policy, A, multifunction_input< Input, OutputPortSet, Policy, A > >::internal_try_put_task(), internal::function_input_base< Input, Policy, A, multifunction_input< Input, OutputPortSet, Policy, A > >::perform_queued_requests(), and internal::function_input_base< Input, Policy, A, multifunction_input< Input, OutputPortSet, Policy, A > >::reset_function_input_base().
|
protected |
Definition at line 180 of file _flow_graph_node_impl.h.
Referenced by internal::function_input< Input, Output, Policy, A >::apply_body_impl_bypass(), internal::function_input_base< Input, Policy, A, multifunction_input< Input, OutputPortSet, Policy, A > >::create_body_task(), internal::function_input_base< Input, Policy, A, multifunction_input< Input, OutputPortSet, Policy, A > >::create_forward_task(), internal::function_input_base< Input, Policy, A, multifunction_input< Input, OutputPortSet, Policy, A > >::forward_task(), and internal::function_input_base< Input, Policy, A, multifunction_input< Input, OutputPortSet, Policy, A > >::graph_reference().
|
protected |
Definition at line 181 of file _flow_graph_node_impl.h.
Referenced by internal::function_input< Input, Output, Policy, A >::apply_body_impl_bypass(), internal::multifunction_input< Input, OutputPortSet, Policy, A >::apply_body_impl_bypass(), internal::function_input_base< Input, Policy, A, multifunction_input< Input, OutputPortSet, Policy, A > >::handle_operations(), internal::function_input_base< Input, Policy, A, multifunction_input< Input, OutputPortSet, Policy, A > >::internal_forward(), internal::function_input_base< Input, Policy, A, multifunction_input< Input, OutputPortSet, Policy, A > >::internal_try_put_task(), and internal::function_input_base< Input, Policy, A, multifunction_input< Input, OutputPortSet, Policy, A > >::try_put_task_impl().
|
protected |
Definition at line 185 of file _flow_graph_node_impl.h.
Referenced by internal::function_input_base< Input, Policy, A, multifunction_input< Input, OutputPortSet, Policy, A > >::function_input_base(), internal::function_input_base< Input, Policy, A, multifunction_input< Input, OutputPortSet, Policy, A > >::handle_operations(), internal::function_input_base< Input, Policy, A, multifunction_input< Input, OutputPortSet, Policy, A > >::perform_queued_requests(), and internal::function_input_base< Input, Policy, A, multifunction_input< Input, OutputPortSet, Policy, A > >::reset_receiver().
|
protected |
Definition at line 184 of file _flow_graph_node_impl.h.
Referenced by internal::function_input_base< Input, Policy, A, multifunction_input< Input, OutputPortSet, Policy, A > >::internal_try_put_task(), internal::function_input_base< Input, Policy, A, multifunction_input< Input, OutputPortSet, Policy, A > >::perform_queued_requests(), internal::function_input_base< Input, Policy, A, multifunction_input< Input, OutputPortSet, Policy, A > >::reset_function_input_base(), and internal::function_input_base< Input, Policy, A, multifunction_input< Input, OutputPortSet, Policy, A > >::~function_input_base().