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::notifier_list< Notifier > Struct Template Reference

Provides storage for notifiers associated with a edge version of a task. Defines operations to add a new notifier and flush (i.e., invoke) notifiers when the corresponding data flow is triggered. More...

Public Member Functions

 notifier_list (notifier_list &&other)
 
bool empty_notifications (void) const
 Return true if there are no notifiers in list. False otherwise.
 
void cleanup_notifications (void)
 Called by edge_entry destructor to explicit delete notifiers when they have been kept for PARAGRAPH persistency support. For incrementally destroyed PARAGRAPHs, this is a noop. More...
 
void clear_flow (void)
 
bool test_flow (void) const
 
bool test_flushing (void) const
 

Protected Member Functions

notifier_listoperator= (notifier_list const &)
 
 notifier_list (notifier_list const &)
 
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)
 

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 Notifier>
struct stapl::detail::notifier_list< Notifier >

Provides storage for notifiers associated with a edge version of a task. Defines operations to add a new notifier and flush (i.e., invoke) notifiers when the corresponding data flow is triggered.

Template Parameters
NotifierThe notifier type stored by the list. No specific function operator signature is assumed; this detail is abstracted by the NotifierInvoker template parameter of methods that may need invoke notifier objects.
See also
edge_version_entry
remote_edge_version_entry

Member Function Documentation

◆ flush_notifications()

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

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 
)
protected

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.

◆ cleanup_notifications()

template<typename Notifier>
void stapl::detail::notifier_list< Notifier >::cleanup_notifications ( void  )

Called by edge_entry destructor to explicit delete notifiers when they have been kept for PARAGRAPH persistency support. For incrementally destroyed PARAGRAPHs, this is a noop.

See also
edge_entry::~edge_entry

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