STAPL API Reference          
Overview   Containers   Algorithms   Views   Skeletons   Run-Time System
Modules     Classes    
List of all members | Public Member Functions | Protected Member Functions | Protected Types | Protected Attributes
stapl::detail::edge_version_entry< T, Notifier, Hook > Class Template Reference

Version notifier list used for FULL value edge consumption. More...

Public Member Functions

edge_version_storage< T > const & version_storage (void) const
 
edge_version_storage< T > & add_notifier (Notifier const &notifier, executor_base &executor, const bool b_persistent)
 Add a new notifier to the list, possibly invoking it immediately if this version of the edge value is already available. More...
 
template<typename Q >
void set_value (Q &&val, executor_base *executor_ptr, const bool b_migration_enabled, const bool b_persistent)
 Receive data flow of version's edge value and invoke any registered notifiers. More...
 
bool empty_notifications (void) const final
 Implementation of pure virtual method in abstract base edge_version_entry_base. More...
 
void cleanup_notifications (void) final
 Implementation of pure virtual method in abstract base edge_version_entry_base. More...
 
void clear_flow (void) final
 Implementation of pure virtual method in abstract base edge_version_entry_base. More...
 
edge_request_type request (void) const final
 Implementation of pure virtual method in abstract base edge_version_entry_base. More...
 
bool test_flow (void) const
 
bool test_flushing (void) const
 
bool is_direct_storage (void) const
 
immutable_shared< T > wrapper (void) const
 
T && steal (void)
 Allows stored value to be stolen by a local consumer task if a runtime check (edge_entry::stealable() conservatively detects the value is no longer needed.
 
T const & value (void) const
 

Protected Member Functions

template<typename NotifierInvoker >
void flush_notifications (NotifierInvoker const &invoker, const bool b_persistent)
 Invoke all notifier in the list, deleting them afterwords as part of incremental PARAGRAPH destruction, unless persistency is enabled. More...
 
template<typename NotifierInvoker >
void add_notifier_impl (NotifierInvoker const &invoker, Notifier const &notifier, const bool b_persistent)
 Add a new notifier to the list, possibly invoking it immediately if the associated data flow was previously triggered. More...
 
void set_flow (void)
 
void clear_flushing (void)
 
void set_flushing (void)
 
template<typename Q >
void set_value (Q &&val)
 
void set_value (immutable_shared< T > &&wrapper)
 
void set_value (immutable_shared< T > const &wrapper)
 

Protected Types

typedef notifier_entry< Notifier, boost::intrusive::slist_base_hook<> > notifier_entry_t
 
typedef boost::intrusive::slist< notifier_entry_t, boost::intrusive::constant_time_size< false >, boost::intrusive::cache_last< true > > notifier_list_t
 

Protected Attributes

notifier_list_t m_notifications
 

Detailed Description

template<typename T, typename Notifier, typename Hook>
class stapl::detail::edge_version_entry< T, Notifier, Hook >

Version notifier list used for FULL value edge consumption.

Template Parameters
TThe edge value type that is flowed to successors.
NotifierThe type of notifiers this list stores.
Hook
HookStorage for container metadata. Defined in Boost.Intrusive. Passed to base class. edge_version_entry_base.

Member Function Documentation

◆ add_notifier()

template<typename T , typename Notifier , typename Hook >
edge_version_storage<T>& stapl::detail::edge_version_entry< T, Notifier, Hook >::add_notifier ( Notifier const &  notifier,
executor_base executor,
const bool  b_persistent 
)

Add a new notifier to the list, possibly invoking it immediately if this version of the edge value is already available.

Parameters
notifierThe edge notifier that is tied to the data flow this notifier list is a part of.
executorThe executor of the PARAGRAPH this edge version is associated with.
b_persistentDenotes whether persistency is enabled in the associated PARAGRAPH.

Constructs an invoker function object which abstracts the signature of the notifier before calling generic implementation in notifier_list::add_notifier_impl.

◆ set_value()

template<typename T , typename Notifier , typename Hook >
template<typename Q >
void stapl::detail::edge_version_entry< T, Notifier, Hook >::set_value ( Q &&  val,
executor_base executor_ptr,
const bool  b_migration_enabled,
const bool  b_persistent 
)

Receive data flow of version's edge value and invoke any registered notifiers.

Parameters
valThe value from the producer task to this version.
executor_ptrThe executor of the PARAGRAPH this edge version is associated with.
b_migration_enabledDenotes whether task migration is enabled in the associated PARAGRAPH.
b_persistentDenotes whether persistency is enabled in the associated PARAGRAPH.

Stores the val in m_value and calls notifier_list::flush_notifications passing it notifier invoker to abstract the notifier's calling signature.

◆ empty_notifications()

template<typename T , typename Notifier , typename Hook >
bool stapl::detail::edge_version_entry< T, Notifier, Hook >::empty_notifications ( void  ) const
finalvirtual

Implementation of pure virtual method in abstract base edge_version_entry_base.

See also
edge_version_entry_base::empty_notifications

Implements stapl::detail::edge_version_entry_base< Hook >.

◆ cleanup_notifications()

template<typename T , typename Notifier , typename Hook >
void stapl::detail::edge_version_entry< T, Notifier, Hook >::cleanup_notifications ( void  )
finalvirtual

Implementation of pure virtual method in abstract base edge_version_entry_base.

See also
edge_version_entry_base::cleanup_notifications

Implements stapl::detail::edge_version_entry_base< Hook >.

◆ clear_flow()

template<typename T , typename Notifier , typename Hook >
void stapl::detail::edge_version_entry< T, Notifier, Hook >::clear_flow ( void  )
finalvirtual

Implementation of pure virtual method in abstract base edge_version_entry_base.

See also
edge_version_entry_base::cleanup_notifications

Implements stapl::detail::edge_version_entry_base< Hook >.

◆ request()

template<typename T , typename Notifier , typename Hook >
edge_request_type stapl::detail::edge_version_entry< T, Notifier, Hook >::request ( void  ) const
finalvirtual

Implementation of pure virtual method in abstract base edge_version_entry_base.

See also
edge_version_entry_base::request

Implements stapl::detail::edge_version_entry_base< Hook >.

◆ flush_notifications()

template<typename Notifier>
template<typename NotifierInvoker >
void stapl::detail::notifier_list< Notifier >::flush_notifications ( NotifierInvoker const &  invoker,
const bool  b_persistent 
)
protectedinherited

Invoke all notifier in the list, deleting them afterwords as part of incremental PARAGRAPH destruction, unless persistency is enabled.

Parameters
invokerHigher order function object which is responsible for calling the notifier with whatever arguments are necessary.
b_persistentDenotes whether persistency is enabled in the associated PARAGRAPH. Guards the deletion of a notifier after it is invoked.

This protected method is used by derived classes to implement their set_value methods (which are called by the edge_entry when the corresponding data flow is locally triggered.

◆ add_notifier_impl()

template<typename Notifier>
template<typename NotifierInvoker >
void stapl::detail::notifier_list< Notifier >::add_notifier_impl ( NotifierInvoker const &  invoker,
Notifier const &  notifier,
const bool  b_persistent 
)
protectedinherited

Add a new notifier to the list, possibly invoking it immediately if the associated data flow was previously triggered.

Parameters
invokerHigher order function object which is responsible for calling the notifier with whatever arguments are necessary.
notifierThe edge notifier that tied to the data flow this notifier list is a part of.
b_persistentDenotes whether persistency is enabled in the associated PARAGRAPH.

This protected method is used by derived classes to implement their add_notifier methods. The derived classes construct the appropriate invoker.

Note that even if flow is previously set, an entry may be created to either (a) allow subsequent persistent PARAGRAPH invocations or (b) maintain notifier ordering if a notifier flush is in progress.


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