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

Represents a list of versions, each of which represents a filtered edge consumption with a different filter. More...

Public Member Functions

template<typename Filter , typename ValueParam >
void set_value (ValueParam &&val, unsigned int index, executor_base *executor_ptr, bool b_migration_enabled, bool b_persistent, bool b_expect_exist)
 Receive an already filtered value and trigger data flow on the associated filtered version. More...
 
template<typename Filter , typename FullValueAccess >
tuple< bool, unsigned int, bool, edge_version_storage< typename boost::result_of< Filter(FullEdge)>::type > & > add_notifier (boost::function< void(executor_base &, typename boost::result_of< Filter(FullEdge)>::type const &) > 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 for version defined by filter, creating a new version and inserting it the versions list if no local consumers using the filter were previously created. Notifier may be immediately invoked if the version of edge value is already available. More...
 
void set_value_full (FullEdge const &val, executor_base *executor_ptr, bool b_migration_enabled, bool b_persistent)
 Receive full data flow of producer task and pass it to all filtered versions to trigger data flow. 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...
 
edge_request_type request (void) const 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...
 
bool test_flow (unsigned int version_id) const
 Returns true if data flow has previously been triggered for filtered version associated with version_id;.
 

Detailed Description

template<typename FullEdge, typename Hook>
class stapl::detail::filtered_edge_versions< FullEdge, Hook >

Represents a list of versions, each of which represents a filtered edge consumption with a different filter.

Member Function Documentation

◆ set_value()

template<typename FullEdge , typename Hook >
template<typename Filter , typename ValueParam >
void stapl::detail::filtered_edge_versions< FullEdge, Hook >::set_value ( ValueParam &&  val,
unsigned int  index,
executor_base executor_ptr,
bool  b_migration_enabled,
bool  b_persistent,
bool  b_expect_exist 
)

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

Parameters
valThe filtered edge value.
indexThe position of the filtered version in the version list m_versions.
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.
b_expect_existDenotes whether edge_entry expects a version to exist when data flow is trigger. This is true or filtered versions. The parameter is unused but included to match set_value signature included to match set_value signature

index was previously returned to the edge_entry from add_notifier and used create a remote notifier that was sent to the producer task's execution location. The invocation of that remote notifier triggered the callback to this method through the local edge_entry.

◆ add_notifier()

template<typename FullEdge , typename Hook >
template<typename Filter , typename FullValueAccess >
tuple<bool, unsigned int, bool, edge_version_storage< typename boost::result_of<Filter(FullEdge)>::type>&> stapl::detail::filtered_edge_versions< FullEdge, Hook >::add_notifier ( boost::function< void(executor_base &, typename boost::result_of< Filter(FullEdge)>::type const &) > 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 for version defined by filter, creating a new version and inserting it the versions list if no local consumers using the filter were previously created. Notifier may be immediately invoked if the version of 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 compute 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.
Returns
A four element tuple used by caller (edge_entry::add_local_notifier) to determine if and how a inter-location remote identifier needs to be created Specifically: 1: Whether flow for the version has previously been set. 2: The index (starting at 1) of the version in the versions list. 3: Whether a previous consumer had registered a notifier for this version (i.e., is consumption "covered"). 4: A reference to the version storage (used to initialize wf reference to this value).
See also
filtered_edge_version_entry::add_notifier

◆ set_value_full()

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

Receive full data flow of producer task and pass it to all filtered versions to trigger data flow.

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.
See also
filtered_edge_version_entry::set_value_full

◆ empty_notifications()

template<typename FullEdge , typename Hook >
bool stapl::detail::filtered_edge_versions< FullEdge, Hook >::empty_notifications ( void  ) const
finalvirtual

Implementation of pure virtual method in abstract base edge_version_entry_base.

Returns
True if all filtered versions have empty notification lists.
See also
edge_version_entry_base::empty_notifications

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

◆ cleanup_notifications()

template<typename FullEdge , typename Hook >
void stapl::detail::filtered_edge_versions< FullEdge, Hook >::cleanup_notifications ( void  )
finalvirtual

Implementation of pure virtual method in abstract base edge_version_entry_base.

Clear notifications of all filtered versions in m_versions.

See also
edge_version_entry_base::cleanup_notifications

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

◆ request()

template<typename FullEdge , typename Hook >
edge_request_type stapl::detail::filtered_edge_versions< FullEdge, 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 >.

◆ clear_flow()

template<typename FullEdge , typename Hook >
void stapl::detail::filtered_edge_versions< FullEdge, Hook >::clear_flow ( void  )
finalvirtual

Implementation of pure virtual method in abstract base edge_version_entry_base.

Clear flow bit of all filtered versions in m_versions.

See also
edge_version_entry_base::clear_flow

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


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