Intel(R) Threading Building Blocks Doxygen Documentation  version 4.2.3
tbb::flow::interface11::internal::predecessor_cache< T, M > Class Template Reference

A cache of predecessors that only supports try_get. More...

#include <flow_graph.h>

Inheritance diagram for tbb::flow::interface11::internal::predecessor_cache< T, M >:
Collaboration diagram for tbb::flow::interface11::internal::predecessor_cache< T, M >:

Public Types

typedef M mutex_type
 
typedef T output_type
 
typedef untyped_sender predecessor_type
 
typedef untyped_receiver successor_type
 
- Public Types inherited from tbb::flow::interface11::internal::node_cache< untyped_sender, M >
typedef size_t size_type
 

Public Member Functions

 predecessor_cache ()
 
void set_owner (successor_type *owner)
 
bool get_item (output_type &v)
 
void reset ()
 
- Public Member Functions inherited from tbb::flow::interface11::internal::node_cache< untyped_sender, M >
bool empty ()
 
void add (untyped_sender &n)
 
void remove (untyped_sender &n)
 
void clear ()
 

Protected Attributes

successor_typemy_owner
 
- Protected Attributes inherited from tbb::flow::interface11::internal::node_cache< untyped_sender, M >
mutex_type my_mutex
 
std::queue< untyped_sender * > my_q
 

Additional Inherited Members

- Protected Types inherited from tbb::flow::interface11::internal::node_cache< untyped_sender, M >
typedef M mutex_type
 
- Protected Member Functions inherited from tbb::flow::interface11::internal::node_cache< untyped_sender, M >
bool internal_empty ()
 
size_type internal_size ()
 
void internal_push (untyped_sender &n)
 
untyped_senderinternal_pop ()
 

Detailed Description

template<typename T, typename M = spin_mutex>
class tbb::flow::interface11::internal::predecessor_cache< T, M >

A cache of predecessors that only supports try_get.

Definition at line 122 of file flow_graph.h.

Member Typedef Documentation

◆ mutex_type

template<typename T, typename M = spin_mutex>
typedef M tbb::flow::interface11::internal::predecessor_cache< T, M >::mutex_type

Definition at line 130 of file flow_graph.h.

◆ output_type

template<typename T, typename M = spin_mutex>
typedef T tbb::flow::interface11::internal::predecessor_cache< T, M >::output_type

Definition at line 131 of file flow_graph.h.

◆ predecessor_type

template<typename T, typename M = spin_mutex>
typedef untyped_sender tbb::flow::interface11::internal::predecessor_cache< T, M >::predecessor_type

Definition at line 133 of file flow_graph.h.

◆ successor_type

template<typename T, typename M = spin_mutex>
typedef untyped_receiver tbb::flow::interface11::internal::predecessor_cache< T, M >::successor_type

Definition at line 134 of file flow_graph.h.

Constructor & Destructor Documentation

◆ predecessor_cache()

template<typename T, typename M = spin_mutex>
tbb::flow::interface11::internal::predecessor_cache< T, M >::predecessor_cache ( )
inline

Definition at line 140 of file flow_graph.h.

142 {

Member Function Documentation

◆ get_item()

template<typename T, typename M = spin_mutex>
bool tbb::flow::interface11::internal::predecessor_cache< T, M >::get_item ( output_type v)
inline

Definition at line 144 of file flow_graph.h.

146  {
147  for (typename edge_list_type::iterator i = built_edges.begin(); i != built_edges.end(); ++i) {
148  if (*i == &s) {
149  (void)built_edges.erase(i);
150  return; // only remove one predecessor per request
151  }
152  }
153  }
154 
155  void copy_edges(edge_list_type &v) {
156  v = built_edges;
157  }
158 
159  size_t edge_count() {
160  return (size_t)(built_edges.size());
161  }
162 
163  void clear() {
164  built_edges.clear();
165  }
166 
167  // methods remove the statement from all predecessors/successors liste in the edge
168  // container.
169  template< typename S > void sender_extract(S &s);
170  template< typename R > void receiver_extract(R &r);
171 
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_id __itt_string_handle __itt_metadata_type size_t void ITT_FORMAT p const __itt_domain __itt_id __itt_string_handle const wchar_t size_t ITT_FORMAT lu const __itt_domain __itt_id __itt_relation __itt_id ITT_FORMAT p const wchar_t int ITT_FORMAT __itt_group_mark S
void const char const char int ITT_FORMAT __itt_group_sync s

◆ reset()

template<typename T, typename M = spin_mutex>
void tbb::flow::interface11::internal::predecessor_cache< T, M >::reset ( )
inline

Definition at line 174 of file flow_graph.h.

186  {

◆ set_owner()

template<typename T, typename M = spin_mutex>
void tbb::flow::interface11::internal::predecessor_cache< T, M >::set_owner ( successor_type owner)
inline

Definition at line 142 of file flow_graph.h.

Referenced by tbb::flow::interface11::limiter_node< T, DecrementType >::initialize().

142 {
Here is the caller graph for this function:

Member Data Documentation

◆ my_owner

template<typename T, typename M = spin_mutex>
successor_type* tbb::flow::interface11::internal::predecessor_cache< T, M >::my_owner
protected

Definition at line 192 of file flow_graph.h.


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

Copyright © 2005-2019 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.