_flow_graph_body_impl.h
Go to the documentation of this file.
/*
Copyright (c) 2005-2020 Intel Corporation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
#ifndef __TBB__flow_graph_body_impl_H
#define __TBB__flow_graph_body_impl_H
#include "tbb/internal/_template_helpers.h"
#ifndef __TBB_flow_graph_H
#error Do not #include this internal file directly; use public TBB headers instead.
#endif
// included in namespace tbb::flow::interfaceX (in flow_graph.h)
namespace internal {
typedef tbb::internal::uint64_t tag_value;
using tbb::internal::strip;
#if __TBB_CPP11_VARIADIC_TEMPLATES_PRESENT
template<typename ... Policies> struct Policy {};
template<typename ... Policies> struct has_policy;
template<typename ExpectedPolicy, typename FirstPolicy, typename ...Policies>
struct has_policy<ExpectedPolicy, FirstPolicy, Policies...> :
tbb::internal::bool_constant<has_policy<ExpectedPolicy, FirstPolicy>::value ||
has_policy<ExpectedPolicy, Policies...>::value> {};
template<typename ExpectedPolicy, typename SinglePolicy>
struct has_policy<ExpectedPolicy, SinglePolicy> :
tbb::internal::bool_constant<tbb::internal::is_same_type<ExpectedPolicy, SinglePolicy>::value> {};
template<typename ExpectedPolicy, typename ...Policies>
struct has_policy<ExpectedPolicy, Policy<Policies...> > : has_policy<ExpectedPolicy, Policies...> {};
#else
template<typename P1, typename P2 = void> struct Policy {};
template<typename ExpectedPolicy, typename SinglePolicy>
struct has_policy : tbb::internal::bool_constant<tbb::internal::is_same_type<ExpectedPolicy, SinglePolicy>::value> {};
template<typename ExpectedPolicy, typename P>
struct has_policy<ExpectedPolicy, Policy<P> > : has_policy<ExpectedPolicy, P> {};
template<typename ExpectedPolicy, typename P1, typename P2>
struct has_policy<ExpectedPolicy, Policy<P1, P2> > :
tbb::internal::bool_constant<has_policy<ExpectedPolicy, P1>::value || has_policy<ExpectedPolicy, P2>::value> {};
#endif
namespace graph_policy_namespace {
struct rejecting { };
struct reserving { };
struct queueing { };
struct lightweight { };
// K == type of field used for key-matching. Each tag-matching port will be provided
// functor that, given an object accepted by the port, will return the
template<typename K, typename KHash=tbb_hash_compare<typename strip<K>::type > >
struct key_matching {
typedef K key_type;
typedef typename strip<K>::type base_key_type;
typedef KHash hash_compare_type;
};
// old tag_matching join's new specifier
typedef key_matching<tag_value> tag_matching;
// Aliases for Policy combinations
typedef interface11::internal::Policy<queueing, lightweight> queueing_lightweight;
typedef interface11::internal::Policy<rejecting, lightweight> rejecting_lightweight;
} // namespace graph_policy_namespace
// -------------- function_body containers ----------------------
template< typename Output >
class input_body : tbb::internal::no_assign {
public:
virtual ~input_body() {}
#if TBB_DEPRECATED_INPUT_NODE_BODY
virtual bool operator()(Output &output) = 0;
#else
virtual Output operator()(flow_control& fc) = 0;
#endif
virtual input_body* clone() = 0;
};
template <typename Body>
void check_input_node_body_input_type_impl(Body) {
__TBB_STATIC_ASSERT((tbb::internal::is_same_type<typename tbb::internal::body_arg_detector<Body>::arg_type, flow_control&>::value),
"TBB Warning: input_node body requirements have been changed."
"To temporarily enforce deprecated API specify TBB_DEPRECATED_INPUT_NODE_BODY.");
}
template <typename Body>
void check_input_node_body_input_type(Body) {
check_input_node_body_input_type_impl(&Body::operator());
}
template <typename ReturnType, typename T>
void check_input_node_body_input_type(ReturnType(*)(T)) {
__TBB_STATIC_ASSERT((tbb::internal::is_same_type<T, flow_control&>::value),
"TBB Warning: input_node body requirements have been changed."
"To temporarily enforce deprecated API specify TBB_DEPRECATED_INPUT_NODE_BODY.");
}
template< typename Output, typename Body>
class input_body_leaf : public input_body<Output> {
public:
input_body_leaf( const Body &_body ) : body(_body) { }
#if TBB_DEPRECATED_INPUT_NODE_BODY
bool operator()(Output &output) __TBB_override { return body( output ); }
#else
Output operator()(flow_control& fc) __TBB_override {
check_input_node_body_input_type(body);
return body(fc);
}
#endif
input_body_leaf* clone() __TBB_override {
return new input_body_leaf< Output, Body >(body);
}
Body get_body() { return body; }
private:
Body body;
};
template< typename Output >
class source_body : tbb::internal::no_assign {
public:
virtual ~source_body() {}
virtual bool operator()(Output &output) = 0;
virtual source_body* clone() = 0;
};
template< typename Output, typename Body>
class source_body_leaf : public source_body<Output> {
public:
source_body_leaf( const Body &_body ) : body(_body) { }
bool operator()(Output &output) __TBB_override { return body( output ); }
source_body_leaf* clone() __TBB_override {
return new source_body_leaf< Output, Body >(body);
}
Body get_body() { return body; }
private:
Body body;
};
template< typename Input, typename Output >
class function_body : tbb::internal::no_assign {
public:
virtual ~function_body() {}
virtual Output operator()(const Input &input) = 0;
virtual function_body* clone() = 0;
};
template <typename Input, typename Output, typename B>
class function_body_leaf : public function_body< Input, Output > {
public:
function_body_leaf( const B &_body ) : body(_body) { }
Output operator()(const Input &i) __TBB_override { return body(i); }
B get_body() { return body; }
function_body_leaf* clone() __TBB_override {
return new function_body_leaf< Input, Output, B >(body);
}
private:
B body;
};
template <typename B>
class function_body_leaf< continue_msg, continue_msg, B> : public function_body< continue_msg, continue_msg > {
public:
function_body_leaf( const B &_body ) : body(_body) { }
continue_msg operator()( const continue_msg &i ) __TBB_override {
body(i);
return i;
}
B get_body() { return body; }
function_body_leaf* clone() __TBB_override {
return new function_body_leaf< continue_msg, continue_msg, B >(body);
}
private:
B body;
};
template <typename Input, typename B>
class function_body_leaf< Input, continue_msg, B> : public function_body< Input, continue_msg > {
public:
function_body_leaf( const B &_body ) : body(_body) { }
continue_msg operator()(const Input &i) __TBB_override {
body(i);
return continue_msg();
}
B get_body() { return body; }
function_body_leaf* clone() __TBB_override {
return new function_body_leaf< Input, continue_msg, B >(body);
}
private:
B body;
};
template <typename Output, typename B>
class function_body_leaf< continue_msg, Output, B > : public function_body< continue_msg, Output > {
public:
function_body_leaf( const B &_body ) : body(_body) { }
Output operator()(const continue_msg &i) __TBB_override {
return body(i);
}
B get_body() { return body; }
function_body_leaf* clone() __TBB_override {
return new function_body_leaf< continue_msg, Output, B >(body);
}
private:
B body;
};
template<typename Input, typename OutputSet>
class multifunction_body : tbb::internal::no_assign {
public:
virtual ~multifunction_body () {}
virtual void operator()(const Input &/* input*/, OutputSet &/*oset*/) = 0;
virtual multifunction_body* clone() = 0;
virtual void* get_body_ptr() = 0;
};
template<typename Input, typename OutputSet, typename B >
class multifunction_body_leaf : public multifunction_body<Input, OutputSet> {
public:
multifunction_body_leaf(const B &_body) : body(_body) { }
void operator()(const Input &input, OutputSet &oset) __TBB_override {
body(input, oset); // body may explicitly put() to one or more of oset.
}
void* get_body_ptr() __TBB_override { return &body; }
multifunction_body_leaf* clone() __TBB_override {
return new multifunction_body_leaf<Input, OutputSet,B>(body);
}
private:
B body;
};
// ------ function bodies for hash_buffers and key-matching joins.
template<typename Input, typename Output>
class type_to_key_function_body : tbb::internal::no_assign {
public:
virtual ~type_to_key_function_body() {}
virtual Output operator()(const Input &input) = 0; // returns an Output
virtual type_to_key_function_body* clone() = 0;
};
// specialization for ref output
template<typename Input, typename Output>
class type_to_key_function_body<Input,Output&> : tbb::internal::no_assign {
public:
virtual ~type_to_key_function_body() {}
virtual const Output & operator()(const Input &input) = 0; // returns a const Output&
virtual type_to_key_function_body* clone() = 0;
};
template <typename Input, typename Output, typename B>
class type_to_key_function_body_leaf : public type_to_key_function_body<Input, Output> {
public:
type_to_key_function_body_leaf( const B &_body ) : body(_body) { }
Output operator()(const Input &i) __TBB_override { return body(i); }
B get_body() { return body; }
type_to_key_function_body_leaf* clone() __TBB_override {
return new type_to_key_function_body_leaf< Input, Output, B>(body);
}
private:
B body;
};
template <typename Input, typename Output, typename B>
class type_to_key_function_body_leaf<Input,Output&,B> : public type_to_key_function_body< Input, Output&> {
public:
type_to_key_function_body_leaf( const B &_body ) : body(_body) { }
const Output& operator()(const Input &i) __TBB_override {
return body(i);
}
B get_body() { return body; }
type_to_key_function_body_leaf* clone() __TBB_override {
return new type_to_key_function_body_leaf< Input, Output&, B>(body);
}
private:
B body;
};
// --------------------------- end of function_body containers ------------------------
// --------------------------- node task bodies ---------------------------------------
template< typename NodeType >
class forward_task_bypass : public graph_task {
NodeType &my_node;
public:
forward_task_bypass( NodeType &n
#if __TBB_PREVIEW_FLOW_GRAPH_PRIORITIES
, node_priority_t node_priority = no_priority
) : graph_task(node_priority),
#else
) :
#endif
my_node(n) {}
task *execute() __TBB_override {
task * new_task = my_node.forward_task();
if (new_task == SUCCESSFULLY_ENQUEUED) new_task = NULL;
return new_task;
}
};
// return the task* unless it is SUCCESSFULLY_ENQUEUED, in which case return NULL
template< typename NodeType, typename Input >
class apply_body_task_bypass : public graph_task {
NodeType &my_node;
Input my_input;
public:
apply_body_task_bypass( NodeType &n, const Input &i
#if __TBB_PREVIEW_FLOW_GRAPH_PRIORITIES
, node_priority_t node_priority = no_priority
) : graph_task(node_priority),
#else
) :
#endif
my_node(n), my_input(i) {}
task *execute() __TBB_override {
task * next_task = my_node.apply_body_bypass( my_input );
if(next_task == SUCCESSFULLY_ENQUEUED) next_task = NULL;
return next_task;
}
};
template< typename NodeType >
class source_task_bypass : public graph_task {
NodeType &my_node;
public:
source_task_bypass( NodeType &n ) : my_node(n) {}
task *execute() __TBB_override {
task *new_task = my_node.apply_body_bypass( );
if(new_task == SUCCESSFULLY_ENQUEUED) return NULL;
return new_task;
}
};
// ------------------------ end of node task bodies -----------------------------------
template< typename Input, typename Output >
struct empty_body {
Output operator()( const Input & ) const { return Output(); }
};
template<typename T, typename DecrementType, typename DummyType = void>
class decrementer;
template<typename T, typename DecrementType>
class decrementer<T, DecrementType,
typename tbb::internal::enable_if<
tbb::internal::is_integral<DecrementType>::value, void>::type
> : public receiver<DecrementType>, tbb::internal::no_copy {
T* my_node;
protected:
task* try_put_task( const DecrementType& value ) __TBB_override {
task* result = my_node->decrement_counter( value );
if( !result )
result = SUCCESSFULLY_ENQUEUED;
return result;
}
graph& graph_reference() const __TBB_override {
return my_node->my_graph;
}
template<typename U, typename V> friend class tbb::flow::interface11::limiter_node;
void reset_receiver( reset_flags f ) __TBB_override {
#if TBB_DEPRECATED_FLOW_NODE_EXTRACTION
if (f & rf_clear_edges)
my_built_predecessors.clear();
#else
tbb::internal::suppress_unused_warning( f );
#endif
}
public:
// Since decrementer does not make use of possibly unconstructed owner inside its
// constructor, my_node can be directly initialized with 'this' pointer passed from the
// owner, hence making method 'set_owner' needless.
decrementer() : my_node(NULL) {}
void set_owner( T *node ) { my_node = node; }
#if TBB_DEPRECATED_FLOW_NODE_EXTRACTION
spin_mutex my_mutex;
typedef typename receiver<DecrementType>::predecessor_type predecessor_type;
typedef internal::edge_container<predecessor_type> built_predecessors_type;
typedef typename built_predecessors_type::edge_list_type predecessor_list_type;
built_predecessors_type &built_predecessors() __TBB_override { return my_built_predecessors; }
void internal_add_built_predecessor( predecessor_type &s) __TBB_override {
spin_mutex::scoped_lock l(my_mutex);
my_built_predecessors.add_edge( s );
}
void internal_delete_built_predecessor( predecessor_type &s) __TBB_override {
spin_mutex::scoped_lock l(my_mutex);
my_built_predecessors.delete_edge(s);
}
void copy_predecessors( predecessor_list_type &v) __TBB_override {
spin_mutex::scoped_lock l(my_mutex);
my_built_predecessors.copy_edges(v);
}
size_t predecessor_count() __TBB_override {
spin_mutex::scoped_lock l(my_mutex);
return my_built_predecessors.edge_count();
}
protected:
built_predecessors_type my_built_predecessors;
#endif /* TBB_DEPRECATED_FLOW_NODE_EXTRACTION */
};
template<typename T>
class decrementer<T, continue_msg, void> : public continue_receiver, tbb::internal::no_copy {
T *my_node;
task *execute() __TBB_override {
return my_node->decrement_counter( 1 );
}
protected:
graph& graph_reference() const __TBB_override {
return my_node->my_graph;
}
public:
typedef continue_msg input_type;
typedef continue_msg output_type;
decrementer( int number_of_predecessors = 0 )
: continue_receiver(
__TBB_FLOW_GRAPH_PRIORITY_ARG1(number_of_predecessors, tbb::flow::internal::no_priority)
)
// Since decrementer does not make use of possibly unconstructed owner inside its
// constructor, my_node can be directly initialized with 'this' pointer passed from the
// owner, hence making method 'set_owner' needless.
, my_node(NULL)
{}
void set_owner( T *node ) { my_node = node; }
};
} // namespace internal
#endif // __TBB__flow_graph_body_impl_H
__TBB_FLOW_GRAPH_PRIORITY_ARG1
#define __TBB_FLOW_GRAPH_PRIORITY_ARG1(arg1, priority)
Definition: _flow_graph_impl.h:40
_template_helpers.h
__TBB_PREVIEW_FLOW_GRAPH_PRIORITIES
#define __TBB_PREVIEW_FLOW_GRAPH_PRIORITIES
Definition: tbb_config.h:858
__TBB_override
#define __TBB_override
Definition: tbb_stddef.h:240
__TBB_STATIC_ASSERT
#define __TBB_STATIC_ASSERT(condition, msg)
Definition: tbb_stddef.h:553
s
void const char const char int ITT_FORMAT __itt_group_sync s
Definition: ittnotify_static.h:91
task
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 * task
Definition: ittnotify_static.h:119
void
void
Definition: ittnotify_static.h:91
value
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 ITT_FORMAT p void ITT_FORMAT p void size_t ITT_FORMAT d void ITT_FORMAT p const wchar_t ITT_FORMAT s const char ITT_FORMAT s const char ITT_FORMAT s const char ITT_FORMAT s no args void ITT_FORMAT p size_t ITT_FORMAT d no args const wchar_t const wchar_t ITT_FORMAT s __itt_heap_function void size_t int ITT_FORMAT d __itt_heap_function void ITT_FORMAT p __itt_heap_function void void size_t int ITT_FORMAT d no args no args unsigned int ITT_FORMAT u const __itt_domain __itt_id ITT_FORMAT lu const __itt_domain __itt_id __itt_id __itt_string_handle ITT_FORMAT p const __itt_domain __itt_id ITT_FORMAT p const __itt_domain __itt_id __itt_timestamp __itt_timestamp ITT_FORMAT lu const __itt_domain __itt_id __itt_id __itt_string_handle ITT_FORMAT p const __itt_domain ITT_FORMAT p const __itt_domain __itt_string_handle unsigned long long value
Definition: ittnotify_static.h:192
type
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 ITT_FORMAT p void ITT_FORMAT p void size_t ITT_FORMAT d void ITT_FORMAT p const wchar_t ITT_FORMAT s const char ITT_FORMAT s const char ITT_FORMAT s const char ITT_FORMAT s no args void ITT_FORMAT p size_t ITT_FORMAT d no args const wchar_t const wchar_t ITT_FORMAT s __itt_heap_function void size_t int ITT_FORMAT d __itt_heap_function void ITT_FORMAT p __itt_heap_function void void size_t int ITT_FORMAT d no args no args unsigned int ITT_FORMAT u const __itt_domain __itt_id ITT_FORMAT lu const __itt_domain __itt_id __itt_id __itt_string_handle ITT_FORMAT p const __itt_domain __itt_id ITT_FORMAT p const __itt_domain __itt_id __itt_timestamp __itt_timestamp ITT_FORMAT lu const __itt_domain __itt_id __itt_id __itt_string_handle ITT_FORMAT p const __itt_domain ITT_FORMAT p const __itt_domain __itt_string_handle unsigned long long ITT_FORMAT lu const __itt_domain __itt_string_handle unsigned long long ITT_FORMAT lu const __itt_domain __itt_id __itt_string_handle __itt_metadata_type type
Definition: ittnotify_static.h:198
tbb
The graph class.
Definition: serial/tbb/parallel_for.h:46
tbb::internal::suppress_unused_warning
void suppress_unused_warning(const T1 &)
Utility template function to prevent "unused" warnings by various compilers.
Definition: tbb_stddef.h:398
tbb::flow::interface11::reset_flags
reset_flags
Definition: _flow_graph_impl.h:158
tbb::flow::interface11::rf_clear_edges
@ rf_clear_edges
Definition: _flow_graph_impl.h:161
internal
Definition: _flow_graph_async_msg_impl.h:24
internal::check_input_node_body_input_type
void check_input_node_body_input_type(Body)
Definition: _flow_graph_body_impl.h:117
internal::check_input_node_body_input_type_impl
void check_input_node_body_input_type_impl(Body)
Definition: _flow_graph_body_impl.h:110
internal::tag_value
tbb::internal::uint64_t tag_value
Definition: _flow_graph_body_impl.h:30
internal::graph_policy_namespace::tag_matching
key_matching< tag_value > tag_matching
Definition: _flow_graph_body_impl.h:86
internal::graph_policy_namespace::rejecting_lightweight
interface11::internal::Policy< rejecting, lightweight > rejecting_lightweight
Definition: _flow_graph_body_impl.h:90
internal::graph_policy_namespace::queueing_lightweight
interface11::internal::Policy< queueing, lightweight > queueing_lightweight
Definition: _flow_graph_body_impl.h:89
tbb::flow::internal::no_priority
static const node_priority_t no_priority
Definition: _flow_graph_impl.h:64
tbb::flow::internal::node_priority_t
unsigned int node_priority_t
Definition: _flow_graph_impl.h:63
tbb::flow::internal::SUCCESSFULLY_ENQUEUED
static tbb::task *const SUCCESSFULLY_ENQUEUED
Definition: _flow_graph_impl.h:61
tbb::flow::interface11::limiter_node
Forwards messages only if the threshold has not been reached.
Definition: flow_graph.h:2985
tbb::flow::interface11::limiter_node::my_mutex
spin_mutex my_mutex
Definition: flow_graph.h:3004
tbb::flow::interface11::limiter_node::predecessor_type
receiver< input_type >::predecessor_type predecessor_type
Definition: flow_graph.h:2989
tbb::flow::interface11::internal::untyped_receiver::predecessor_type
untyped_sender predecessor_type
The predecessor type for this node.
Definition: flow_graph.h:370
internal::Policy
Definition: _flow_graph_body_impl.h:36
internal::has_policy
Definition: _flow_graph_body_impl.h:38
internal::graph_policy_namespace::rejecting
Definition: _flow_graph_body_impl.h:70
internal::graph_policy_namespace::reserving
Definition: _flow_graph_body_impl.h:71
internal::graph_policy_namespace::queueing
Definition: _flow_graph_body_impl.h:72
internal::graph_policy_namespace::lightweight
Definition: _flow_graph_body_impl.h:73
internal::graph_policy_namespace::key_matching
field of type K being used for matching.
Definition: _flow_graph_body_impl.h:79
internal::graph_policy_namespace::key_matching::hash_compare_type
KHash hash_compare_type
Definition: _flow_graph_body_impl.h:82
internal::graph_policy_namespace::key_matching::base_key_type
strip< K >::type base_key_type
Definition: _flow_graph_body_impl.h:81
internal::graph_policy_namespace::key_matching::key_type
K key_type
Definition: _flow_graph_body_impl.h:80
internal::input_body
A functor that takes no input and generates a value of type Output.
Definition: _flow_graph_body_impl.h:97
internal::input_body::~input_body
virtual ~input_body()
Definition: _flow_graph_body_impl.h:99
internal::input_body::clone
virtual input_body * clone()=0
internal::input_body::operator()
virtual Output operator()(flow_control &fc)=0
internal::input_body_leaf
The leaf for input_body.
Definition: _flow_graph_body_impl.h:130
internal::input_body_leaf::body
Body body
Definition: _flow_graph_body_impl.h:147
internal::input_body_leaf::get_body
Body get_body()
Definition: _flow_graph_body_impl.h:145
internal::input_body_leaf::clone
input_body_leaf * clone() __TBB_override
Definition: _flow_graph_body_impl.h:142
internal::input_body_leaf::input_body_leaf
input_body_leaf(const Body &_body)
Definition: _flow_graph_body_impl.h:132
internal::input_body_leaf::operator()
Output operator()(flow_control &fc) __TBB_override
Definition: _flow_graph_body_impl.h:137
internal::source_body
Definition: _flow_graph_body_impl.h:151
internal::source_body::clone
virtual source_body * clone()=0
internal::source_body::operator()
virtual bool operator()(Output &output)=0
internal::source_body::~source_body
virtual ~source_body()
Definition: _flow_graph_body_impl.h:153
internal::source_body_leaf
The leaf for source_body.
Definition: _flow_graph_body_impl.h:160
internal::source_body_leaf::body
Body body
Definition: _flow_graph_body_impl.h:172
internal::source_body_leaf::operator()
bool operator()(Output &output) __TBB_override
Definition: _flow_graph_body_impl.h:164
internal::source_body_leaf::source_body_leaf
source_body_leaf(const Body &_body)
Definition: _flow_graph_body_impl.h:162
internal::source_body_leaf::clone
source_body_leaf * clone() __TBB_override
Definition: _flow_graph_body_impl.h:166
internal::source_body_leaf::get_body
Body get_body()
Definition: _flow_graph_body_impl.h:170
internal::function_body
A functor that takes an Input and generates an Output.
Definition: _flow_graph_body_impl.h:177
internal::function_body::clone
virtual function_body * clone()=0
internal::function_body::operator()
virtual Output operator()(const Input &input)=0
internal::function_body::~function_body
virtual ~function_body()
Definition: _flow_graph_body_impl.h:179
internal::function_body_leaf
the leaf for function_body
Definition: _flow_graph_body_impl.h:186
internal::function_body_leaf::operator()
Output operator()(const Input &i) __TBB_override
Definition: _flow_graph_body_impl.h:189
internal::function_body_leaf::clone
function_body_leaf * clone() __TBB_override
Definition: _flow_graph_body_impl.h:191
internal::function_body_leaf::get_body
B get_body()
Definition: _flow_graph_body_impl.h:190
internal::function_body_leaf::function_body_leaf
function_body_leaf(const B &_body)
Definition: _flow_graph_body_impl.h:188
internal::function_body_leaf::body
B body
Definition: _flow_graph_body_impl.h:195
internal::function_body_leaf< continue_msg, continue_msg, B >
the leaf for function_body specialized for Input and output of continue_msg
Definition: _flow_graph_body_impl.h:200
internal::function_body_leaf< continue_msg, continue_msg, B >::operator()
continue_msg operator()(const continue_msg &i) __TBB_override
Definition: _flow_graph_body_impl.h:203
internal::function_body_leaf< continue_msg, continue_msg, B >::clone
function_body_leaf * clone() __TBB_override
Definition: _flow_graph_body_impl.h:208
internal::function_body_leaf< continue_msg, continue_msg, B >::body
B body
Definition: _flow_graph_body_impl.h:212
internal::function_body_leaf< continue_msg, continue_msg, B >::function_body_leaf
function_body_leaf(const B &_body)
Definition: _flow_graph_body_impl.h:202
internal::function_body_leaf< continue_msg, continue_msg, B >::get_body
B get_body()
Definition: _flow_graph_body_impl.h:207
internal::function_body_leaf< Input, continue_msg, B >
the leaf for function_body specialized for Output of continue_msg
Definition: _flow_graph_body_impl.h:217
internal::function_body_leaf< Input, continue_msg, B >::body
B body
Definition: _flow_graph_body_impl.h:229
internal::function_body_leaf< Input, continue_msg, B >::clone
function_body_leaf * clone() __TBB_override
Definition: _flow_graph_body_impl.h:225
internal::function_body_leaf< Input, continue_msg, B >::operator()
continue_msg operator()(const Input &i) __TBB_override
Definition: _flow_graph_body_impl.h:220
internal::function_body_leaf< Input, continue_msg, B >::get_body
B get_body()
Definition: _flow_graph_body_impl.h:224
internal::function_body_leaf< Input, continue_msg, B >::function_body_leaf
function_body_leaf(const B &_body)
Definition: _flow_graph_body_impl.h:219
internal::function_body_leaf< continue_msg, Output, B >
the leaf for function_body specialized for Input of continue_msg
Definition: _flow_graph_body_impl.h:234
internal::function_body_leaf< continue_msg, Output, B >::body
B body
Definition: _flow_graph_body_impl.h:245
internal::function_body_leaf< continue_msg, Output, B >::get_body
B get_body()
Definition: _flow_graph_body_impl.h:240
internal::function_body_leaf< continue_msg, Output, B >::clone
function_body_leaf * clone() __TBB_override
Definition: _flow_graph_body_impl.h:241
internal::function_body_leaf< continue_msg, Output, B >::operator()
Output operator()(const continue_msg &i) __TBB_override
Definition: _flow_graph_body_impl.h:237
internal::function_body_leaf< continue_msg, Output, B >::function_body_leaf
function_body_leaf(const B &_body)
Definition: _flow_graph_body_impl.h:236
internal::multifunction_body
function_body that takes an Input and a set of output ports
Definition: _flow_graph_body_impl.h:250
internal::multifunction_body::get_body_ptr
virtual void * get_body_ptr()=0
internal::multifunction_body::~multifunction_body
virtual ~multifunction_body()
Definition: _flow_graph_body_impl.h:252
internal::multifunction_body::operator()
virtual void operator()(const Input &, OutputSet &)=0
internal::multifunction_body::clone
virtual multifunction_body * clone()=0
internal::multifunction_body_leaf
leaf for multifunction. OutputSet can be a std::tuple or a vector.
Definition: _flow_graph_body_impl.h:260
internal::multifunction_body_leaf::get_body_ptr
void * get_body_ptr() __TBB_override
Definition: _flow_graph_body_impl.h:266
internal::multifunction_body_leaf::clone
multifunction_body_leaf * clone() __TBB_override
Definition: _flow_graph_body_impl.h:267
internal::multifunction_body_leaf::body
B body
Definition: _flow_graph_body_impl.h:272
internal::multifunction_body_leaf::operator()
void operator()(const Input &input, OutputSet &oset) __TBB_override
Definition: _flow_graph_body_impl.h:263
internal::multifunction_body_leaf::multifunction_body_leaf
multifunction_body_leaf(const B &_body)
Definition: _flow_graph_body_impl.h:262
internal::type_to_key_function_body
Definition: _flow_graph_body_impl.h:278
internal::type_to_key_function_body::clone
virtual type_to_key_function_body * clone()=0
internal::type_to_key_function_body::operator()
virtual Output operator()(const Input &input)=0
internal::type_to_key_function_body::~type_to_key_function_body
virtual ~type_to_key_function_body()
Definition: _flow_graph_body_impl.h:280
internal::type_to_key_function_body< Input, Output & >
Definition: _flow_graph_body_impl.h:287
internal::type_to_key_function_body< Input, Output & >::~type_to_key_function_body
virtual ~type_to_key_function_body()
Definition: _flow_graph_body_impl.h:289
internal::type_to_key_function_body< Input, Output & >::operator()
virtual const Output & operator()(const Input &input)=0
internal::type_to_key_function_body< Input, Output & >::clone
virtual type_to_key_function_body * clone()=0
internal::type_to_key_function_body_leaf
Definition: _flow_graph_body_impl.h:295
internal::type_to_key_function_body_leaf::operator()
Output operator()(const Input &i) __TBB_override
Definition: _flow_graph_body_impl.h:298
internal::type_to_key_function_body_leaf::body
B body
Definition: _flow_graph_body_impl.h:304
internal::type_to_key_function_body_leaf::clone
type_to_key_function_body_leaf * clone() __TBB_override
Definition: _flow_graph_body_impl.h:300
internal::type_to_key_function_body_leaf::get_body
B get_body()
Definition: _flow_graph_body_impl.h:299
internal::type_to_key_function_body_leaf::type_to_key_function_body_leaf
type_to_key_function_body_leaf(const B &_body)
Definition: _flow_graph_body_impl.h:297
internal::type_to_key_function_body_leaf< Input, Output &, B >
Definition: _flow_graph_body_impl.h:308
internal::type_to_key_function_body_leaf< Input, Output &, B >::type_to_key_function_body_leaf
type_to_key_function_body_leaf(const B &_body)
Definition: _flow_graph_body_impl.h:310
internal::type_to_key_function_body_leaf< Input, Output &, B >::get_body
B get_body()
Definition: _flow_graph_body_impl.h:314
internal::type_to_key_function_body_leaf< Input, Output &, B >::operator()
const Output & operator()(const Input &i) __TBB_override
Definition: _flow_graph_body_impl.h:311
internal::type_to_key_function_body_leaf< Input, Output &, B >::body
B body
Definition: _flow_graph_body_impl.h:319
internal::type_to_key_function_body_leaf< Input, Output &, B >::clone
type_to_key_function_body_leaf * clone() __TBB_override
Definition: _flow_graph_body_impl.h:315
internal::forward_task_bypass
A task that calls a node's forward_task function.
Definition: _flow_graph_body_impl.h:328
internal::forward_task_bypass::my_node
NodeType & my_node
Definition: _flow_graph_body_impl.h:330
internal::forward_task_bypass::execute
task * execute() __TBB_override
Definition: _flow_graph_body_impl.h:343
internal::forward_task_bypass::forward_task_bypass
forward_task_bypass(NodeType &n)
Definition: _flow_graph_body_impl.h:334
internal::apply_body_task_bypass
A task that calls a node's apply_body_bypass function, passing in an input of type Input.
Definition: _flow_graph_body_impl.h:353
internal::apply_body_task_bypass::execute
task * execute() __TBB_override
Definition: _flow_graph_body_impl.h:369
internal::apply_body_task_bypass::my_input
Input my_input
Definition: _flow_graph_body_impl.h:356
internal::apply_body_task_bypass::my_node
NodeType & my_node
Definition: _flow_graph_body_impl.h:355
internal::apply_body_task_bypass::apply_body_task_bypass
apply_body_task_bypass(NodeType &n, const Input &i)
Definition: _flow_graph_body_impl.h:360
internal::source_task_bypass
A task that calls a node's apply_body_bypass function with no input.
Definition: _flow_graph_body_impl.h:378
internal::source_task_bypass::source_task_bypass
source_task_bypass(NodeType &n)
Definition: _flow_graph_body_impl.h:384
internal::source_task_bypass::my_node
NodeType & my_node
Definition: _flow_graph_body_impl.h:380
internal::source_task_bypass::execute
task * execute() __TBB_override
Definition: _flow_graph_body_impl.h:386
internal::empty_body
An empty functor that takes an Input and returns a default constructed Output.
Definition: _flow_graph_body_impl.h:397
internal::empty_body::operator()
Output operator()(const Input &) const
Definition: _flow_graph_body_impl.h:398
internal::decrementer
Definition: _flow_graph_body_impl.h:402
internal::decrementer< T, DecrementType, typename tbb::internal::enable_if< tbb::internal::is_integral< DecrementType >::value, void >::type >::graph_reference
graph & graph_reference() const __TBB_override
Definition: _flow_graph_body_impl.h:419
internal::decrementer< T, DecrementType, typename tbb::internal::enable_if< tbb::internal::is_integral< DecrementType >::value, void >::type >::try_put_task
task * try_put_task(const DecrementType &value) __TBB_override
Definition: _flow_graph_body_impl.h:412
internal::decrementer< T, DecrementType, typename tbb::internal::enable_if< tbb::internal::is_integral< DecrementType >::value, void >::type >::reset_receiver
void reset_receiver(reset_flags f) __TBB_override
Definition: _flow_graph_body_impl.h:424
internal::decrementer< T, DecrementType, typename tbb::internal::enable_if< tbb::internal::is_integral< DecrementType >::value, void >::type >::set_owner
void set_owner(T *node)
Definition: _flow_graph_body_impl.h:438
internal::decrementer< T, DecrementType, typename tbb::internal::enable_if< tbb::internal::is_integral< DecrementType >::value, void >::type >::decrementer
decrementer()
Definition: _flow_graph_body_impl.h:437
internal::decrementer< T, DecrementType, typename tbb::internal::enable_if< tbb::internal::is_integral< DecrementType >::value, void >::type >::my_node
T * my_node
Definition: _flow_graph_body_impl.h:409
internal::decrementer< T, continue_msg, void >::graph_reference
graph & graph_reference() const __TBB_override
Definition: _flow_graph_body_impl.h:484
internal::decrementer< T, continue_msg, void >::input_type
continue_msg input_type
Definition: _flow_graph_body_impl.h:490
internal::decrementer< T, continue_msg, void >::output_type
continue_msg output_type
Definition: _flow_graph_body_impl.h:491
internal::decrementer< T, continue_msg, void >::my_node
T * my_node
Definition: _flow_graph_body_impl.h:476
internal::decrementer< T, continue_msg, void >::execute
task * execute() __TBB_override
Definition: _flow_graph_body_impl.h:478
internal::decrementer< T, continue_msg, void >::decrementer
decrementer(int number_of_predecessors=0)
Definition: _flow_graph_body_impl.h:492
internal::decrementer< T, continue_msg, void >::set_owner
void set_owner(T *node)
Definition: _flow_graph_body_impl.h:501
tbb::internal::strip
Strips its template type argument from cv- and ref-qualifiers.
Definition: _template_helpers.h:38
tbb::internal::strip::type
T type
Definition: _template_helpers.h:38
tbb::internal::is_same_type
Detects whether two given types are the same.
Definition: _template_helpers.h:61
tbb::internal::body_arg_detector
Definition: _template_helpers.h:283
tbb::spin_mutex::scoped_lock
friend class scoped_lock
Definition: spin_mutex.h:179
tbb::internal::no_assign
Base class for types that should not be assigned.
Definition: tbb_stddef.h:322
tbb::internal::no_copy
Base class for types that should not be copied or assigned.
Definition: tbb_stddef.h:330
tbb::internal::bool_constant
Definition: tbb_stddef.h:486

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.