The edge container maintains a distributed representation of the dependence (edges) for the PARAGRAPH and the various data flows they represent. It is the primary container for the PARAGRAPH infrastructure which is traversed during PARAGRAPH execution as tasks complete execution and notify the edge_container of their return value (if any), triggering data flow to all specified successors in the system. More...
Public Member Functions | |
bool | has_pending_consumers () const |
Returns true if any producer task executing on this location has (or possibly has) any outstanding consumers to be registered. | |
template<typename T > | |
detail::edge_entry< T > & | get_entry_ref (edge_entry_t &entry) const |
Convert an iterator to edge_entry_base to a reference to the derived class of the entry, edge_entry<T>. More... | |
template<typename T , typename Filter > | |
tuple< detail::edge_entry_base *, detail::edge_version_storage< typename df_stored_type< typename boost::result_of< Filter(typename df_stored_type< T >::type)>::type >::type > * > | setup_flow (index_type producer_tid, boost::function< void(executor_base &, typename df_stored_type< typename boost::result_of< Filter(typename df_stored_type< T >::type)>::type >::type const &) > const ¬ifier, Filter const &filter, bool b_inc_local_usr_cnt=true) |
Called by successors to create an edge in the edge_container . More... | |
template<typename T , typename Notifier > | |
void | setup_flow_remote (index_type producer_tid, Notifier notifier) |
Target of RMI from child PARAGRAPH consuming a value from a parent PARAGRAPH's input port (i.e., an inter-PARAGRAPH dataflow instance of edge_container). Calls setup_flow with identify filter and without incrementing the local user count. setup_flow receives a type erased boost::function (which can't be serialized), this version receives the fully typed notifier which is type erased prior to calling the former. More... | |
template<typename T > | |
void | setup_promise_flow (index_type producer_tid, promise< typename df_stored_type< T >::type > pr) |
Called by out of gang successors to initiate data flow which is handled via a promise. More... | |
void | setup_signal_flow (index_type producer_tid, signal_notifier_t const ¬ifier) |
Called by successors to create an signal edge in the edge_container . More... | |
template<typename T > | |
detail::edge_entry< T > & | add_producer (index_type tid, size_t consumer_cnt, bool b_migrated=false) |
Mark this location as the execution location for a given task. More... | |
template<typename T , typename Filter > | |
void | send_remote_notifier (const index_type producer_tid, detail::edge_entry_wrapper< T > entry, Filter const &filter, const unsigned int version_id, const bool b_is_upgrade, const bool add_local=false) |
Add remote notifier for value consumption on the location where the producer task is located. Facilitates inter-location data flow which will subsequently trigger all associated local notifications. More... | |
template<typename T , typename Functor > | |
void | migrate_entry (const index_type producer_tid, const size_t dest, Functor const &f) |
Called by the PARAGRAPH to migrate all of an edge_entry's metadata about a local producer task (i.e., notifications, unknown consumer counts) to a new location. More... | |
template<typename T > | |
tuple< detail::edge_entry_base *, detail::edge_version_storage< typename df_stored_type< T >::type > * > | set_migrated_value (const index_type producer_tid, typename df_stored_type< T >::type const &val) |
Called during the migration of a producer task to new location for each of its predecessor data flows. More... | |
bool | migration_enabled (void) const |
edge_container (bool b_migration_enabled, paragraph_impl::task_graph *tg, bool b_is_persistent) | |
Constructor of edge_container. More... | |
template<typename TaskMapperParam > | |
edge_container (bool b_migration_enabled, paragraph_impl::task_graph *tg, bool b_is_persistent, TaskMapperParam &&task_mapper_param) | |
Alternate constructor signature used when the PARAGRAPH defines a custom task to location mapper to be used in the directory. | |
~edge_container () final | |
Destructor of edge_container. More... | |
void | try_base_eviction (edge_entry_t &entry) const |
Attempt the eviction (deletion) of an element of the value cache through the virtual method of the edge_entry_base. More... | |
template<typename T , typename Notifier > | |
tuple< detail::edge_entry_base *, detail::edge_version_storage< typename df_stored_type< typename boost::result_of< detail::df_identity< T >typename df_stored_type< T >::type)>::type >::type > * > | set_result (index_type tid, Notifier notifier) |
Add notifier that will associate the data flow value on this location of the outgoing edge of the PARAGRAPH with a the specified task's produced value. More... | |
template<typename T , typename Notifier > | |
void | add_remote_notifier (const index_type tid, const size_t loc, Notifier const ¬ifier, const bool b_is_upgrade) |
Invoked by consumer locations via the directory to add a remote notifier to the edge_entry at this producer location. More... | |
void | add_remote_signal_notifier (index_type tid, size_t loc) |
Invoked by consumer locations via the directory to add a remote signal notifier to the edge_entry at this producer location. More... | |
template<typename T , typename ValueParam > | |
void | set_element (const index_type tid, ValueParam &&val) |
Called by task_graph::processed (which is invoked when a task finishes execution) to trigger the initial data flow of producer task. More... | |
void | set_element (index_type tid) |
Called by task_graph::processed (which is invoked when a task finishes execution) to trigger the initial data flow of producer task when the task's return value type is void. More... | |
void | setup_signal (index_type producer_tid, edge_container::local_notifier_t *notifier_ptr) |
Public method called by the PARAGRAPH to request invocation of the notifier represented by notifier_ptr when the task identified by producer_tid has finished execution. More... | |
void | receive_signal (const index_type tid) |
Target of RMI invoked by a remote signal notifier to trigger data flow on the remote consumption location. More... | |
template<typename T , typename Filter > | |
void | receive_value (const index_type tid, detail::edge_entry_wrapper< T > entry, typename df_stored_type< typename boost::result_of< Filter(typename df_stored_type< T >::type) >::type >::type const &val, const unsigned int version_id) |
Target of RMI invoked by a remote notifier to trigger data flow on the remote consumption location. More... | |
template<typename T , typename Filter > | |
void | receive_move_value (const index_type tid, detail::edge_entry_wrapper< T > entry, typename df_stored_type< typename boost::result_of< Filter(typename df_stored_type< T >::type) >::type >::type &&val, const unsigned int version_id) |
Target of RMI invoked by a remote notifier to trigger data flow on the remote consumption location when moving the flowed value. | |
template<typename T , typename Filter > | |
void | receive_shared_value (const index_type tid, detail::edge_entry_wrapper< T > entry, immutable_shared< typename df_stored_type< T >::type > const &wrapper, const unsigned int version_id) |
Target of RMI invoked by a remote notifier to trigger data flow on the remote consumption location when sharing the flowed value. | |
template<typename T > | |
void | try_eviction (edge_entry_t &entry) const |
Attempt the eviction (deletion) of an element of the value cache when the concrete type (i.e., edge value type) is known at the call site. More... | |
template<typename T > | |
void | try_eviction (detail::edge_entry< T > &entry) const |
Attempt the eviction (deletion) of an element of the value cache when the concrete type (i.e., edge value type) is known at the call site. More... | |
void | reset_entry_values (void) const |
Resets edge entry data flow triggers and all notifiers to prepare for a reinvocation of a persistent PARAGRAPH. More... | |
void | release (void) |
Notify the edge_container that it is no longer needed by the PARAGRAPH. Termination detection (at least on the location) has succeeded. More... | |
task_graph & | tg () const |
directory_t & | loc_directory (void) |
bool | is_persistent (void) const |
bool | contains_producer_tid (index_type tid) const |
Returns true if this location is currently marked as the execution location for the given task. | |
void | set_num_succs (index_type producer_tid, size_t num_succs) |
Define the number of successors for a task (producer_tid ) that was previously delayed by passing defer_spec to add_producer. | |
template<typename T , typename Filter > | |
void | receive_move_value (const index_type tid, detail::edge_entry_wrapper< T > entry, typename df_stored_type< typename boost::result_of< Filter(typename df_stored_type< T >::type)>::type >::type &&val, const unsigned int version_id) |
bool | has_perfect_mapper (void) const |
mapper_t const & | key_mapper (void) const |
mapper_t & | key_mapper (void) |
bool | empty (void) const |
Returns true if there are no entries in directory's registry on this location. | |
void | reset (void) |
Clear all local registrations and pending messages in directory. Used by clear() methods of container distributions. | |
bool | try_register_key_local (std::size_t const &key) |
Attempt registration from the managing location. Return true if successful (i.e., not already registered). | |
void | register_key (std::size_t const &key) |
Associate key in directory's registry with the location invoking this method. More... | |
void | register_keys (std::pair< std::size_t, std::size_t > const &keys) |
void | register_apply (std::size_t const &key, Functor &&f) |
Associate key in directory's registry with location invoking this method. Registration location is implicitly set to be caller of this method. More... | |
void | register_apply (std::size_t const &key, Functor &&f, location_type location) |
Associate key in directory's registry with location invoking this method. More... | |
void | unregister_key (std::size_t const &key) |
Unregister key in directory's registry. | |
void | unregister_apply (std::size_t const &key, Functor &&f) |
Unregister key and apply a function object f at location where directory's registry manages key . More... | |
void | invoke_where (Functor &&f, std::size_t const &key) |
Invoke function object at the location where key is currently registered. More... | |
void | try_invoke_where (Functor &&f, std::size_t const &key) |
Invoke function object at the location where key is currently registered if the key is registered. More... | |
void | unordered_invoke_where (Functor &&f, std::size_t const &key) |
Invoke function object at the location where key is currently registered, disregarding RMI causal ordering. More... | |
locality_info | locality (std::size_t const &key) |
Provide locality information about a key managed by the directory. More... | |
runtime::location_md const & | get_location_md (void) const noexcept |
Returns the location metadata of the location this object registered in. | |
runtime::location_md & | get_location_md (void) noexcept |
Returns the location metadata of the location this object registered in. noexcept More... | |
edge_entry_t * | lookup_ptr (index_type tid) const |
Search for entry with key tid . If found, return a pointer else return a nullptr. | |
edge_entry_t & | lookup_expect (index_type tid) |
Search for entry with key tid . The entry is expected to exist; assert if it is not found. Return a reference to the entry. | |
bool | contains (index_type tid) const |
Returns true if there is an entry for task tid in the value cache. | |
bool | empty (void) const |
void | erase (edge_entry_t &entry_ref) const |
void | clear (void) |
bool | insert (edge_entry_t &entry_ref) |
template<typename EntryFactory > | |
edge_entry_t & | lookup_or_insert (const index_type tid, EntryFactory factory) |
Check if entry exists for given task id and create one if it doesn't. Returns a reference to the entry. | |
template<typename Functor > | |
void | for_each (Functor f) const |
Apply functor on all entries in the value cache. | |
Distributed Object Management | |
rmi_handle::const_reference const & | get_rmi_handle (void) const noexcept |
Returns the associated rmi_handle. | |
rmi_handle::reference const & | get_rmi_handle (void) noexcept |
Returns the associated rmi_handle. | |
size_type | get_location_id (void) const noexcept |
Returns the location id of the local sub-object. | |
size_type | get_num_locations (void) const noexcept |
Returns the number of locations of the gang of this p_object. | |
void | advance_epoch (void) |
Advances the epoch of the object. More... | |
void | unlock (void) |
Used by lock_guard functionality in method of derived classes to request atomicity with respect to incoming RMIs. More... | |
void | lock (void) |
Used by lock_guard functionality in method of derived classes to request atomicity with respect to incoming RMIs. More... | |
bool | try_lock (void) |
Attempt to maintain atomicity with respect to incoming RMIs. More... | |
Public Types | |
using | local_notifier_t = detail::edge_local_notifier_base |
The successor notifier type passed to the edge_container by consumption requests originating in task_graph_impl::add_task . | |
using | manager_type = mapper_t |
using | registry_type = registry_t |
using | key_type = std::size_t |
using | size_type = rmi_handle::size_type |
using | index_type = std::size_t |
The task identifier type used by the PARAGRAPH. | |
using | edge_entry_t = detail::edge_entry_base |
The edge entry type held by the value cache. | |
Protected Member Functions | |
void | execute (Functor &&f) |
Internal method, target of RMI called via migrate_impl to invoke functor f at new registration location, post registry update. More... | |
void | invoke_at_manager (std::size_t const &key, void(Directory::*const pmf)(PMFArgs...), Args &&... args) |
Forwards functor and arguments to location managing key . The location managing the key will invoke the method with the supplied arguments. More... | |
void | invoke_at_manager (std::size_t const &key, void(Directory::*const pmf)(PMFArgs...) const, Args &&... args) const |
Forwards const functor and arguments to location managing key . The location managing the key will invoke the method with the supplied arguments. More... | |
void | invoke_at_manager_impl (std::size_t const &key, void(Directory::*const pmf)(PMFArgs...), Args &&... args) |
Implementation of. More... | |
void | invoke_at_manager_impl (std::size_t const &key, void(Directory::*const pmf)(PMFArgs...) const, Args &&... args) const |
Implementation of. More... | |
void | flush_pending (const location_type loc, std::size_t const &key, queue_t &pending) |
Forward all buffered requests for key to location More... | |
void | request_forward (std::size_t const &key, Functor &&f) |
Internal method used to facilitate invocation of f on location where key is currently registered. Called via RMI on directory location where key is managed. More... | |
void | try_request_forward (std::size_t const &key, Functor &&f) |
Internal method used to facilitate invocation of f on location where key is currently registered. If key is not registered, the request is dropped; otherwise, it is called via RMI on directory location where key is managed. This is directed at situations where it is legal for a key to not exist, i.e. erasing non-existent keys in the unordered set container. More... | |
void | check_increase_size (void) const |
Called by edge_container methods that increase the number of entries stored in the local cache. If load factor is 1, resize by a power of two. | |
Protected Types | |
using | mapper_t = typename select_parameter< boost::function< std::pair< location_type, loc_qual >(size_t)>, detail::default_key_mapper< std::size_t > >::type |
using | registry_t = typename select_parameter< use_default, boost::unordered_map< std::size_t, location_type, boost::hash< std::size_t >, std::equal_to< std::size_t >, pool_allocator< std::pair< std::size_t const, location_type > > > >::type |
using | transmitter_type = typename select_parameter< try_transmitter, async_transmitter >::type |
using | queue_t = request_queue< request_t > |
using | queues_t = boost::unordered_map< std::size_t, queue_t, stapl::hash< std::size_t >, std::equal_to< std::size_t >, pool_allocator< std::pair< std::size_t const, queue_t > > > |
Protected Attributes | |
registry_t | m_registry |
Stores key to locations mapping. | |
queues_t | m_pending |
Map of queues, indexed by Key . Entry for keys exists when messages arrive and must be buffered prior to registration, during migration, etc. | |
mapper_t | m_key_mapper |
Map a key to location that manages it (i.e., where it has entry in m_registry). | |
bool | m_b_perfect_mapper |
The edge container maintains a distributed representation of the dependence (edges) for the PARAGRAPH and the various data flows they represent. It is the primary container for the PARAGRAPH infrastructure which is traversed during PARAGRAPH execution as tasks complete execution and notify the edge_container of their return value (if any), triggering data flow to all specified successors in the system.
The edge container facilitates the unordered creation of predecessor and successor tasks, allowing the edge creation to occur without any synchronization between the two.
In ephemeral mode, storage for both intermediate values and the dependence information is aggressively reclaimed to minimize the footprint of the PARAGRAPH
stapl::edge_container::edge_container | ( | bool | b_migration_enabled, |
paragraph_impl::task_graph * | tg, | ||
bool | b_is_persistent | ||
) |
Constructor of edge_container.
The directory is passed a functor wrapping a method of this class, which returns true if the given task identifier is registered as a producer on this location. Also, initialized such that communication from this object is not buffered by ARMI and is not included in bookkeeping for fences.
|
final |
Destructor of edge_container.
Verify the the edge_container is empty if not in persistent mode. If in persistent mode, manually deconstruct all edge entries and then clear the value cache.
detail::edge_entry<T>& stapl::edge_container::get_entry_ref | ( | edge_entry_t & | entry | ) | const |
Convert an iterator to edge_entry_base
to a reference to the derived class of the entry, edge_entry<T>.
T | The edge value type. Parameter is explicitly specified by the calling edge_container method. |
iter | An iterator to edge_entry_base . Must be valid. |
down_cast
is used to check the downcast with a dynamic_cast when in debug mode.
tuple< detail::edge_entry_base *, detail::edge_version_storage< typename df_stored_type< typename boost::result_of< Filter(typename df_stored_type< T >::type)>::type >::type > * > stapl::edge_container::setup_flow | ( | index_type | producer_tid, |
boost::function< void(executor_base &, typename df_stored_type< typename boost::result_of< Filter(typename df_stored_type< T >::type)>::type >::type const &) > const & | notifier, | ||
Filter const & | filter, | ||
bool | b_inc_local_usr_cnt = true |
||
) |
Called by successors to create an edge in the edge_container
.
Searches the local value cache for information about this producer_tid before sending a directory forwarded message to the producer.
T | Edge value type. Explicitly specified by edge_view . |
producer_tid | The task identifier of the task to set up the data flow from. |
notifier | The notifier that should be invoked locally when the the data flow is triggered. |
filter | A filter to be applied to the consumed value prior to flowing it to the consuming task. |
b_inc_local_usr_cnt | Denotes whether the local reference count associated with this version (as defined by filter ) of the value should incremented. |
b_inc_local_usr_cnt
is generally true, except for a notifier for the external PARAGRAPH result, which copy the value on notification and then have no further need to reference the copy in the edge_container
.
void stapl::edge_container::setup_flow_remote | ( | index_type | producer_tid, |
Notifier | notifier | ||
) |
Target of RMI from child PARAGRAPH consuming a value from a parent PARAGRAPH's input port (i.e., an inter-PARAGRAPH dataflow instance of edge_container). Calls setup_flow with identify filter and without incrementing the local user count. setup_flow receives a type erased boost::function (which can't be serialized), this version receives the fully typed notifier which is type erased prior to calling the former.
T | Edge value type. Explicitly specified by edge_view . |
producer_tid | The task identifier of the task to set up the data flow from. |
notifier | The notifier that should be invoked locally when the data flow is triggered. |
void stapl::edge_container::setup_promise_flow | ( | index_type | producer_tid, |
promise< typename df_stored_type< T >::type > | pr | ||
) |
Called by out of gang successors to initiate data flow which is handled via a promise.
T | Edge value type. Explicitly specified by caller. |
producer_tid | The task identifier of the task to set up the data flow from. |
pr | Promise that is fulfilled with the value produced by the predecessor. |
void stapl::edge_container::setup_signal_flow | ( | index_type | producer_tid, |
signal_notifier_t const & | notifier | ||
) |
Called by successors to create an signal edge in the edge_container
.
Searches the local value cache for information about this producer_tid before sending a directory forwarded message to the producer.
producer_tid | The task identifier of the task to set up the data flow from. |
notifier | The notifier that should be invoked locally when the the data flow is triggered. |
detail::edge_entry<T>& stapl::edge_container::add_producer | ( | index_type | tid, |
size_t | consumer_cnt, | ||
bool | b_migrated = false |
||
) |
Mark this location as the execution location for a given task.
T | Edge value type. Explicitly specified by edge_view . |
tid | The task identifier of the producer task. |
consumer_cnt | The out degree of the producer task. |
b_migrated | True if this is the insertion of migrated task. If so the migration process updates the producer's execution location and there's no need to reregister. |
void stapl::edge_container::send_remote_notifier | ( | const index_type | producer_tid, |
detail::edge_entry_wrapper< T > | entry, | ||
Filter const & | filter, | ||
const unsigned int | version_id, | ||
const bool | b_is_upgrade, | ||
const bool | add_local = false |
||
) |
Add remote notifier for value consumption on the location where the producer task is located. Facilitates inter-location data flow which will subsequently trigger all associated local notifications.
T | Edge value type. Explicitly specified by caller. |
producer_tid | Task identifier of the producer task to register notification request with. |
filter | Filter to be applied on the producer task value prior to consumption by the successor task. |
version_id | A version identifier created in the edge_entry on the consuming location associated with filter . |
b_is_upgrade | True if a this notifier upgrades a previous request from the same location (i.e., signal –> full). |
add_local | True if this notifier should be added locally and not forwarded to a remote producer through the directory. |
The add_local
parameter was added with migration support, which inserts a remote notifier even on the location where the producer task is (currently) located. This simplifies the data flow protocol if the task is later migrated, meaning this location becomes a remote consumption location.
void stapl::edge_container::migrate_entry | ( | const index_type | producer_tid, |
const size_t | dest, | ||
Functor const & | f | ||
) |
Called by the PARAGRAPH to migrate all of an edge_entry's metadata about a local producer task (i.e., notifications, unknown consumer counts) to a new location.
T | Edge value type. Explicitly specified by caller. |
producer_tid | Task identifier of producer task to be migrated. |
dest | The new execution location for the task. |
f | The PARAGRAPH method to call on the destination to complete the migration process. (The actual migration is facilitated by the edge container since it maintains the directory). |
tuple<detail::edge_entry_base*, detail::edge_version_storage<typename df_stored_type<T>::type>*> stapl::edge_container::set_migrated_value | ( | const index_type | producer_tid, |
typename df_stored_type< T >::type const & | val | ||
) |
Called during the migration of a producer task to new location for each of its predecessor data flows.
T | Edge value type. Explicitly specified by caller. |
producer_tid | The task identifier of the task that produced this value. |
val | The value to be inserted in the edge_entry . |
A copy of all predecessor values in the edge container that a migrated task depends on (flow already set since only runnable tasks are migratable) are copied to the next execution location to be available during the task's execution. Create a new edge_entry, unless one already exists and insert the value.
void stapl::edge_container::try_base_eviction | ( | edge_entry_t & | entry | ) | const |
Attempt the eviction (deletion) of an element of the value cache through the virtual method of the edge_entry_base.
entry | Reference to an edge_entry_base object to check for evictability. |
Note destruction is runtime polymorphic as well.
When the concrete type of the entry is known (i.e., the edge value type is available in the calling context), use try_eviction to avoid virtual function call.
tuple<detail::edge_entry_base*, detail::edge_version_storage< typename df_stored_type< typename boost::result_of< detail::df_identity<T>typename df_stored_type<T>::type)>::type >::type>*> stapl::edge_container::set_result | ( | index_type | tid, |
Notifier | notifier | ||
) |
Add notifier that will associate the data flow value on this location of the outgoing edge of the PARAGRAPH with a the specified task's produced value.
T | Edge value type. Explicitly specified by caller. |
tid | The identifier of the task |
notifier | The result notifier to register with the edge_entry for tid . |
Redirects request to edge_container::setup_flow
.
void stapl::edge_container::add_remote_notifier | ( | const index_type | tid, |
const size_t | loc, | ||
Notifier const & | notifier, | ||
const bool | b_is_upgrade | ||
) |
Invoked by consumer locations via the directory to add a remote notifier to the edge_entry at this producer location.
T | Edge value type. Explicitly specified by caller. |
tid | Task identifier of local producer to register notifier with. |
loc | Location where notification request originated from. |
notifier | Cross location notifier that will apply any filter and manage data flow across ARMI. |
b_is_upgrade | True if a this notifier upgrades a previous request from the same location (i.e., signal –> full). |
void stapl::edge_container::add_remote_signal_notifier | ( | index_type | tid, |
size_t | loc | ||
) |
Invoked by consumer locations via the directory to add a remote signal notifier to the edge_entry at this producer location.
tid | Task identifier of local producer to register notifier with. |
loc | Location where notification request originated from. |
void stapl::edge_container::set_element | ( | const index_type | tid, |
ValueParam && | val | ||
) |
Called by task_graph::processed
(which is invoked when a task finishes execution) to trigger the initial data flow of producer task.
T | Edge value type. Explicitly specified by caller. |
tid | The task identifier of the task producing the edge value. |
val | The value produced by the task which will passed (possibly after filtering) along its outgoing edge to consumers. |
set_value
is in turn called on the edge_entry
and all notifications for consumer data flow are invoked.
void stapl::edge_container::set_element | ( | index_type | tid | ) |
Called by task_graph::processed
(which is invoked when a task finishes execution) to trigger the initial data flow of producer task when the task's return value type is void.
tid | The task identifier of the task producing the edge value. |
void stapl::edge_container::setup_signal | ( | index_type | producer_tid, |
edge_container::local_notifier_t * | notifier_ptr | ||
) |
Public method called by the PARAGRAPH to request invocation of the notifier represented by notifier_ptr
when the task identified by producer_tid
has finished execution.
Wraps the notifier appropriately based on whether persistency is enabled or not and then redirects to edge_container::setup_signal_flow
.
void stapl::edge_container::receive_signal | ( | const index_type | tid | ) |
Target of RMI invoked by a remote signal notifier to trigger data flow on the remote consumption location.
tid | The task identifier this whose signal notification this invocation represents. |
Redirect to edge_entry for tid
so that it can notify all local signal consumers.
void stapl::edge_container::receive_value | ( | const index_type | tid, |
detail::edge_entry_wrapper< T > | entry, | ||
typename df_stored_type< typename boost::result_of< Filter(typename df_stored_type< T >::type) >::type >::type const & | val, | ||
const unsigned int | version_id | ||
) |
Target of RMI invoked by a remote notifier to trigger data flow on the remote consumption location.
T | Edge value type. Explicitly specified by caller. |
tid | The task identifier this whose signal notification this invocation represents. |
entry | Trivial iterator to the edge_entry for the given value on this location. |
val | The value associated with this data flow. |
version_id | The version identifier associated with this value. Associates this data flow with the filter that was originally specified when the edge(s) was created. |
Redirect to edge_entry for tid
so that it can notify all local associated consumers of this version (and any dependent versions).
void stapl::edge_container::try_eviction | ( | edge_entry_t & | entry | ) | const |
Attempt the eviction (deletion) of an element of the value cache when the concrete type (i.e., edge value type) is known at the call site.
T | Edge value type. Explicitly specified by caller. |
entry | A reference to a edge_entry_base object to check for evictability. |
Right now we have an aggressive eviction policy on locations not producing a given value. Once all currently initialized consumers execute, the value is evicted, regardless of the size of the cache. Being more lazy might allow consumers that later initialize to reuse the value instead of being forced to wait for a refetch.
void stapl::edge_container::try_eviction | ( | detail::edge_entry< T > & | entry | ) | const |
Attempt the eviction (deletion) of an element of the value cache when the concrete type (i.e., edge value type) is known at the call site.
T | Edge value type. Explicitly specified by caller. |
entry | A reference to a detail::edge_entry object to check for evictability. |
This version is used when reference to derived class is already present.
void stapl::edge_container::reset_entry_values | ( | void | ) | const |
Resets edge entry data flow triggers and all notifiers to prepare for a reinvocation of a persistent PARAGRAPH.
Called by task_graph::reset.
void stapl::edge_container::release | ( | void | ) |
Notify the edge_container that it is no longer needed by the PARAGRAPH. Termination detection (at least on the location) has succeeded.
It is possible that the edge_container made need to stay alive longer if there are pending notifications stil being flushed.
|
protectedinherited |
Internal method, target of RMI called via migrate_impl to invoke functor f
at new registration location, post registry update.
f | Nullary functor to apply. |
|
protectedinherited |
Forwards functor and arguments to location managing key
. The location managing the key will invoke the method with the supplied arguments.
key | Key value whose managing location (i.e., where registry entry is stored) is where pmf will be invoked. |
pmf | Directory member function to be invoked. |
args | variadic list of arguments to be applied. |
This is used to internally encapsulate to forward various method invocations from the requester (e.g., registration, invoke_where, etc) to the location where they can be serviced, forwarded, etc.
|
protectedinherited |
Forwards const functor and arguments to location managing key
. The location managing the key will invoke the method with the supplied arguments.
key | Key value whose managing location (i.e., where registry entry is stored) is where pmf will be invoked. |
pmf | Directory const member function to be invoked. |
args | variadic list of arguments to be applied. |
This is used to internally encapsulate to forward various method invocations from the requester (e.g., registration, invoke_where, etc) to the location where they can be serviced, forwarded, etc.
|
protectedinherited |
Implementation of.
Trans | The transmitter type |
|
protectedinherited |
Implementation of.
Trans | The given transmitter type |
|
protectedinherited |
Forward all buffered requests for key
to location loc
.
loc | Location to send buffered requests to. |
key | Key value buffered requests are for. |
pending | Pending queue associated with Key . |
This is internal method only called on the directory location managing key
.
|
protectedinherited |
Internal method used to facilitate invocation of f
on location where key
is currently registered. Called via RMI on directory location where key
is managed.
key | Key whose registered location determines where f should be executed. |
f | Functor to invoke (unary, key passed as parameter). |
Called by invoke_where and execute (the latter when migration enabled).
|
protectedinherited |
Internal method used to facilitate invocation of f
on location where key
is currently registered. If key
is not registered, the request is dropped; otherwise, it is called via RMI on directory location where key
is managed. This is directed at situations where it is legal for a key to not exist, i.e. erasing non-existent keys in the unordered set container.
key | Key whose registered location determines where f should be executed. |
f | Functor to invoke (unary, key passed as parameter). |
Called by invoke_where and execute (the latter when migration enabled).
|
inherited |
Associate key
in directory's registry with the location invoking this method.
|
inherited |
Associate key
in directory's registry with location invoking this method. Registration location is implicitly set to be caller of this method.
key | Key to register. |
f | Unary function object (receives key ) as parameter to call after registration. |
|
inherited |
Associate key
in directory's registry with location invoking this method.
key | Key to registered. |
f | Unary function object (receives key ) as parameter to call after registration. |
location | Location this key should be mapped to in the registry. |
|
inherited |
Unregister key
and apply a function object f
at location where directory's registry manages key
.
key | Key to unregister. |
f | Unary function object (receives key ) as parameter to call after unregistration. |
|
inherited |
Invoke function object at the location where key is currently registered.
f | Functor to apply. Unary operator, receives key as parameter. |
key | Registered key |
|
inherited |
Invoke function object at the location where key is currently registered if the key is registered.
f | Functor to apply. Unary operator, receives key as parameter. |
key | Key that may not be registered when method is invoked |
|
inherited |
Invoke function object at the location where key is currently registered, disregarding RMI causal ordering.
f | Functor to apply. Unary operator, receives key as parameter. |
key | Registered key |
|
inherited |
Provide locality information about a key managed by the directory.
key | registered key |
|
noexceptinherited |
Returns the location metadata of the location this object registered in. noexcept
noexcept
|
inherited |
Advances the epoch of the object.
Advancing the epoch will flush any pending RMIs. It will also increase the epoch of the current gang if the object is not a named object.
|
inherited |
Used by lock_guard
functionality in method of derived classes to request atomicity with respect to incoming RMIs.
Mutates counter in the associated runqueue.
|
inherited |
Used by lock_guard
functionality in method of derived classes to request atomicity with respect to incoming RMIs.
Mutates counter in the associated runqueue.
|
inherited |
Attempt to maintain atomicity with respect to incoming RMIs.
Mutates counter in the associated runqueue.
true
if the lock was able to be acquired. false
if it is already locked.