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 Attributes
stapl::detail::basic_edge_entry< T > Class Template Reference

Minimal entry class used when edge initialized without an edge_container. More...

Public Member Functions

 basic_edge_entry (std::size_t tid)
 
bool is_basic_edge_entry (void) const override
 
bool stealable (void) const
 Called in Task::operator() (via lazy_edge_reference) by a consumer identity operation to avoid needless copy if it can have a version stored in edge_version_storage.
 
bool out_edge_stealable (void)
 Called when attempting to use object managed by edge entry as outgoing edge of paragraph. m_local_user_cnt should be zero as result notifications do not increment this variable.
 
bool is_signal_only (void) const
 
bool is_persistent (void) const
 
std::size_t tid (void) const
 
bool evictable (void) const
 Check whether this entry is no longer needed on the location and can be removed. More...
 
void set_as_producer (size_t consumer_cnt)
 Inform this edge entry that the producer task has been initialized on this location. More...
 
void delayed_set_num_consumers (size_t consumer_cnt)
 Set the number of successors after delay_spec was passed to set_as_producer. More...
 
void decrement_unknown_consumers (void)
 Reduce the unregistered consumer count. More...
 
void increment_local_consumers (void)
 Increase reference count of local proxies in use by consumer tasks and backed by a version in this edge entry. More...
 
void decrement_local_consumers (void)
 Decrease reference count of local proxies in use by consumer tasks and backed by a version in this edge entry. More...
 
bool local_producer_initialized () const
 Check if the producer task for edge_entry is registered on this location. More...
 
bool has_single_consumer (void) const noexcept
 
bool signal_set () const
 Redirect check signal flow request to the signal version notifier list.
 
virtual bool full_value_set (void) const
 Check if full value of producer has been set on this location. More...
 
virtual void reset_values (void)
 Reset data flow triggers prior to a persistent PARAGRAPH reinvocation. More...
 
void set_signal (executor_base *executor_ptr, const bool b_migration_enabled)
 Set data flow for signal consumers by notifying the signal version notifier list. More...
 
virtual void set_value (edge_container &)
 The set value signature used by the producer task via task_graph::processed when the return type is void. More...
 
virtual void add_remote_signal_notifier (edge_container &, size_t)
 Add notifier to remote location for signaling. More...
 
virtual void cleanup_notifications (void)
 Cleanup all notification associated with this edge_entry. More...
 
df_add_status compute_request_status (const edge_request_type req, const bool b_flow, const bool b_partial_added=false)
 Called when adding a local notification to determine whether a a consumption request is covered by previous requests or whether a new remote notifier needs to be generated and sent to the producer location. More...
 
df_add_status add_signal_notifier (executor_base &executor, signal_notifier_t notifier)
 Add a signal notifier for a local task. Return the request level status information by calling compute_request_status. More...
 
bool is_direct_storage (void) const
 
immutable_shared< df_stored_type< T >::type > wrapper (void) const
 
df_stored_type< T >::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.
 
void clear_flow (void)
 Reset state for reinvocation in a persistent paragraph.
 
df_stored_type< T >::type const & value (void) const
 

Public Attributes

df_stored_type< T >::type m_value
 
immutable_shared< df_stored_type< T >::type > m_wrapper
 

Protected Member Functions

bool empty_signal_notifications (void) const
 Return true if the the edge_entry contains any signal notifications.
 
void set_value (Q &&val)
 
void set_value (immutable_shared< df_stored_type< T >::type > &&wrapper)
 
void set_value (immutable_shared< df_stored_type< T >::type > const &wrapper)
 

Protected Attributes

const std::size_t m_tid
 Task identifier of the produce task this entry refers to.
 
edge_request_type m_request_state
 The current level of consumption on location where this entry exists.
 
size_t m_unknown_consumer_cnt
 Count of consumers which are still unaccounted for. Only initialized on producer location, where the edge_entry will be kept in edge_container at least until all consumers have registered, decrementing this field to 0. Value of defer_spec, denotes location is set as producer location, but successor count will be set separately. More...
 
bool m_single_consumer
 true if there is only one consumer.
 
size_t m_seen_consumers
 Tracks the number of consumers that have registered at producer location when m_unknown_consumer_cnt is set to defer_spec.
 
size_t m_local_user_cnt
 track of consumer reference to version contained in this entry. Used to help manage the lifetime of the object.
 
const bool m_b_persistent
 Tracks whether corresponding PARAGRAPH is persistent.
 
const bool m_b_signal_only
 Is the actual object instantiated edge_entry_base or edge_entry<T>. Used to detect if we need to upgrade the entry based to edge_entry object. More...
 
bool m_b_consumers_before_producer
 Tracks whether consumer tasks at this location registered before the producer was registered. If so, their remote notifiers may arrive out of order. In debug mode, we need to track this for assertion. More...
 

Detailed Description

template<typename T>
class stapl::detail::basic_edge_entry< T >

Minimal entry class used when edge initialized without an edge_container.

Member Function Documentation

◆ evictable()

bool stapl::detail::edge_entry_base::evictable ( void  ) const
inherited

Check whether this entry is no longer needed on the location and can be removed.

For edge_entry_base, this is a simple redirect to the polymorphic eviction implementation, as we may need to dispatch to an instance edge_entry template, without knowing it's edge data type T.

◆ set_as_producer()

void stapl::detail::edge_entry_base::set_as_producer ( size_t  consumer_cnt)
inherited

Inform this edge entry that the producer task has been initialized on this location.

Parameters
consumer_cntThe number of consumers as specified by the corresponding add_task call. Possible value is defer_spec, denoting that this count will be specified later.
See also
delayed_set_num_consumers

◆ delayed_set_num_consumers()

void stapl::detail::edge_entry_base::delayed_set_num_consumers ( size_t  consumer_cnt)
inherited

Set the number of successors after delay_spec was passed to set_as_producer.

Parameters
consumer_cntThe out-degree of the producer task in the PARAGRAPH.

◆ decrement_unknown_consumers()

void stapl::detail::edge_entry_base::decrement_unknown_consumers ( void  )
inherited

Reduce the unregistered consumer count.

Called when previous consumption on a consumer location covers a request, meaning no additional notifications are required. A simple decrement of out-degree counter is sufficient.

◆ increment_local_consumers()

void stapl::detail::edge_entry_base::increment_local_consumers ( void  )
inherited

Increase reference count of local proxies in use by consumer tasks and backed by a version in this edge entry.

See also
edge_accessor

◆ decrement_local_consumers()

void stapl::detail::edge_entry_base::decrement_local_consumers ( void  )
inherited

Decrease reference count of local proxies in use by consumer tasks and backed by a version in this edge entry.

See also
edge_accessor

◆ local_producer_initialized()

bool stapl::detail::edge_entry_base::local_producer_initialized ( ) const
inherited

Check if the producer task for edge_entry is registered on this location.

Sufficient to check if m_unknown_consumer_cnt has been initialized.

◆ full_value_set()

virtual bool stapl::detail::edge_entry_base::full_value_set ( void  ) const
virtualinherited

Check if full value of producer has been set on this location.

For edge_entry_base objects, is always false, as the producer isn't initialized and only signal consumers can have registered.

Reimplemented in stapl::detail::edge_entry< T >.

◆ reset_values()

virtual void stapl::detail::edge_entry_base::reset_values ( void  )
virtualinherited

Reset data flow triggers prior to a persistent PARAGRAPH reinvocation.

For edge_entry_base objects, the only version that can exist to reset is the signal notifier list.

Reimplemented in stapl::detail::edge_entry< T >.

◆ set_signal()

void stapl::detail::edge_entry_base::set_signal ( executor_base executor_ptr,
const bool  b_migration_enabled 
)
inherited

Set data flow for signal consumers by notifying the signal version notifier list.

Parameters
executor_ptrThe executor associated with the given PARAGRAPH.
b_migration_enabledDenotes whether the PARAGRAPH has task migration support enabled.

◆ set_value()

virtual void stapl::detail::edge_entry_base::set_value ( edge_container )
virtualinherited

The set value signature used by the producer task via task_graph::processed when the return type is void.

This call should only occur on the producer location, where edge_entry overrides this definition.

See also
edge_entry::set_value

Reimplemented in stapl::detail::edge_entry< T >.

◆ add_remote_signal_notifier()

virtual void stapl::detail::edge_entry_base::add_remote_signal_notifier ( edge_container ,
size_t   
)
virtualinherited

Add notifier to remote location for signaling.

This call should only occur on the producer location, where edge_entry overrides this definition.

See also
edge_entry::add_remote_signal_notifier

Reimplemented in stapl::detail::edge_entry< T >.

◆ cleanup_notifications()

virtual void stapl::detail::edge_entry_base::cleanup_notifications ( void  )
virtualinherited

Cleanup all notification associated with this edge_entry.

For edge_entry_base instantiations, the only notifications for signals.

Reimplemented in stapl::detail::edge_entry< T >.

◆ compute_request_status()

df_add_status stapl::detail::edge_entry_base::compute_request_status ( const edge_request_type  req,
const bool  b_flow,
const bool  b_partial_added = false 
)
inherited

Called when adding a local notification to determine whether a a consumption request is covered by previous requests or whether a new remote notifier needs to be generated and sent to the producer location.

Parameters
reqThe type of request that has just been added.
b_flowWhether data flow has already been triggered on this consumer location for req.
b_partial_addedIf req is partial, denotes if this request added a new version (i.e., filter) on this location for the producer task value.
See also
add_signal_notifier
edge_entry::add_local_notifier

◆ add_signal_notifier()

df_add_status stapl::detail::edge_entry_base::add_signal_notifier ( executor_base executor,
signal_notifier_t  notifier 
)
inherited

Add a signal notifier for a local task. Return the request level status information by calling compute_request_status.

Parameters
executorThe executor associated with the PARAGRAPH. Passed to notifier if it is immediately called (i.e., the signal flow has already been set.
notifierThe signal notifier for the successor task.
See also
edge_container::setup_signal_flow

Member Data Documentation

◆ m_unknown_consumer_cnt

size_t stapl::detail::edge_entry_base::m_unknown_consumer_cnt
protectedinherited

Count of consumers which are still unaccounted for. Only initialized on producer location, where the edge_entry will be kept in edge_container at least until all consumers have registered, decrementing this field to 0. Value of defer_spec, denotes location is set as producer location, but successor count will be set separately.

See also
delayed_set_num_consumers

◆ m_b_signal_only

const bool stapl::detail::edge_entry_base::m_b_signal_only
protectedinherited

Is the actual object instantiated edge_entry_base or edge_entry<T>. Used to detect if we need to upgrade the entry based to edge_entry object.

See also
edge_container::lookup_or_insert

◆ m_b_consumers_before_producer

bool stapl::detail::edge_entry_base::m_b_consumers_before_producer
protectedinherited

Tracks whether consumer tasks at this location registered before the producer was registered. If so, their remote notifiers may arrive out of order. In debug mode, we need to track this for assertion.

See also
remote_edge_version_entry::add_notifier

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