Intel(R) Threading Building Blocks Doxygen Documentation  version 4.2.3
tbb::flow::interface10::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::interface10::internal::predecessor_cache< T, M >:
Collaboration diagram for tbb::flow::interface10::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::interface10::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::interface10::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::interface10::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::interface10::internal::node_cache< untyped_sender, M >
typedef M mutex_type
 
- Protected Member Functions inherited from tbb::flow::interface10::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::interface10::internal::predecessor_cache< T, M >

A cache of predecessors that only supports try_get.

Definition at line 110 of file flow_graph.h.

Member Typedef Documentation

◆ mutex_type

template<typename T, typename M = spin_mutex>
typedef M tbb::flow::interface10::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::interface10::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::interface10::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::interface10::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::interface10::internal::predecessor_cache< T, M >::predecessor_cache ( )
inline

Definition at line 140 of file flow_graph.h.

143 {

Member Function Documentation

◆ get_item()

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

Definition at line 144 of file flow_graph.h.

152  :
153  edge_list_type built_edges;
154 }; // class edge_container
155 #endif /* TBB_DEPRECATED_FLOW_NODE_EXTRACTION */
156 
157 } // namespace internal
158 
159 } // namespace interface10
160 } // namespace flow
161 } // namespace tbb
162 
165 
166 namespace tbb {
167 namespace flow {
168 namespace interface10 {
169 
170 // enqueue left task if necessary. Returns the non-enqueued task if there is one.
171 static inline tbb::task *combine_tasks(graph& g, tbb::task * left, tbb::task * right) {
The graph class.
static tbb::task * combine_tasks(graph &g, tbb::task *left, tbb::task *right)
Definition: flow_graph.h:171
Base class for user-defined tasks.
Definition: task.h:589

◆ reset()

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

Definition at line 174 of file flow_graph.h.

178  {
179  // both are valid tasks
181  return right;
182  }
183  return left;
184 }
185 
void spawn_in_graph_arena(graph &g, tbb::task &arena_task)
Spawns a task inside graph arena.

◆ set_owner()

template<typename T, typename M = spin_mutex>
void tbb::flow::interface10::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().

143 {
Here is the caller graph for this function:

Member Data Documentation

◆ my_owner

template<typename T, typename M = spin_mutex>
successor_type* tbb::flow::interface10::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.