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

148 :
149  edge_list_type built_edges;

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.

148  :
149  edge_list_type built_edges;
150 }; // class edge_container
151 #endif /* TBB_DEPRECATED_FLOW_NODE_EXTRACTION */
152 
153 } // namespace internal
154 
155 } // namespace interface10
156 } // namespace flow
157 } // namespace tbb
158 
161 
162 namespace tbb {
163 namespace flow {
164 namespace interface10 {
165 
166 // enqueue left task if necessary. Returns the non-enqueued task if there is one.
167 static inline tbb::task *combine_tasks(graph& g, tbb::task * left, tbb::task * right) {
168  // if no RHS task, don't change left.
169  if (right == NULL) return left;
170  // right != NULL
171  if (left == NULL) return right;
Base class for user-defined tasks.
Definition: task.h:589
The graph class.
static tbb::task * combine_tasks(graph &g, tbb::task *left, tbb::task *right)
Definition: flow_graph.h:167

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

174  {
175  // both are valid tasks
177  return right;
178  }
179  return left;
180 }
181 
182 #if __TBB_PREVIEW_ASYNC_MSG
183 
184 template < typename T > class async_msg;
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.

148 :
149  edge_list_type built_edges;

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.