Home ⌂Doc Index ◂Up ▴
Intel(R) Threading Building Blocks Doxygen Documentation  version 4.2.3
internal::successor_cache< T, M > Class Template Referenceabstract

An abstract cache of successors. More...

#include <_flow_graph_cache_impl.h>

Inheritance diagram for internal::successor_cache< T, M >:
Collaboration diagram for internal::successor_cache< T, M >:

Public Member Functions

 successor_cache ()
 
void set_owner (owner_type *owner)
 
virtual ~successor_cache ()
 
void register_successor (successor_type &r)
 
void remove_successor (successor_type &r)
 
bool empty ()
 
void clear ()
 
virtual tasktry_put_task (const T &t)=0
 

Protected Types

typedef M mutex_type
 
typedef receiver< T > successor_type
 
typedef receiver< T > * pointer_type
 
typedef sender< T > owner_type
 
typedef std::list< pointer_typesuccessors_type
 

Protected Attributes

mutex_type my_mutex
 
successors_type my_successors
 
owner_typemy_owner
 

Additional Inherited Members

- Private Member Functions inherited from tbb::internal::no_copy
 no_copy (const no_copy &)=delete
 
 no_copy ()=default
 

Detailed Description

template<typename T, typename M = spin_rw_mutex>
class internal::successor_cache< T, M >

An abstract cache of successors.

Definition at line 273 of file _flow_graph_cache_impl.h.

Member Typedef Documentation

◆ mutex_type

template<typename T, typename M = spin_rw_mutex>
typedef M internal::successor_cache< T, M >::mutex_type
protected

Definition at line 276 of file _flow_graph_cache_impl.h.

◆ owner_type

template<typename T, typename M = spin_rw_mutex>
typedef sender<T> internal::successor_cache< T, M >::owner_type
protected

Definition at line 286 of file _flow_graph_cache_impl.h.

◆ pointer_type

template<typename T, typename M = spin_rw_mutex>
typedef receiver<T>* internal::successor_cache< T, M >::pointer_type
protected

Definition at line 285 of file _flow_graph_cache_impl.h.

◆ successor_type

template<typename T, typename M = spin_rw_mutex>
typedef receiver<T> internal::successor_cache< T, M >::successor_type
protected

Definition at line 284 of file _flow_graph_cache_impl.h.

◆ successors_type

template<typename T, typename M = spin_rw_mutex>
typedef std::list< pointer_type > internal::successor_cache< T, M >::successors_type
protected

Definition at line 288 of file _flow_graph_cache_impl.h.

Constructor & Destructor Documentation

◆ successor_cache()

template<typename T, typename M = spin_rw_mutex>
internal::successor_cache< T, M >::successor_cache ( )
inline

Definition at line 324 of file _flow_graph_cache_impl.h.

324 : my_owner(NULL) {}

◆ ~successor_cache()

template<typename T, typename M = spin_rw_mutex>
virtual internal::successor_cache< T, M >::~successor_cache ( )
inlinevirtual

Definition at line 328 of file _flow_graph_cache_impl.h.

328 {}

Member Function Documentation

◆ clear()

template<typename T, typename M = spin_rw_mutex>
void internal::successor_cache< T, M >::clear ( )
inline

Definition at line 351 of file _flow_graph_cache_impl.h.

351  {
352  my_successors.clear();
353 #if TBB_DEPRECATED_FLOW_NODE_EXTRACTION
354  my_built_successors.clear();
355 #endif
356  }

Referenced by internal::indexer_node_base< InputTuple, OutputType, StructTypes >::reset_node().

Here is the caller graph for this function:

◆ empty()

template<typename T, typename M = spin_rw_mutex>
bool internal::successor_cache< T, M >::empty ( )
inline

Definition at line 346 of file _flow_graph_cache_impl.h.

346  {
347  typename mutex_type::scoped_lock l(my_mutex, false);
348  return my_successors.empty();
349  }

Referenced by tbb::flow::interface11::continue_node< Output, Policy >::reset_node().

Here is the caller graph for this function:

◆ register_successor()

template<typename T, typename M = spin_rw_mutex>
void internal::successor_cache< T, M >::register_successor ( successor_type r)
inline

Definition at line 330 of file _flow_graph_cache_impl.h.

330  {
331  typename mutex_type::scoped_lock l(my_mutex, true);
332  my_successors.push_back( &r );
333  }

Referenced by internal::indexer_node_base< InputTuple, OutputType, StructTypes >::handle_operations(), and internal::function_output< Output >::register_successor().

Here is the caller graph for this function:

◆ remove_successor()

template<typename T, typename M = spin_rw_mutex>
void internal::successor_cache< T, M >::remove_successor ( successor_type r)
inline

Definition at line 335 of file _flow_graph_cache_impl.h.

335  {
336  typename mutex_type::scoped_lock l(my_mutex, true);
337  for ( typename successors_type::iterator i = my_successors.begin();
338  i != my_successors.end(); ++i ) {
339  if ( *i == & r ) {
340  my_successors.erase(i);
341  break;
342  }
343  }
344  }

Referenced by internal::indexer_node_base< InputTuple, OutputType, StructTypes >::handle_operations(), and internal::function_output< Output >::remove_successor().

Here is the caller graph for this function:

◆ set_owner()

template<typename T, typename M = spin_rw_mutex>
void internal::successor_cache< T, M >::set_owner ( owner_type owner)
inline

Definition at line 326 of file _flow_graph_cache_impl.h.

326 { my_owner = owner; }

Referenced by internal::function_output< Output >::function_output(), internal::indexer_node_base< InputTuple, OutputType, StructTypes >::indexer_node_base(), and internal::multifunction_output< Output >::multifunction_output().

Here is the caller graph for this function:

◆ try_put_task()

template<typename T, typename M = spin_rw_mutex>
virtual task* internal::successor_cache< T, M >::try_put_task ( const T &  t)
pure virtual

Member Data Documentation

◆ my_mutex

template<typename T, typename M = spin_rw_mutex>
mutex_type internal::successor_cache< T, M >::my_mutex
protected

◆ my_owner

template<typename T, typename M = spin_rw_mutex>
owner_type* internal::successor_cache< T, M >::my_owner
protected

Definition at line 294 of file _flow_graph_cache_impl.h.

◆ my_successors

template<typename T, typename M = spin_rw_mutex>
successors_type internal::successor_cache< T, M >::my_successors
protected

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.