Home ⌂Doc Index ◂Up ▴
Intel(R) Threading Building Blocks Doxygen Documentation  version 4.2.3
tbb::flow::interface11::internal::continue_input< Output, Policy > Class Template Referenceabstract

Implements methods for an executable node that takes continue_msg as input. More...

#include <flow_graph.h>

Inheritance diagram for tbb::flow::interface11::internal::continue_input< Output, Policy >:
Collaboration diagram for tbb::flow::interface11::internal::continue_input< Output, Policy >:

Public Types

typedef continue_msg input_type
 The input type of this receiver. More...
 
typedef Output output_type
 The output type of this receiver. More...
 
typedef function_body< input_type, output_typefunction_body_type
 
typedef continue_input< output_type, Policyclass_type
 
- Public Types inherited from tbb::flow::interface11::internal::untyped_receiver
typedef untyped_sender predecessor_type
 The predecessor type for this node. More...
 

Public Member Functions

template<typename Body >
 continue_input (graph &g, __TBB_FLOW_GRAPH_PRIORITY_ARG1(Body &body, node_priority_t priority))
 
template<typename Body >
 continue_input (graph &g, int number_of_predecessors,)
 
 continue_input (const continue_input &src)
 
 ~continue_input ()
 
template<typename Body >
Body copy_function_object ()
 
void reset_receiver (reset_flags f) __TBB_override
 put receiver back in initial state More...
 
- Public Member Functions inherited from tbb::flow::interface11::continue_receiver
__TBB_DEPRECATED continue_receiver (__TBB_FLOW_GRAPH_PRIORITY_ARG1(int number_of_predecessors, node_priority_t priority))
 Constructor. More...
 
__TBB_DEPRECATED continue_receiver (const continue_receiver &src)
 Copy constructor. More...
 
__TBB_DEPRECATED bool register_predecessor (predecessor_type &) __TBB_override
 Increments the trigger threshold. More...
 
__TBB_DEPRECATED bool remove_predecessor (predecessor_type &) __TBB_override
 Decrements the trigger threshold. More...
 
- Public Member Functions inherited from tbb::flow::interface11::receiver< continue_msg >
bool try_put (const typename internal::async_helpers< continue_msg >::filtered_type &t)
 Put an item to the receiver. More...
 
bool try_put (const typename internal::async_helpers< continue_msg >::async_type &t)
 
- Public Member Functions inherited from tbb::flow::interface11::internal::untyped_receiver
virtual ~untyped_receiver ()
 Destructor. More...
 
template<typename X >
bool try_put (const X &t)
 Put an item to the receiver. More...
 

Protected Member Functions

virtual broadcast_cache< output_type > & successors ()=0
 
taskapply_body_bypass (input_type)
 Applies the body to the provided input. More...
 
taskexecute () __TBB_override
 Does whatever should happen when the threshold is reached. More...
 
graphgraph_reference () const __TBB_override
 
- Protected Member Functions inherited from tbb::flow::interface11::continue_receiver
tasktry_put_task (const input_type &) __TBB_override
 
bool is_continue_receiver () __TBB_override
 
- Protected Member Functions inherited from tbb::flow::interface11::receiver< continue_msg >
virtual tasktry_put_task_wrapper (const void *p, bool is_async) __TBB_override
 
virtual tasktry_put_task (const continue_msg &t)=0
 Put item to successor; return task to run the successor if possible. More...
 
- Protected Member Functions inherited from tbb::flow::interface11::internal::untyped_receiver
template<typename X >
tasktry_put_task (const X &t)
 

Protected Attributes

graphmy_graph_ref
 
function_body_typemy_body
 
function_body_typemy_init_body
 
- Protected Attributes inherited from tbb::flow::interface11::continue_receiver
spin_mutex my_mutex
 
int my_predecessor_count
 
int my_current_count
 
int my_initial_predecessor_count
 

Friends

class apply_body_task_bypass< class_type, continue_msg >
 

Additional Inherited Members

- Public Attributes inherited from tbb::flow::interface11::continue_receiver
__TBB_DEPRECATED typedef continue_msg input_type
 The input type. More...
 
__TBB_DEPRECATED typedef receiver< input_type >::predecessor_type predecessor_type
 The predecessor type for this node. More...
 
- Public Attributes inherited from tbb::flow::interface11::receiver< continue_msg >
__TBB_DEPRECATED typedef continue_msg input_type
 The input type of this receiver. More...
 
__TBB_DEPRECATED typedef internal::async_helpers< continue_msg >::filtered_type filtered_type
 

Detailed Description

template<typename Output, typename Policy>
class tbb::flow::interface11::internal::continue_input< Output, Policy >

Implements methods for an executable node that takes continue_msg as input.

Definition at line 753 of file flow_graph.h.

Member Typedef Documentation

◆ class_type

template<typename Output , typename Policy >
typedef continue_input<output_type, Policy> tbb::flow::interface11::internal::continue_input< Output, Policy >::class_type

Definition at line 762 of file flow_graph.h.

◆ function_body_type

template<typename Output , typename Policy >
typedef function_body<input_type, output_type> tbb::flow::interface11::internal::continue_input< Output, Policy >::function_body_type

Definition at line 761 of file flow_graph.h.

◆ input_type

template<typename Output , typename Policy >
typedef continue_msg tbb::flow::interface11::internal::continue_input< Output, Policy >::input_type

The input type of this receiver.

Definition at line 757 of file flow_graph.h.

◆ output_type

template<typename Output , typename Policy >
typedef Output tbb::flow::interface11::internal::continue_input< Output, Policy >::output_type

The output type of this receiver.

Definition at line 760 of file flow_graph.h.

Constructor & Destructor Documentation

◆ continue_input() [1/3]

template<typename Output , typename Policy >
template<typename Body >
tbb::flow::interface11::internal::continue_input< Output, Policy >::continue_input ( graph g,
__TBB_FLOW_GRAPH_PRIORITY_ARG1(Body &body, node_priority_t priority)   
)
inline

Definition at line 765 of file flow_graph.h.

766  {
767  if (current_node) current_node = current_node->next;
768 }
769 
770 } // namespace interfaceX

◆ continue_input() [2/3]

template<typename Output , typename Policy >
template<typename Body >
tbb::flow::interface11::internal::continue_input< Output, Policy >::continue_input ( graph g,
int  number_of_predecessors 
)
inline

Definition at line 773 of file flow_graph.h.

774  : my_nodes(NULL), my_nodes_last(NULL), my_task_arena(NULL) {
775  prepare_task_arena();
776  own_context = true;
777  cancelled = false;
778  caught_exception = false;
779  my_context = new task_group_context(tbb::internal::FLOW_TASKS);

◆ continue_input() [3/3]

template<typename Output , typename Policy >
tbb::flow::interface11::internal::continue_input< Output, Policy >::continue_input ( const continue_input< Output, Policy > &  src)
inline

Definition at line 781 of file flow_graph.h.

◆ ~continue_input()

template<typename Output , typename Policy >
tbb::flow::interface11::internal::continue_input< Output, Policy >::~continue_input ( )
inline

Definition at line 786 of file flow_graph.h.

786  :
787  my_context(&use_this_context), my_nodes(NULL), my_nodes_last(NULL), my_task_arena(NULL) {
788  prepare_task_arena();
789  own_context = false;

Member Function Documentation

◆ apply_body_bypass()

template<typename Output , typename Policy >
task* tbb::flow::interface11::internal::continue_input< Output, Policy >::apply_body_bypass ( input_type  )
inlineprotected

Applies the body to the provided input.

Definition at line 817 of file flow_graph.h.

820  {
821  n->next = NULL;
822  {
823  spin_mutex::scoped_lock lock(nodelist_mutex);
824  n->prev = my_nodes_last;
void const char const char int ITT_FORMAT __itt_group_sync x void const char ITT_FORMAT __itt_group_sync s void ITT_FORMAT __itt_group_sync p void ITT_FORMAT p void ITT_FORMAT p no args __itt_suppress_mode_t unsigned int void size_t ITT_FORMAT d void ITT_FORMAT p void ITT_FORMAT p __itt_model_site __itt_model_site_instance ITT_FORMAT p __itt_model_task __itt_model_task_instance ITT_FORMAT p void * lock
friend class scoped_lock
Definition: spin_mutex.h:179

◆ copy_function_object()

template<typename Output , typename Policy >
template<typename Body >
Body tbb::flow::interface11::internal::continue_input< Output, Policy >::copy_function_object ( )
inline

Definition at line 792 of file flow_graph.h.

◆ execute()

template<typename Output , typename Policy >
task* tbb::flow::interface11::internal::continue_input< Output, Policy >::execute ( )
inlineprotectedvirtual

Does whatever should happen when the threshold is reached.

This should be very fast or else spawn a task. This is called while the sender is blocked in the try_put().

Implements tbb::flow::interface11::continue_receiver.

Definition at line 826 of file flow_graph.h.

831  {
832  {
833  spin_mutex::scoped_lock lock(nodelist_mutex);
834  __TBB_ASSERT(my_nodes && my_nodes_last, "graph::remove_node: Error: no registered nodes");
835  if (n->prev) n->prev->next = n->next;
836  if (n->next) n->next->prev = n->prev;
837  if (my_nodes_last == n) my_nodes_last = n->prev;
838  if (my_nodes == n) my_nodes = n->next;
839  }
840  n->prev = n->next = NULL;
841 }
842 
844  // reset context
void reset(tbb::flow::interface11::reset_flags f=tbb::flow::interface11::rf_reset_protocol)
Definition: flow_graph.h:843
void deactivate_graph(tbb::flow::interface10::graph &g)
#define __TBB_ASSERT(predicate, comment)
No-op version of __TBB_ASSERT.
Definition: tbb_stddef.h:165
void const char const char int ITT_FORMAT __itt_group_sync x void const char ITT_FORMAT __itt_group_sync s void ITT_FORMAT __itt_group_sync p void ITT_FORMAT p void ITT_FORMAT p no args __itt_suppress_mode_t unsigned int void size_t ITT_FORMAT d void ITT_FORMAT p void ITT_FORMAT p __itt_model_site __itt_model_site_instance ITT_FORMAT p __itt_model_task __itt_model_task_instance ITT_FORMAT p void * lock
friend class scoped_lock
Definition: spin_mutex.h:179

◆ graph_reference()

template<typename Output , typename Policy >
graph& tbb::flow::interface11::internal::continue_input< Output, Policy >::graph_reference ( ) const
inlineprotectedvirtual

Implements tbb::flow::interface11::internal::untyped_receiver.

Definition at line 847 of file flow_graph.h.

851  {

◆ reset_receiver()

template<typename Output , typename Policy >
void tbb::flow::interface11::internal::continue_input< Output, Policy >::reset_receiver ( reset_flags  f)
inlinevirtual

put receiver back in initial state

Reimplemented from tbb::flow::interface11::continue_receiver.

Definition at line 797 of file flow_graph.h.

798  {
799  wait_for_all();
800  my_root_task->set_ref_count(0);
801  tbb::task::destroy(*my_root_task);
802  if (own_context) delete my_context;
803  delete my_task_arena;
804 }

Referenced by tbb::flow::interface11::continue_node< Output, Policy >::reset_node().

Here is the caller graph for this function:

◆ successors()

template<typename Output , typename Policy >
virtual broadcast_cache<output_type >& tbb::flow::interface11::internal::continue_input< Output, Policy >::successors ( )
protectedpure virtual

Friends And Related Function Documentation

◆ apply_body_task_bypass< class_type, continue_msg >

template<typename Output , typename Policy >
friend class apply_body_task_bypass< class_type, continue_msg >
friend

Definition at line 814 of file flow_graph.h.

Member Data Documentation

◆ my_body

template<typename Output , typename Policy >
function_body_type* tbb::flow::interface11::internal::continue_input< Output, Policy >::my_body
protected

Definition at line 809 of file flow_graph.h.

◆ my_graph_ref

template<typename Output , typename Policy >
graph& tbb::flow::interface11::internal::continue_input< Output, Policy >::my_graph_ref
protected

Definition at line 808 of file flow_graph.h.

◆ my_init_body

template<typename Output , typename Policy >
function_body_type* tbb::flow::interface11::internal::continue_input< Output, Policy >::my_init_body
protected

Definition at line 810 of file flow_graph.h.


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

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.