Intel(R) Threading Building Blocks Doxygen Documentation  version 4.2.3
tbb::flow::interface11::receiver< T > Class Template Referenceabstract

Pure virtual template class that defines a receiver of messages of type T. More...

#include <flow_graph.h>

Inheritance diagram for tbb::flow::interface11::receiver< T >:
Collaboration diagram for tbb::flow::interface11::receiver< T >:

Public Member Functions

virtual ~receiver ()
 Destructor. More...
 
bool try_put (const T &t)
 Put an item to the receiver. More...
 
virtual __TBB_DEPRECATED bool register_predecessor (predecessor_type &)
 Add a predecessor to the node. More...
 
virtual __TBB_DEPRECATED bool remove_predecessor (predecessor_type &)
 Remove a predecessor from the node. More...
 

Public Attributes

__TBB_DEPRECATED typedef T input_type
 The input type of this receiver. More...
 
__TBB_DEPRECATED typedef sender< T > predecessor_type
 The predecessor type for this node. More...
 

Protected Member Functions

virtual tasktry_put_task (const T &t)=0
 
virtual graphgraph_reference () const =0
 
virtual void reset_receiver (reset_flags f=rf_reset_protocol)=0
 put receiver back in initial state More...
 
virtual bool is_continue_receiver ()
 

Friends

template<typename R , typename B >
class run_and_put_task
 put item to successor; return task to run the successor if possible. More...
 
template<typename X , typename Y >
class internal::broadcast_cache
 
template<typename X , typename Y >
class internal::round_robin_cache
 
template<typename TT , typename M >
class internal::successor_cache
 
template<typename , typename >
class proxy_dependency_receiver
 

Detailed Description

template<typename T>
class tbb::flow::interface11::receiver< T >

Pure virtual template class that defines a receiver of messages of type T.

Definition at line 117 of file flow_graph.h.

Constructor & Destructor Documentation

◆ ~receiver()

template<typename T >
virtual tbb::flow::interface11::receiver< T >::~receiver ( )
inlinevirtual

Destructor.

Definition at line 546 of file flow_graph.h.

546 {}

Member Function Documentation

◆ graph_reference()

◆ is_continue_receiver()

template<typename T >
virtual bool tbb::flow::interface11::receiver< T >::is_continue_receiver ( )
inlineprotectedvirtual

Reimplemented in tbb::flow::interface11::continue_receiver.

Definition at line 587 of file flow_graph.h.

587 { return false; }

◆ register_predecessor()

template<typename T >
virtual __TBB_DEPRECATED bool tbb::flow::interface11::receiver< T >::register_predecessor ( predecessor_type )
inlinevirtual

Add a predecessor to the node.

Reimplemented in tbb::flow::interface11::continue_receiver.

Definition at line 567 of file flow_graph.h.

567 { return false; }

◆ remove_predecessor()

template<typename T >
virtual __TBB_DEPRECATED bool tbb::flow::interface11::receiver< T >::remove_predecessor ( predecessor_type )
inlinevirtual

Remove a predecessor from the node.

Reimplemented in tbb::flow::interface11::continue_receiver.

Definition at line 570 of file flow_graph.h.

570 { return false; }

◆ reset_receiver()

◆ try_put()

template<typename T >
bool tbb::flow::interface11::receiver< T >::try_put ( const T &  t)
inline

Put an item to the receiver.

Definition at line 549 of file flow_graph.h.

549  {
550  task *res = try_put_task(t);
551  if (!res) return false;
553  return true;
554  }

◆ try_put_task()

template<typename T >
virtual task* tbb::flow::interface11::receiver< T >::try_put_task ( const T &  t)
protectedpure virtual

Implemented in tbb::flow::interface11::split_node< TupleType, Allocator >, tbb::flow::interface11::write_once_node< T >, tbb::flow::interface11::buffer_node< T, Allocator >, tbb::flow::interface11::buffer_node< T, __TBB_DEFAULT_NODE_ALLOCATOR(T) >, tbb::flow::interface11::broadcast_node< T >, tbb::flow::interface11::overwrite_node< T >, internal::function_input_base< Input, Policy, A, ImplType >, internal::function_input_base< Input, queueing, cache_aligned_allocator< Input >, function_input< Input, continue_msg, queueing, cache_aligned_allocator< Input > > >, internal::function_input_base< Input, Policy, A, function_input< Input, Output, Policy, A > >, internal::function_input_base< Input, Policy, A, multifunction_input< Input, OutputPortSet, Policy, A > >, internal::function_input_base< Input, queueing, cache_aligned_allocator< Input >, multifunction_input< Input, internal::wrap_tuple_elements< tbb::flow::tuple_size< Output >::value, internal::multifunction_output, Output >::type, queueing, cache_aligned_allocator< Input > > >, and internal::function_input_base< Input, queueing_lightweight, cache_aligned_allocator< Input >, multifunction_input< Input, internal::wrap_tuple_elements< tbb::flow::tuple_size< tuple< Output > >::value, internal::multifunction_output, tuple< Output > >::type, queueing_lightweight, cache_aligned_allocator< Input > > >.

Referenced by tbb::flow::interface11::receiver< Output >::try_put().

Here is the caller graph for this function:

Friends And Related Function Documentation

◆ internal::broadcast_cache

template<typename T >
template<typename X , typename Y >
friend class internal::broadcast_cache
friend

Definition at line 559 of file flow_graph.h.

◆ internal::round_robin_cache

template<typename T >
template<typename X , typename Y >
friend class internal::round_robin_cache
friend

Definition at line 560 of file flow_graph.h.

◆ internal::successor_cache

template<typename T >
template<typename TT , typename M >
friend class internal::successor_cache
friend

Definition at line 586 of file flow_graph.h.

◆ proxy_dependency_receiver

template<typename T >
template<typename , typename >
friend class proxy_dependency_receiver
friend

Definition at line 590 of file flow_graph.h.

◆ run_and_put_task

template<typename T >
template<typename R , typename B >
friend class run_and_put_task
friend

put item to successor; return task to run the successor if possible.

Definition at line 558 of file flow_graph.h.

Member Data Documentation

◆ input_type

template<typename T >
__TBB_DEPRECATED typedef T tbb::flow::interface11::receiver< T >::input_type

The input type of this receiver.

Definition at line 540 of file flow_graph.h.

◆ predecessor_type

template<typename T >
__TBB_DEPRECATED typedef sender<T> tbb::flow::interface11::receiver< T >::predecessor_type

The predecessor type for this node.

Definition at line 543 of file flow_graph.h.


The documentation for this class was generated from the following file:
tbb::flow::interface11::internal::spawn_in_graph_arena
void spawn_in_graph_arena(tbb::flow::interface10::graph &g, tbb::task &arena_task)
Spawns a task inside graph arena.
Definition: _flow_graph_impl.h:521
tbb::flow::interface11::receiver::graph_reference
virtual graph & graph_reference() const =0
tbb::flow::internal::SUCCESSFULLY_ENQUEUED
static tbb::task *const SUCCESSFULLY_ENQUEUED
Definition: _flow_graph_impl.h:61
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
tbb::flow::interface11::receiver::try_put_task
virtual task * try_put_task(const T &t)=0

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.