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 task * | try_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_type > | successors_type

## Protected Attributes

mutex_type | my_mutex
successors_type | my_successors
owner_type * | my_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.

: my_owner(NULL) {}

## ~successor_cache()

template<typename T, typename M = spin_rw_mutex>

virtual internal::successor_cache< T, M >::~successor_cache | ( |  | ) |

inline virtual

Definition at line 328 of file _flow_graph_cache_impl.h.

{}

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

{
my_successors.clear();
#if TBB_DEPRECATED_FLOW_NODE_EXTRACTION
my_built_successors.clear();
#endif
}

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.

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

Referenced by tbb::flow::interface11::function_node< Input, Output, Policy, Allocator >::reset_node(), and 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.

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

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.

{
typename mutex_type::scoped_lock l(my_mutex, true);
for ( typename successors_type::iterator i = my_successors.begin();
i != my_successors.end(); ++i ) {
if ( *i == & r ) {
my_successors.erase(i);
break;
}
}
}

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.

{ 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

Implemented in internal::round_robin_cache< T, M >, internal::broadcast_cache< T, M >, internal::broadcast_cache< output_type, null_rw_mutex >, and internal::broadcast_cache< output_type >.

## Member Data Documentation

## my_mutex

template<typename T, typename M = spin_rw_mutex>

mutex_type internal::successor_cache< T, M >::my_mutex

protected

Definition at line 277 of file _flow_graph_cache_impl.h.

Referenced by tbb::flow::interface11::overwrite_node< T >::try_put_task().

## 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

Definition at line 292 of file _flow_graph_cache_impl.h.

Referenced by tbb::flow::interface11::overwrite_node< T >::try_put_task_impl().

The documentation for this class was generated from the following file:

- _flow_graph_cache_impl.h

internal::successor_cache::my_mutex
mutex_type my_mutex
Definition: _flow_graph_cache_impl.h:277
internal::successor_cache::my_owner
owner_type * my_owner
Definition: _flow_graph_cache_impl.h:294
internal::successor_cache::my_successors
successors_type my_successors
Definition: _flow_graph_cache_impl.h:292

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.