The stored element type of edge_container
. One instance of this class or a derived class exists for each producer task, both on the location where it executes as well as on all locations with active consumers.
More...
Public Member Functions | |
edge_entry_base (std::size_t tid, bool b_persistent, bool b_signal_only=true) | |
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. | |
virtual bool | is_basic_edge_entry (void) const |
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... | |
Protected Member Functions | |
edge_entry_base (edge_entry_base &&other) | |
A move constructor invoked when upgrading a signal only entry to a full value edge_entry. More... | |
bool | empty_signal_notifications (void) const |
Return true if the the edge_entry contains any signal notifications. | |
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... | |
Friends | |
bool | operator== (edge_entry_base const &lhs, edge_entry_base const &rhs) |
Freestanding function that defines operator== in terms of the entries' respective task identifiers. | |
std::size_t | hash_value (edge_entry_base const &entry) |
Interface required for Boost.Intrusive unordered set (the container edge entries are stored in), to map an entry to it's hashed key for insertion. More... | |
The stored element type of edge_container
. One instance of this class or a derived class exists for each producer task, both on the location where it executes as well as on all locations with active consumers.
Can be directly instantiated for consumer locations when there are only signal consumers. Alternatively, can be instantiated as base class of instantiation of edge_entry
class template object.
Lack of template parameter on edge type on this entry type allows the edge_container
to support multiple edge value types within the same PARAGRAPH, an important feature for many dependence graph patterns.
|
protected |
A move constructor invoked when upgrading a signal only entry to a full value edge_entry.
Call move constructor of signal version entry as well placing this new entry in the edge_container in place of other
.
This is used when we upgrade an object of type edge_entry_base to that of edge_entry in the edge_container upon the reception of value consumers or the initialization of the producer task on this location.
bool stapl::detail::edge_entry_base::evictable | ( | void | ) | const |
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
.
void stapl::detail::edge_entry_base::set_as_producer | ( | size_t | consumer_cnt | ) |
Inform this edge entry that the producer task has been initialized on this location.
consumer_cnt | The number of consumers as specified by the corresponding add_task call. Possible value is defer_spec , denoting that this count will be specified later. |
void stapl::detail::edge_entry_base::delayed_set_num_consumers | ( | size_t | consumer_cnt | ) |
Set the number of successors after delay_spec
was passed to set_as_producer
.
consumer_cnt | The out-degree of the producer task in the PARAGRAPH. |
void stapl::detail::edge_entry_base::decrement_unknown_consumers | ( | void | ) |
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.
void stapl::detail::edge_entry_base::increment_local_consumers | ( | void | ) |
Increase reference count of local proxies in use by consumer tasks and backed by a version in this edge entry.
void stapl::detail::edge_entry_base::decrement_local_consumers | ( | void | ) |
Decrease reference count of local proxies in use by consumer tasks and backed by a version in this edge entry.
bool stapl::detail::edge_entry_base::local_producer_initialized | ( | ) | const |
Check if the producer task for edge_entry is registered on this location.
Sufficient to check if m_unknown_consumer_cnt has been initialized.
|
virtual |
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 >.
|
virtual |
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 >.
void stapl::detail::edge_entry_base::set_signal | ( | executor_base * | executor_ptr, |
const bool | b_migration_enabled | ||
) |
Set data flow for signal consumers by notifying the signal version notifier list.
executor_ptr | The executor associated with the given PARAGRAPH. |
b_migration_enabled | Denotes whether the PARAGRAPH has task migration support enabled. |
|
virtual |
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.
Reimplemented in stapl::detail::edge_entry< T >.
|
virtual |
Add notifier to remote location for signaling.
This call should only occur on the producer location, where edge_entry overrides this definition.
Reimplemented in stapl::detail::edge_entry< T >.
|
virtual |
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 >.
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 |
||
) |
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.
req | The type of request that has just been added. |
b_flow | Whether data flow has already been triggered on this consumer location for req . |
b_partial_added | If req is partial, denotes if this request added a new version (i.e., filter) on this location for the producer task value. |
df_add_status stapl::detail::edge_entry_base::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.
executor | The executor associated with the PARAGRAPH. Passed to notifier if it is immediately called (i.e., the signal flow has already been set. |
notifier | The signal notifier for the successor task. |
|
friend |
Interface required for Boost.Intrusive unordered set (the container edge entries are stored in), to map an entry to it's hashed key for insertion.
entry | An edge entry to compute it's hash for set insertion. |
entry
.
|
protected |
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.
|
protected |
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.
|
protected |
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.