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

A node_cache maintains a std::queue of elements of type T. Each operation is protected by a lock. More...

#include <flow_graph.h>

Inheritance diagram for tbb::flow::interface10::internal::node_cache< T, M >:
Collaboration diagram for tbb::flow::interface10::internal::node_cache< T, M >:

Public Types

typedef size_t size_type
 

Public Member Functions

bool empty ()
 
void add (T &n)
 
void remove (T &n)
 
void clear ()
 

Protected Types

typedef M mutex_type
 

Protected Member Functions

bool internal_empty ()
 
size_type internal_size ()
 
void internal_push (T &n)
 
T & internal_pop ()
 

Protected Attributes

mutex_type my_mutex
 
std::queue< T * > my_q
 

Detailed Description

template<typename T, typename M = spin_mutex>
class tbb::flow::interface10::internal::node_cache< T, M >

A node_cache maintains a std::queue of elements of type T. Each operation is protected by a lock.

Definition at line 35 of file flow_graph.h.

Member Typedef Documentation

◆ mutex_type

template<typename T, typename M = spin_mutex>
typedef M tbb::flow::interface10::internal::node_cache< T, M >::mutex_type
protected

Definition at line 94 of file flow_graph.h.

◆ size_type

template<typename T, typename M = spin_mutex>
typedef size_t tbb::flow::interface10::internal::node_cache< T, M >::size_type

Definition at line 38 of file flow_graph.h.

Member Function Documentation

◆ add()

template<typename T, typename M = spin_mutex>
void tbb::flow::interface10::internal::node_cache< T, M >::add ( T &  n)
inline

Definition at line 45 of file flow_graph.h.

◆ clear()

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

Definition at line 59 of file flow_graph.h.

59  {
60  namespace flow {
61  using std::tuple;
62  using std::tuple_size;
63  using std::tuple_element;
64  using std::get;

◆ empty()

template<typename T, typename M = spin_mutex>
bool tbb::flow::interface10::internal::node_cache< T, M >::empty ( )
inline

Definition at line 40 of file flow_graph.h.

◆ internal_empty()

template<typename T, typename M = spin_mutex>
bool tbb::flow::interface10::internal::node_cache< T, M >::internal_empty ( )
inlineprotected

Definition at line 102 of file flow_graph.h.

105  {

◆ internal_pop()

template<typename T, typename M = spin_mutex>
T& tbb::flow::interface10::internal::node_cache< T, M >::internal_pop ( )
inlineprotected

Definition at line 117 of file flow_graph.h.

117  {
118 
119 public:
120  typedef std::list<C *, tbb::tbb_allocator<C *> > edge_list_type;
121 

◆ internal_push()

template<typename T, typename M = spin_mutex>
void tbb::flow::interface10::internal::node_cache< T, M >::internal_push ( T &  n)
inlineprotected

Definition at line 112 of file flow_graph.h.

117  {

◆ internal_size()

template<typename T, typename M = spin_mutex>
size_type tbb::flow::interface10::internal::node_cache< T, M >::internal_size ( )
inlineprotected

Definition at line 107 of file flow_graph.h.

117  {

◆ remove()

template<typename T, typename M = spin_mutex>
void tbb::flow::interface10::internal::node_cache< T, M >::remove ( T &  n)
inline

Definition at line 50 of file flow_graph.h.

59  {

Member Data Documentation

◆ my_mutex

template<typename T, typename M = spin_mutex>
mutex_type tbb::flow::interface10::internal::node_cache< T, M >::my_mutex
protected

Definition at line 95 of file flow_graph.h.

◆ my_q

template<typename T, typename M = spin_mutex>
std::queue< T * > tbb::flow::interface10::internal::node_cache< T, M >::my_q
protected

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