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

An cache of predecessors that supports requests and reservations. More...

#include <flow_graph.h>

Inheritance diagram for tbb::flow::interface11::internal::reservable_predecessor_cache< T, M >:
Collaboration diagram for tbb::flow::interface11::internal::reservable_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::predecessor_cache< T, M >
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

 reservable_predecessor_cache ()
 
bool try_reserve (output_type &v)
 
bool try_release ()
 
bool try_consume ()
 
void reset ()
 
void clear ()
 
- Public Member Functions inherited from tbb::flow::interface11::internal::predecessor_cache< T, M >
 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 ()
 

Private Attributes

predecessor_typereserved_src
 

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 ()
 
- Protected Attributes inherited from tbb::flow::interface11::internal::predecessor_cache< T, M >
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
 

Detailed Description

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

An cache of predecessors that supports requests and reservations.

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::reservable_predecessor_cache< T, M >::mutex_type

Definition at line 200 of file flow_graph.h.

◆ output_type

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

Definition at line 201 of file flow_graph.h.

◆ predecessor_type

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

Definition at line 203 of file flow_graph.h.

◆ successor_type

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

Definition at line 204 of file flow_graph.h.

Constructor & Destructor Documentation

◆ reservable_predecessor_cache()

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

Definition at line 210 of file flow_graph.h.

217 {

Member Function Documentation

◆ clear()

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

Definition at line 261 of file flow_graph.h.

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

263  {
264  typedef T async_type;
Here is the caller graph for this function:

◆ reset()

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

Definition at line 256 of file flow_graph.h.

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

Here is the caller graph for this function:

◆ try_consume()

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

Definition at line 250 of file flow_graph.h.

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

255  {
Here is the caller graph for this function:

◆ try_release()

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

Definition at line 243 of file flow_graph.h.

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

244  {
245  if (is_async) {
246  // This (T) is NOT async and incoming 'A<X> t' IS async
247  // Get data from async_msg
Here is the caller graph for this function:

◆ try_reserve()

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

Definition at line 213 of file flow_graph.h.

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

217  {
218 
219 template < typename T > class async_storage;
220 
221 template< typename T, typename = void >
222 struct async_helpers {
223  typedef async_msg<T> async_type;
224  typedef T filtered_type;
225 
226  static const bool is_async_type = false;
227 
228  static const void* to_void_ptr(const T& t) {
229  return static_cast<const void*>(&t);
230  }
231 
232  static void* to_void_ptr(T& t) {
233  return static_cast<void*>(&t);
234  }
235 
236  static const T& from_void_ptr(const void* p) {
237  return *static_cast<const T*>(p);
238  }
239 
240  static T& from_void_ptr(void* p) {
void const char const char int ITT_FORMAT __itt_group_sync p
Here is the caller graph for this function:

Member Data Documentation

◆ reserved_src

template<typename T, typename M = spin_mutex>
predecessor_type* tbb::flow::interface11::internal::reservable_predecessor_cache< T, M >::reserved_src
private

Definition at line 267 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.