Home ⌂Doc Index ◂Up ▴
Intel(R) Threading Building Blocks Doxygen Documentation  version 4.2.3
tbb::flow::interface11::internal::queueing_port< T > Class Template Reference

queueing join_port More...

#include <flow_graph.h>

Inheritance diagram for tbb::flow::interface11::internal::queueing_port< T >:
Collaboration diagram for tbb::flow::interface11::internal::queueing_port< T >:

Classes

class  queueing_port_operation
 

Public Types

typedef T input_type
 
typedef receiver< input_type >::predecessor_type predecessor_type
 
typedef queueing_port< T > class_type
 
- Public Types inherited from tbb::flow::interface11::internal::untyped_receiver
typedef untyped_sender predecessor_type
 The predecessor type for this node. More...
 
- Public Types inherited from tbb::flow::interface11::internal::item_buffer< T >
enum  buffer_item_state
 
typedef T item_type
 

Public Member Functions

 queueing_port ()
 Constructor. More...
 
 queueing_port (const queueing_port &)
 copy constructor More...
 
void set_join_node_pointer (forwarding_base *join)
 record parent for tallying available items More...
 
bool get_item (T &v)
 
void reset_port ()
 
void reset_receiver (reset_flags f) __TBB_override
 put receiver back in initial state More...
 
- Public Member Functions inherited from tbb::flow::interface11::receiver< T >
bool try_put (const typename internal::async_helpers< T >::filtered_type &t)
 Put an item to the receiver. More...
 
bool try_put (const typename internal::async_helpers< T >::async_type &t)
 
- Public Member Functions inherited from tbb::flow::interface11::internal::untyped_receiver
virtual ~untyped_receiver ()
 Destructor. More...
 
template<typename X >
bool try_put (const X &t)
 Put an item to the receiver. More...
 
virtual bool register_predecessor (predecessor_type &)
 Add a predecessor to the node. More...
 
virtual bool remove_predecessor (predecessor_type &)
 Remove a predecessor from the node. More...
 
- Public Member Functions inherited from tbb::flow::interface11::internal::item_buffer< T >
 item_buffer ()
 Constructor. More...
 
 ~item_buffer ()
 
void reset ()
 

Protected Member Functions

tasktry_put_task (const T &v) __TBB_override
 Put item to successor; return task to run the successor if possible. More...
 
graphgraph_reference () const __TBB_override
 
- Protected Member Functions inherited from tbb::flow::interface11::receiver< T >
virtual tasktry_put_task_wrapper (const void *p, bool is_async) __TBB_override
 
- Protected Member Functions inherited from tbb::flow::interface11::internal::untyped_receiver
template<typename X >
tasktry_put_task (const X &t)
 
virtual bool is_continue_receiver ()
 
- Protected Member Functions inherited from tbb::flow::interface11::internal::item_buffer< T >
bool buffer_empty () const
 
buffer_item_typeitem (size_type i)
 
const buffer_item_typeitem (size_type i) const
 
bool my_item_valid (size_type i) const
 
bool my_item_reserved (size_type i) const
 
const item_typeget_my_item (size_t i) const
 
void set_my_item (size_t i, const item_type &o)
 
void fetch_item (size_t i, item_type &o)
 
void move_item (size_t to, size_t from)
 
bool place_item (size_t here, const item_type &me)
 
void swap_items (size_t i, size_t j)
 
void destroy_item (size_type i)
 
const item_typefront () const
 
const item_typeback () const
 
void reserve_item (size_type i)
 
void release_item (size_type i)
 
void destroy_front ()
 
void destroy_back ()
 
size_type size (size_t new_tail=0)
 
size_type capacity ()
 
bool buffer_full ()
 
void grow_my_array (size_t minimum_size)
 Grows the internal array. More...
 
bool push_back (item_type &v)
 
bool pop_back (item_type &v)
 
bool pop_front (item_type &v)
 
void clean_up_buffer (bool reset_pointers)
 

Private Types

enum  op_type { get__item, res_port, try__put_task }
 
typedef internal::aggregating_functor< class_type, queueing_port_operationhandler_type
 

Private Member Functions

void handle_operations (queueing_port_operation *op_list)
 

Private Attributes

aggregator< handler_type, queueing_port_operationmy_aggregator
 
forwarding_basemy_join
 

Friends

class internal::aggregating_functor< class_type, queueing_port_operation >
 
template<typename R , typename B >
class run_and_put_task
 
template<typename X , typename Y >
class internal::broadcast_cache
 
template<typename X , typename Y >
class internal::round_robin_cache
 

Additional Inherited Members

- Public Attributes inherited from tbb::flow::interface11::receiver< T >
__TBB_DEPRECATED typedef T input_type
 The input type of this receiver. More...
 
__TBB_DEPRECATED typedef internal::async_helpers< T >::filtered_type filtered_type
 
- Protected Types inherited from tbb::flow::interface11::internal::item_buffer< T >
typedef size_t size_type
 
typedef aligned_pair< item_type, buffer_item_state >::type buffer_item_type
 
typedef tbb::internal::allocator_rebind< cache_aligned_allocator< T >, buffer_item_type >::type allocator_type
 
- Protected Attributes inherited from tbb::flow::interface11::internal::item_buffer< T >
buffer_item_typemy_array
 
size_type my_array_size
 
size_type my_head
 
size_type my_tail
 
- Static Protected Attributes inherited from tbb::flow::interface11::internal::item_buffer< T >
static const size_type initial_buffer_size
 

Detailed Description

template<typename T>
class tbb::flow::interface11::internal::queueing_port< T >

queueing join_port

Definition at line 431 of file flow_graph.h.

Member Typedef Documentation

◆ class_type

Definition at line 435 of file flow_graph.h.

◆ handler_type

template<typename T >
typedef internal::aggregating_functor<class_type, queueing_port_operation> tbb::flow::interface11::internal::queueing_port< T >::handler_type
private

Definition at line 476 of file flow_graph.h.

◆ input_type

template<typename T >
typedef T tbb::flow::interface11::internal::queueing_port< T >::input_type

Definition at line 433 of file flow_graph.h.

◆ predecessor_type

Member Enumeration Documentation

◆ op_type

Enumerator
get__item 
res_port 
try__put_task 

Definition at line 443 of file flow_graph.h.

449  {

Constructor & Destructor Documentation

◆ queueing_port() [1/2]

template<typename T >
tbb::flow::interface11::internal::queueing_port< T >::queueing_port ( )
inline

Constructor.

Definition at line 557 of file flow_graph.h.

558  :
559  template< typename R, typename B > friend class run_and_put_task;
560  template< typename X, typename Y > friend class internal::broadcast_cache;
A cache of successors that are broadcast to.

◆ queueing_port() [2/2]

template<typename T >
tbb::flow::interface11::internal::queueing_port< T >::queueing_port ( const queueing_port< T > &  )
inline

copy constructor

Definition at line 563 of file flow_graph.h.

564  :
565  // NOTE: Following part of PUBLIC and PROTECTED sections is copy-pasted in receiver<T> under #if __TBB_PREVIEW_ASYNC_MSG
566 

Member Function Documentation

◆ get_item()

template<typename T >
bool tbb::flow::interface11::internal::queueing_port< T >::get_item ( T &  v)
inline

Definition at line 573 of file flow_graph.h.

583  :

◆ graph_reference()

template<typename T >
graph& tbb::flow::interface11::internal::queueing_port< T >::graph_reference ( ) const
inlineprotectedvirtual

Implements tbb::flow::interface11::internal::untyped_receiver.

Definition at line 550 of file flow_graph.h.

550  {
551  task *res = try_put_task(t);
552  if (!res) return false;
task * try_put_task(const T &v) __TBB_override
Put item to successor; return task to run the successor if possible.
Definition: flow_graph.h:542
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

◆ handle_operations()

template<typename T >
void tbb::flow::interface11::internal::queueing_port< T >::handle_operations ( queueing_port_operation op_list)
inlineprivate

Definition at line 480 of file flow_graph.h.

480  :
481  virtual task* try_put_task_wrapper( const void *p, bool is_async ) __TBB_override {
483  }
484 
486  virtual task *try_put_task(const T& t) = 0;
487 
488 }; // class receiver<T>
489 
490 #else // __TBB_PREVIEW_ASYNC_MSG
491 
493 template< typename T >
494 class sender {
495 public:
497  __TBB_DEPRECATED typedef T output_type;
498 
500  __TBB_DEPRECATED typedef receiver<T> successor_type;
501 
502  virtual ~sender() {}
503 
504  // NOTE: Following part of PUBLIC section is partly copy-pasted in sender<T> under #if __TBB_PREVIEW_ASYNC_MSG
505 
507  __TBB_DEPRECATED virtual bool register_successor( successor_type &r ) = 0;
508 
510  __TBB_DEPRECATED virtual bool remove_successor( successor_type &r ) = 0;
511 
513  virtual bool try_get( T & ) { return false; }
514 
516  virtual bool try_reserve( T & ) { return false; }
517 
519  virtual bool try_release( ) { return false; }
520 
522  virtual bool try_consume( ) { return false; }
523 
524 #if TBB_DEPRECATED_FLOW_NODE_EXTRACTION
525  __TBB_DEPRECATED typedef typename internal::edge_container<successor_type> built_successors_type;
527  __TBB_DEPRECATED typedef typename built_successors_type::edge_list_type successor_list_type;
528  __TBB_DEPRECATED virtual built_successors_type &built_successors() = 0;
529  __TBB_DEPRECATED virtual void internal_add_built_successor( successor_type & ) = 0;
530  __TBB_DEPRECATED virtual void internal_delete_built_successor( successor_type & ) = 0;
531  __TBB_DEPRECATED virtual void copy_successors( successor_list_type &) = 0;
532  __TBB_DEPRECATED virtual size_t successor_count() = 0;
533 #endif /* TBB_DEPRECATED_FLOW_NODE_EXTRACTION */
534 }; // class sender<T>
535 
virtual task * try_put_task_wrapper(const void *p, bool is_async) __TBB_override
Definition: flow_graph.h:481
task * try_put_task(const T &v) __TBB_override
Put item to successor; return task to run the successor if possible.
Definition: flow_graph.h:542
#define __TBB_DEPRECATED
Definition: tbb_config.h:636
void const char const char int ITT_FORMAT __itt_group_sync p
static task * try_put_task_wrapper_impl(receiver< T > *const this_recv, const void *p, bool is_async)
Definition: flow_graph.h:245
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
#define __TBB_override
Definition: tbb_stddef.h:240

◆ reset_port()

template<typename T >
void tbb::flow::interface11::internal::queueing_port< T >::reset_port ( )
inline

Definition at line 581 of file flow_graph.h.

583  :
585  virtual void reset_receiver(reset_flags f = rf_reset_protocol) = 0;
void reset_receiver(reset_flags f) __TBB_override
put receiver back in initial state
Definition: flow_graph.h:620

◆ reset_receiver()

template<typename T >
void tbb::flow::interface11::internal::queueing_port< T >::reset_receiver ( reset_flags  f)
inlinevirtual

put receiver back in initial state

Implements tbb::flow::interface11::internal::untyped_receiver.

Definition at line 620 of file flow_graph.h.

624  {
625  spin_mutex::scoped_lock l(my_mutex);
626  ++my_predecessor_count;
627  return true;
friend class scoped_lock
Definition: spin_mutex.h:179

◆ set_join_node_pointer()

template<typename T >
void tbb::flow::interface11::internal::queueing_port< T >::set_join_node_pointer ( forwarding_base join)
inline

record parent for tallying available items

Definition at line 569 of file flow_graph.h.

571  { return false; }

◆ try_put_task()

template<typename T >
task* tbb::flow::interface11::internal::queueing_port< T >::try_put_task ( const T &  t)
inlineprotectedvirtual

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

Implements tbb::flow::interface11::receiver< T >.

Definition at line 542 of file flow_graph.h.

547  {}
548 

Friends And Related Function Documentation

◆ internal::aggregating_functor< class_type, queueing_port_operation >

template<typename T >
friend class internal::aggregating_functor< class_type, queueing_port_operation >
friend

Definition at line 477 of file flow_graph.h.

◆ internal::broadcast_cache

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

Definition at line 540 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 541 of file flow_graph.h.

◆ run_and_put_task

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

Definition at line 539 of file flow_graph.h.

Member Data Documentation

◆ my_aggregator

template<typename T >
aggregator<handler_type, queueing_port_operation> tbb::flow::interface11::internal::queueing_port< T >::my_aggregator
private

Definition at line 478 of file flow_graph.h.

◆ my_join

template<typename T >
forwarding_base* tbb::flow::interface11::internal::queueing_port< T >::my_join
private

Definition at line 634 of file flow_graph.h.


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.