internal::successor_cache< continue_msg, M > Class Template Referenceabstract

An abstract cache of successors, specialized to continue_msg. More...

`#include <_flow_graph_cache_impl.h>`

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

## Public Member Functions

| successor_cache ()
void | set_owner (sender< continue_msg > *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 continue_msg &t)=0

## Protected Types

typedef M | mutex_type
typedef receiver< continue_msg > | successor_type
typedef receiver< continue_msg > * | pointer_type
typedef std::list< pointer_type > | successors_type

## Protected Attributes

mutex_type | my_mutex
successors_type | my_successors
sender< continue_msg > * | 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 M>
class internal::successor_cache< continue_msg, M >

An abstract cache of successors, specialized to continue_msg.

Definition at line 365 of file _flow_graph_cache_impl.h.

## Member Typedef Documentation

## mutex_type

template<typename M >

typedef M internal::successor_cache< continue_msg, M >::mutex_type

protected

Definition at line 368 of file _flow_graph_cache_impl.h.

## pointer_type

template<typename M >

typedef receiver<continue_msg>* internal::successor_cache< continue_msg, M >::pointer_type

protected

Definition at line 376 of file _flow_graph_cache_impl.h.

## successor_type

template<typename M >

typedef receiver<continue_msg> internal::successor_cache< continue_msg, M >::successor_type

protected

Definition at line 375 of file _flow_graph_cache_impl.h.

## successors_type

template<typename M >

typedef std::list< pointer_type > internal::successor_cache< continue_msg, M >::successors_type

protected

Definition at line 378 of file _flow_graph_cache_impl.h.

## Constructor & Destructor Documentation

## successor_cache()

template<typename M >

internal::successor_cache< continue_msg, M >::successor_cache | ( |  | ) |

inline

Definition at line 415 of file _flow_graph_cache_impl.h.

: my_owner(NULL) {}
internal::successor_cache< continue_msg, M >::my_owner
sender< continue_msg > * my_owner
Definition: _flow_graph_cache_impl.h:385

## ~successor_cache()

template<typename M >

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

inline virtual

Definition at line 419 of file _flow_graph_cache_impl.h.

{}

## Member Function Documentation

## clear()

template<typename M >

void internal::successor_cache< continue_msg, M >::clear | ( |  | ) |

inline

Definition at line 449 of file _flow_graph_cache_impl.h.

{
my_successors.clear();
#if TBB_DEPRECATED_FLOW_NODE_EXTRACTION
my_built_successors.clear();
#endif
}
internal::successor_cache< continue_msg, M >::my_successors
successors_type my_successors
Definition: _flow_graph_cache_impl.h:379

## empty()

template<typename M >

bool internal::successor_cache< continue_msg, M >::empty | ( |  | ) |

inline

Definition at line 444 of file _flow_graph_cache_impl.h.

{
typename mutex_type::scoped_lock l(my_mutex, false);
return my_successors.empty();
}
internal::successor_cache< continue_msg, M >::my_mutex
mutex_type my_mutex
Definition: _flow_graph_cache_impl.h:369

References internal::node_cache< sender< T >, spin_mutex >::my_mutex.

## register_successor()

template<typename M >

void internal::successor_cache< continue_msg, M >::register_successor | ( | successor_type & | r | ) |

inline

Definition at line 421 of file _flow_graph_cache_impl.h.

{
typename mutex_type::scoped_lock l(my_mutex, true);
my_successors.push_back( &r );
if ( my_owner && r.is_continue_receiver() ) {
r.register_predecessor( *my_owner );
}
}

References internal::node_cache< sender< T >, spin_mutex >::my_mutex, and internal::predecessor_cache< T, M >::my_owner.

## remove_successor()

template<typename M >

void internal::successor_cache< continue_msg, M >::remove_successor | ( | successor_type & | r | ) |

inline

Definition at line 429 of file _flow_graph_cache_impl.h.

{
typename mutex_type::scoped_lock l(my_mutex, true);
for ( successors_type::iterator i = my_successors.begin();
i != my_successors.end(); ++i ) {
if ( *i == & r ) {
// TODO: Check if we need to test for continue_receiver before
// removing from r.
if ( my_owner )
r.remove_predecessor( *my_owner );
my_successors.erase(i);
break;
}
}
}

References internal::node_cache< sender< T >, spin_mutex >::my_mutex, and internal::predecessor_cache< T, M >::my_owner.

## set_owner()

template<typename M >

void internal::successor_cache< continue_msg, M >::set_owner | ( | sender< continue_msg > * | owner | ) |

inline

Definition at line 417 of file _flow_graph_cache_impl.h.

{ my_owner = owner; }

References internal::predecessor_cache< T, M >::my_owner.

## try_put_task()

template<typename M >

virtual task* internal::successor_cache< continue_msg, M >::try_put_task | ( | const continue_msg & | t | ) |

pure virtual

## Member Data Documentation

## my_mutex

template<typename M >

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

protected

Definition at line 369 of file _flow_graph_cache_impl.h.

## my_owner

template<typename M >

sender<continue_msg>* internal::successor_cache< continue_msg, M >::my_owner

protected

Definition at line 385 of file _flow_graph_cache_impl.h.

## my_successors

template<typename M >

successors_type internal::successor_cache< continue_msg, M >::my_successors

protected

Definition at line 379 of file _flow_graph_cache_impl.h.

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

- _flow_graph_cache_impl.h

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.