Reference object by edge_view when creating a task. Delays the creation of edge_accessor until the address of the flowed value is available (i.e., is it directly in edge_entry managed storage or available via cross-location, immutable sharing. More...
Public Member Functions | |
lazy_edge_reference (constructor_param_type const ¶m) | |
Primary constructor receiving pointers to edge_entry for metadata (i.e., ref counting) updates and edge_version_storage for value access. | |
lazy_edge_reference (size_t index) | |
Constructor used when initializing for the serialization of an out-of-gang paragraph task. | |
lazy_edge_reference (lazy_edge_reference const &other) | |
Copy construct which increments the reference count to element in the underlying edge_entry. | |
lazy_edge_reference (lazy_edge_reference &&other) | |
lazy_edge_reference & | operator= (lazy_edge_reference const &)=delete |
~lazy_edge_reference (void) | |
Destructor is a noop, verify that a prior call to release() has reset the entry pointer member to nullptr. | |
index_type | index (void) const |
reference_type | get_reference (void) const |
Create real reference to the flowed value as requested by the task. | |
bool | stealable (void) const |
Checks whether the object underlying this edge value can be stolen by the task and either (a) moved into the workfunction or (b) moved to the outgoing edge (for identity tasks). Guards calls to steal. | |
stored_value_t && | steal (void) const |
Return an rvalue reference to the underlying object for the edge. Ownership can then be transferred into the associated task. | |
stored_value_t const & | get_storage_ref (void) const |
Get reference to underlying edge value object. | |
bool | is_direct_storage (void) const |
Returns true if version storage directly holds the value and false is held in an immutable_shared wrapper. | |
immutable_shared< stored_value_t > | get_shared_wrapper (void) const |
Return copy of shared wrapper so that it can be forwarded to outgoing task edge in identity tasks. | |
bool | is_local (void) const |
Required for proxies and views to perform dynamic localization in the PARAGRAPH. More... | |
template<typename TGCallback > | |
void | release (TGCallback const &cb) |
Notifies underlying edge_entry that this reference is Signature for ephemeral paragraphs, eviction is attempted via tg_callback if associated with an in-gang task. Otherwise, the associated out-of-gang task owns the entry and deletes it directly. | |
void | release (void) |
Notifies underlying edge_entry that this reference is done using the value. Signature for persistent paragraphs. | |
Public Types | |
typedef tuple< detail::edge_entry_base *, detail::edge_version_storage< typename df_stored_type< T >::type > * > | constructor_param_type |
typedef T | value_type |
typedef df_stored_type< value_type >::type | stored_value_t |
typedef detail::edge_version_storage< stored_value_t > | storage_t |
typedef size_t | index_type |
typedef edge_accessor< T > | accessor_type |
typedef proxy< value_type, accessor_type > | reference_type |
Public Attributes | |
detail::edge_entry_base * | m_entry_ptr |
The associated edge entry with the value. Used to update reference counting and attempt entry eviction when possible. More... | |
union { | |
storage_t * m_storage_ptr | |
A pointer directly to the storage of the referenced element in the container of m_view . | |
size_t m_index | |
The task identifier for this accessor. Set if serialized. | |
}; | |
Static Public Attributes | |
static detail::edge_entry_base | serialized |
Reference object by edge_view when creating a task. Delays the creation of edge_accessor until the address of the flowed value is available (i.e., is it directly in edge_entry managed storage or available via cross-location, immutable sharing.
bool stapl::lazy_edge_reference< T >::is_local | ( | void | ) | const |
Required for proxies and views to perform dynamic localization in the PARAGRAPH.
The edge_accessor always refers to data available locally, as data flow is initialized to whatever location the associated task runs on.
detail::edge_entry_base* stapl::lazy_edge_reference< T >::m_entry_ptr |
The associated edge entry with the value. Used to update reference counting and attempt entry eviction when possible.
There are three possible states: nullptr - accessor has moved into another object and is now invalid. &serialized - accessor has been serialized for out of gang transmission. other - accessor is standard, entry_backed variety.