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_type > | function_body_type
typedef continue_input< output_type, Policy > | class_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
task * | apply_body_bypass (input_type)
| Applies the body to the provided input. More...
task * | execute () __TBB_override
graph & | graph_reference () const __TBB_override

## Protected Attributes

graph & | my_graph_ref
function_body_type * | my_body
function_body_type * | my_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.

: continue_receiver(__TBB_FLOW_GRAPH_PRIORITY_ARG1(/*number_of_predecessors=*/0, priority))
, my_graph_ref(g)
, my_body( new internal::function_body_leaf< input_type, output_type, Body>(body) )
, my_init_body( new internal::function_body_leaf< input_type, output_type, Body>(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 773 of file _flow_graph_node_impl.h.

: continue_receiver( __TBB_FLOW_GRAPH_PRIORITY_ARG1(number_of_predecessors, priority) )
, my_graph_ref(g)
, my_body( new internal::function_body_leaf< input_type, output_type, Body>(body) )
, my_init_body( new internal::function_body_leaf< input_type, output_type, Body>(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 781 of file _flow_graph_node_impl.h.

: continue_receiver(src),
my_graph_ref(src.my_graph_ref),
my_body( src.my_init_body->clone() ),
my_init_body( src.my_init_body->clone() ) {}

## ~continue_input()

template<typename Output , typename Policy >

internal::continue_input< Output, Policy >::~continue_input | ( |  | ) |

inline

Definition at line 786 of file _flow_graph_node_impl.h.

{
delete my_body;
delete my_init_body;
}

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

## Member Function Documentation

## apply_body_bypass()

template<typename Output , typename Policy >

task* internal::continue_input< Output, Policy >::apply_body_bypass | ( | input_type |  | ) |

inline protected

Applies the body to the provided input.

Definition at line 817 of file _flow_graph_node_impl.h.

{
// There is an extra copied needed to capture the
// body execution without the try_put
tbb::internal::fgt_begin_body( my_body );
output_type v = (*my_body)( continue_msg() );
tbb::internal::fgt_end_body( my_body );
return successors().try_put_task( v );
}

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.

{
function_body_type &body_ref = *my_body;
return dynamic_cast< internal::function_body_leaf<input_type, output_type, Body> & >(body_ref).get_body();
}

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

## execute()

template<typename Output , typename Policy >

task* internal::continue_input< Output, Policy >::execute | ( |  | ) |

inline protected

Definition at line 826 of file _flow_graph_node_impl.h.

{
if(!internal::is_graph_active(my_graph_ref)) {
return NULL;
}
#if _MSC_VER && !__INTEL_COMPILER
#pragma warning (push)
#pragma warning (disable: 4127) /* suppress conditional expression is constant */
#endif
if(internal::has_policy<lightweight, Policy>::value) {
#if _MSC_VER && !__INTEL_COMPILER
#pragma warning (pop)
#endif
return apply_body_bypass( continue_msg() );
}
else {
return new ( task::allocate_additional_child_of( *(my_graph_ref.root_task()) ) )
apply_body_task_bypass< class_type, continue_msg >(
*this, __TBB_FLOW_GRAPH_PRIORITY_ARG1(continue_msg(), my_priority) );
}
}

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

inline protected

Definition at line 847 of file _flow_graph_node_impl.h.

{
return my_graph_ref;
}

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.

{
continue_receiver::reset_receiver(f);
if(f & rf_reset_bodies) {
function_body_type *tmp = my_init_body->clone();
delete my_body;
my_body = tmp;
}
}

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.

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

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

## successors()

template<typename Output , typename Policy >

virtual broadcast_cache<output_type >& internal::continue_input< Output, Policy >::successors | ( |  | ) |

protected pure virtual

Implemented in tbb::flow::interface11::continue_node< Output, Policy >.

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

template<typename Output , typename Policy >

function_body_type* internal::continue_input< Output, Policy >::my_body

protected

Definition at line 809 of file _flow_graph_node_impl.h.

Referenced by internal::continue_input< Output, Policy >::apply_body_bypass(), tbb::flow::interface11::continue_node< Output, Policy >::continue_node(), internal::continue_input< Output, Policy >::copy_function_object(), internal::continue_input< Output, Policy >::reset_receiver(), and internal::continue_input< Output, Policy >::~continue_input().

## my_graph_ref

template<typename Output , typename Policy >

graph& internal::continue_input< Output, Policy >::my_graph_ref

protected

Definition at line 808 of file _flow_graph_node_impl.h.

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

## my_init_body

template<typename Output , typename Policy >

function_body_type* internal::continue_input< Output, Policy >::my_init_body

protected

Definition at line 810 of file _flow_graph_node_impl.h.

Referenced by internal::continue_input< Output, Policy >::reset_receiver(), and internal::continue_input< Output, Policy >::~continue_input().

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

- _flow_graph_node_impl.h

internal::continue_input::apply_body_task_bypass< class_type, continue_msg >
friend class apply_body_task_bypass< class_type, continue_msg >
Definition: _flow_graph_node_impl.h:814
tbb::flow::interface11::internal::is_graph_active
bool is_graph_active(tbb::flow::interface10::graph &g)
Definition: _flow_graph_impl.h:494
__TBB_FLOW_GRAPH_PRIORITY_ARG1
#define __TBB_FLOW_GRAPH_PRIORITY_ARG1(arg1, priority)
Definition: _flow_graph_impl.h:40
internal::has_policy
Definition: _flow_graph_body_impl.h:36
internal::continue_input::my_init_body
function_body_type * my_init_body
Definition: _flow_graph_node_impl.h:810
internal::function_body::clone
virtual function_body * clone()=0
tbb::internal::fgt_begin_body
static void fgt_begin_body(void *)
Definition: _flow_graph_trace_impl.h:336
internal::continue_input::output_type
Output output_type
The output type of this receiver.
Definition: _flow_graph_node_impl.h:760
internal::continue_input::my_graph_ref
graph & my_graph_ref
Definition: _flow_graph_node_impl.h:808
internal::continue_input::function_body_type
function_body< input_type, output_type > function_body_type
Definition: _flow_graph_node_impl.h:761
internal::continue_input::my_body
function_body_type * my_body
Definition: _flow_graph_node_impl.h:809
internal::broadcast_cache::try_put_task
task * try_put_task(const T &t) __TBB_override
Definition: _flow_graph_cache_impl.h:478
internal::continue_input::apply_body_bypass
task * apply_body_bypass(input_type)
Applies the body to the provided input.
Definition: _flow_graph_node_impl.h:817
internal::function_body_leaf
the leaf for function_body
Definition: _flow_graph_body_impl.h:128
internal::continue_input::successors
virtual broadcast_cache< output_type > & successors()=0
tbb::internal::fgt_end_body
static void fgt_end_body(void *)
Definition: _flow_graph_trace_impl.h:337
tbb::flow::interface11::rf_reset_bodies
Definition: _flow_graph_impl.h:160

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.