Home ⌂Doc Index ◂Up ▴
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 () const __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 753 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 762 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 761 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 757 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 760 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 765 of file _flow_graph_node_impl.h.

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

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

775  : continue_receiver( __TBB_FLOW_GRAPH_PRIORITY_ARG1(number_of_predecessors, priority) )
776  , my_graph_ref(g)
779  { }
the leaf for function_body
function_body_type * my_init_body
function_body_type * my_body
#define __TBB_FLOW_GRAPH_PRIORITY_ARG1(arg1, priority)

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

781  : continue_receiver(src),
782  my_graph_ref(src.my_graph_ref),
783  my_body( src.my_init_body->clone() ),
784  my_init_body( src.my_init_body->clone() ) {}
function_body_type * my_init_body
function_body_type * my_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 817 of file _flow_graph_node_impl.h.

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

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

792  {
793  function_body_type &body_ref = *my_body;
794  return dynamic_cast< internal::function_body_leaf<input_type, output_type, Body> & >(body_ref).get_body();
795  }
the leaf for function_body
function_body_type * my_body
function_body< input_type, output_type > function_body_type

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

826  {
828  return NULL;
829  }
830 #if _MSC_VER && !__INTEL_COMPILER
831 #pragma warning (push)
832 #pragma warning (disable: 4127) /* suppress conditional expression is constant */
833 #endif
835 #if _MSC_VER && !__INTEL_COMPILER
836 #pragma warning (pop)
837 #endif
838  return apply_body_bypass( continue_msg() );
839  }
840  else {
841  return new ( task::allocate_additional_child_of( *(my_graph_ref.root_task()) ) )
843  *this, __TBB_FLOW_GRAPH_PRIORITY_ARG1(continue_msg(), my_priority) );
844  }
845  }
bool is_graph_active(tbb::flow::interface10::graph &g)
friend class apply_body_task_bypass< class_type, continue_msg >
#define __TBB_FLOW_GRAPH_PRIORITY_ARG1(arg1, priority)
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::interface11::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 ( ) const
inlineprotected

Definition at line 847 of file _flow_graph_node_impl.h.

847  {
848  return my_graph_ref;
849  }

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

797  {
798  continue_receiver::reset_receiver(f);
799  if(f & rf_reset_bodies) {
801  delete my_body;
802  my_body = tmp;
803  }
804  }
function_body_type * my_init_body
virtual function_body * clone()=0
function_body_type * my_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::interface11::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 814 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-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.