Intel(R) Threading Building Blocks Doxygen Documentation  version 4.2.3
internal::continue_input< Output, Policy > Class Template Referenceabstract

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

#include <_flow_graph_node_impl.h>

Inheritance diagram for internal::continue_input< Output, Policy >:
Collaboration diagram for 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 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
 

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
 
graph & graph_reference () __TBB_override
 

Protected Attributes

graph & my_graph_ref
 
function_body_typemy_body
 
function_body_typemy_init_body
 

Friends

class apply_body_task_bypass< class_type, continue_msg >
 

Detailed Description

template<typename Output, typename Policy>
class internal::continue_input< Output, Policy >

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

Definition at line 682 of file _flow_graph_node_impl.h.

Member Typedef Documentation

◆ class_type

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

Definition at line 691 of file _flow_graph_node_impl.h.

◆ function_body_type

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

Definition at line 690 of file _flow_graph_node_impl.h.

◆ input_type

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

The input type of this receiver.

Definition at line 686 of file _flow_graph_node_impl.h.

◆ output_type

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

The output type of this receiver.

Definition at line 689 of file _flow_graph_node_impl.h.

Constructor & Destructor Documentation

◆ continue_input() [1/3]

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

Definition at line 694 of file _flow_graph_node_impl.h.

695  : continue_receiver(__TBB_FLOW_GRAPH_PRIORITY_ARG1(/*number_of_predecessors=*/0, priority))
696  , my_graph_ref(g)
699  { }
#define __TBB_FLOW_GRAPH_PRIORITY_ARG1(arg1, priority)
function_body_type * my_body
function_body_type * my_init_body
the leaf for function_body

◆ continue_input() [2/3]

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

Definition at line 702 of file _flow_graph_node_impl.h.

704  : continue_receiver( __TBB_FLOW_GRAPH_PRIORITY_ARG1(number_of_predecessors, priority) )
705  , my_graph_ref(g)
708  { }
#define __TBB_FLOW_GRAPH_PRIORITY_ARG1(arg1, priority)
function_body_type * my_body
function_body_type * my_init_body
the leaf for function_body

◆ continue_input() [3/3]

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

Definition at line 710 of file _flow_graph_node_impl.h.

710  : continue_receiver(src),
711  my_graph_ref(src.my_graph_ref),
712  my_body( src.my_init_body->clone() ),
713  my_init_body( src.my_init_body->clone() ) {}
function_body_type * my_body
function_body_type * my_init_body

◆ ~continue_input()

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

Member Function Documentation

◆ apply_body_bypass()

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

Applies the body to the provided input.

Definition at line 746 of file _flow_graph_node_impl.h.

746  {
747  // There is an extra copied needed to capture the
748  // body execution without the try_put
750  output_type v = (*my_body)( continue_msg() );
752  return successors().try_put_task( v );
753  }
virtual broadcast_cache< output_type > & successors()=0
static void fgt_begin_body(void *)
function_body_type * my_body
static void fgt_end_body(void *)
Output output_type
The output type of this receiver.
task * try_put_task(const T &t) __TBB_override

References tbb::internal::fgt_begin_body(), tbb::internal::fgt_end_body(), internal::continue_input< Output, Policy >::my_body, internal::continue_input< Output, Policy >::successors(), and internal::broadcast_cache< T, M >::try_put_task().

Referenced by internal::continue_input< Output, Policy >::execute().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ copy_function_object()

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

Definition at line 721 of file _flow_graph_node_impl.h.

721  {
722  function_body_type &body_ref = *my_body;
723  return dynamic_cast< internal::function_body_leaf<input_type, output_type, Body> & >(body_ref).get_body();
724  }
function_body_type * my_body
function_body< input_type, output_type > function_body_type
the leaf for function_body

References internal::continue_input< Output, Policy >::my_body.

◆ execute()

template<typename Output , typename Policy >
task* internal::continue_input< Output, Policy >::execute ( )
inlineprotected

Definition at line 755 of file _flow_graph_node_impl.h.

755  {
757  return NULL;
758  }
759 #if _MSC_VER && !__INTEL_COMPILER
760 #pragma warning (push)
761 #pragma warning (disable: 4127) /* suppress conditional expression is constant */
762 #endif
764 #if _MSC_VER && !__INTEL_COMPILER
765 #pragma warning (pop)
766 #endif
767  return apply_body_bypass( continue_msg() );
768  }
769  else {
770  return new ( task::allocate_additional_child_of( *(my_graph_ref.root_task()) ) )
772  *this, __TBB_FLOW_GRAPH_PRIORITY_ARG1(continue_msg(), my_priority) );
773  }
774  }
#define __TBB_FLOW_GRAPH_PRIORITY_ARG1(arg1, priority)
friend class apply_body_task_bypass< class_type, continue_msg >
task * apply_body_bypass(input_type)
Applies the body to the provided input.

References __TBB_FLOW_GRAPH_PRIORITY_ARG1, internal::continue_input< Output, Policy >::apply_body_bypass(), tbb::flow::interface10::internal::is_graph_active(), and internal::continue_input< Output, Policy >::my_graph_ref.

Here is the call graph for this function:

◆ graph_reference()

template<typename Output , typename Policy >
graph& internal::continue_input< Output, Policy >::graph_reference ( )
inlineprotected

Definition at line 776 of file _flow_graph_node_impl.h.

776  {
777  return my_graph_ref;
778  }

References internal::continue_input< Output, Policy >::my_graph_ref.

◆ reset_receiver()

template<typename Output , typename Policy >
void internal::continue_input< Output, Policy >::reset_receiver ( reset_flags  f)
inline

Definition at line 726 of file _flow_graph_node_impl.h.

726  {
727  continue_receiver::reset_receiver(f);
728  if(f & rf_reset_bodies) {
730  delete my_body;
731  my_body = tmp;
732  }
733  }
virtual function_body * clone()=0
function_body_type * my_body
function_body_type * my_init_body
function_body< input_type, output_type > function_body_type

References internal::function_body< Input, Output >::clone(), internal::continue_input< Output, Policy >::my_body, internal::continue_input< Output, Policy >::my_init_body, and tbb::flow::interface10::rf_reset_bodies.

Here is the call graph for this function:

◆ successors()

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

Referenced by internal::continue_input< Output, Policy >::apply_body_bypass().

Here is the caller graph for this function:

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 743 of file _flow_graph_node_impl.h.

Member Data Documentation

◆ my_body

◆ my_graph_ref

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

◆ my_init_body

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

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.