Home ⌂Doc Index ◂Up ▴
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 130 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.

145 {

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.

145  {
146 
147 public:
148  typedef std::list<C *, tbb::tbb_allocator<C *> > edge_list_type;
149 
150  void add_edge(C &s) {
151  built_edges.push_back(&s);
152  }
153 
154  void delete_edge(C &s) {
155  for (typename edge_list_type::iterator i = built_edges.begin(); i != built_edges.end(); ++i) {
156  if (*i == &s) {
157  (void)built_edges.erase(i);
158  return; // only remove one predecessor per request
159  }
160  }
161  }
162 
163  void copy_edges(edge_list_type &v) {
164  v = built_edges;
165  }
166 
167  size_t edge_count() {
168  return (size_t)(built_edges.size());
169  }
170 
171  void clear() {
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.

180  :
181  edge_list_type built_edges;
182 }; // class edge_container
183 #endif /* TBB_DEPRECATED_FLOW_NODE_EXTRACTION */
184 
185 } // namespace internal

◆ 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.

145 {

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-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.