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, Body &body)
 
template<typename Body >
 continue_input (graph &g, int number_of_predecessors, Body &body)
 
 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 678 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 687 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 686 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 682 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 685 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,
Body &  body 
)
inline

◆ 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,
Body &  body 
)
inline

Definition at line 696 of file _flow_graph_node_impl.h.

697  : continue_receiver( number_of_predecessors ), my_graph_ref(g),
700  { }
the leaf for function_body
function_body_type * my_body
function_body_type * my_init_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 702 of file _flow_graph_node_impl.h.

702  : continue_receiver(src),
703  my_graph_ref(src.my_graph_ref),
704  my_body( src.my_init_body->clone() ),
705  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 738 of file _flow_graph_node_impl.h.

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

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

713  {
714  function_body_type &body_ref = *my_body;
715  return dynamic_cast< internal::function_body_leaf<input_type, output_type, Body> & >(body_ref).get_body();
716  }
the leaf for function_body
function_body< input_type, output_type > function_body_type
function_body_type * my_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 747 of file _flow_graph_node_impl.h.

747  {
749  return NULL;
750  }
751 #if _MSC_VER && !__INTEL_COMPILER
752 #pragma warning (push)
753 #pragma warning (disable: 4127) /* suppress conditional expression is constant */
754 #endif
756 #if _MSC_VER && !__INTEL_COMPILER
757 #pragma warning (pop)
758 #endif
759  return apply_body_bypass( continue_msg() );
760  }
761  else {
762  return new ( task::allocate_additional_child_of( *(my_graph_ref.root_task()) ) )
764  }
765  }
task * apply_body_bypass(input_type)
Applies the body to the provided input.
friend class apply_body_task_bypass< class_type, continue_msg >

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

767  {
768  return my_graph_ref;
769  }

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

718  {
719  continue_receiver::reset_receiver(f);
720  if(f & rf_reset_bodies) {
722  delete my_body;
723  my_body = tmp;
724  }
725  }
function_body< input_type, output_type > function_body_type
virtual function_body * clone()=0
function_body_type * my_body
function_body_type * my_init_body

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 735 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-2018 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.