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

Derived class of filtered version which stored Filter and implemented methods requiring this type. More...

Public Member Functions

 filtered_edge_version_entry (Filter const &filter)
 
bool empty_notifications (void) const
 
void cleanup_notifications (void)
 
bool test_flow (void) const
 
void clear_flow (void)
 
template<typename ValueParam >
void set_value (ValueParam &&val, executor_base *executor_ptr, bool b_migration_enabled, bool b_persistent)
 Receive an already filtered value and trigger data flow on the associated filtered version. More...
 
void set_value_full (FullEdge const &val, executor_base *executor_ptr, bool b_migration_enabled, bool b_persistent) final
 Receive full data flow of producer task, apply the version's filter before storing value and invoking any registered notifiers. More...
 
template<typename FullValueAccess >
edge_version_storage< filtered_edge_t > & add_notifier (notifier_t const &notifier, Filter const &filter, executor_base &executor, FullValueAccess const &full_value, bool b_full_flow, bool b_migration_enabled, 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...
 
bool test_flushing (void) const
 
bool is_direct_storage (void) const
 
immutable_shared< boost::result_of< Filter(FullEdge)>::type > wrapper (void) const
 
boost::result_of< Filter(FullEdge)>::type && 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.
 
boost::result_of< Filter(FullEdge)>::type const & value (void) const
 

Public Attributes

boost::result_of< Filter(FullEdge)>::type m_value
 
immutable_shared< boost::result_of< Filter(FullEdge)>::type > m_wrapper
 

Protected Member Functions

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...
 
void add_notifier_impl (NotifierInvoker const &invoker, boost::function< void(executor_base &, boost::result_of< Filter(FullEdge)>::type const &)> 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)
 
void set_value (Q &&val)
 
void set_value (immutable_shared< boost::result_of< Filter(FullEdge)>::type > &&wrapper)
 
void set_value (immutable_shared< boost::result_of< Filter(FullEdge)>::type > const &wrapper)
 

Protected Types

typedef notifier_entry< boost::function< void(executor_base &, boost::result_of< Filter(FullEdge)>::type const &)>, 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 FullEdge, typename Filter, typename Hook>
class stapl::detail::filtered_edge_version_entry< FullEdge, Filter, Hook >

Derived class of filtered version which stored Filter and implemented methods requiring this type.

Template Parameters
FullEdgeType of value created by the producer task.
FilterThe filter applied prior to forwarding value to consumer.
HookThe container metadata for Boost.Intrusive.

Member Function Documentation

◆ set_value()

template<typename FullEdge , typename Filter , typename Hook >
template<typename ValueParam >
void stapl::detail::filtered_edge_version_entry< FullEdge, Filter, Hook >::set_value ( ValueParam &&  val,
executor_base executor_ptr,
bool  b_migration_enabled,
bool  b_persistent 
)

Receive an already filtered value and trigger data flow on the associated filtered version.

Parameters
valThe filtered edge value.
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.

◆ set_value_full()

template<typename FullEdge , typename Filter , typename Hook >
void stapl::detail::filtered_edge_version_entry< FullEdge, Filter, Hook >::set_value_full ( FullEdge const &  val,
executor_base executor_ptr,
bool  b_migration_enabled,
bool  b_persistent 
)
finalvirtual

Receive full data flow of producer task, apply the version's filter before storing value and invoking any registered notifiers.

Parameters
valThe full edge 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.

In the presence of full consumers on the location where this filtered version list exists (i.e., "covering" this version), it is possible that the protocol will avoid applying the filter on the producer location (since it has to transport the full value anyways). In this case, the edge_entry will invoke this method with the full value available to it.

See also
edge_version_entry::set_value

Implements stapl::detail::filtered_edge_version_entry_base< FullEdge, Hook >.

◆ add_notifier()

template<typename FullEdge , typename Filter , typename Hook >
template<typename FullValueAccess >
edge_version_storage<filtered_edge_t>& stapl::detail::filtered_edge_version_entry< FullEdge, Filter, Hook >::add_notifier ( notifier_t const &  notifier,
Filter const &  filter,
executor_base executor,
FullValueAccess const &  full_value,
bool  b_full_flow,
bool  b_migration_enabled,
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.
filterThe filter to be applied to a full edge flow.
executorThe executor of the PARAGRAPH this edge version is associated with.
full_valueReference to full edge value storage in the edge_entry (may not be initialized).
b_full_flowDenotes whether full_value is initialized and can be used to computer filtered value for this version.
b_migration_enabledDenotes whether task migration is enabled in the associated PARAGRAPH.
b_persistentDenotes whether persistency is enabled in the associated PARAGRAPH.

Notifiers for filtered versions can be serviced by the full edge value if it's already available on this location (in addition to a previously flowed copy of the same filtered value). When adding a new notifier, check if the full value is available and initialize m_value if it is and this versions flow has not been previously set. Then, the base class implementation of add_notifier is called.

See also
edge_version_entry::add_notifier

◆ flush_notifications()

void stapl::detail::notifier_list< boost::function< void(executor_base &, boost::result_of< Filter(FullEdge)>::type const &)> >::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()

void stapl::detail::notifier_list< boost::function< void(executor_base &, boost::result_of< Filter(FullEdge)>::type const &)> >::add_notifier_impl ( NotifierInvoker const &  invoker,
boost::function< void(executor_base &, boost::result_of< Filter(FullEdge)>::type const &)> 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: