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

218 {

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.

264  {

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

256  {
257  // Incoming 't' is NOT async
258  return this_recv->try_put_task(from_void_ptr(p));
259  }
void const char const char int ITT_FORMAT __itt_group_sync p

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

256  {

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

245  {
246  if (is_async) {
247  // This (T) is NOT async and incoming 'A<X> t' IS async

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

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

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.