STAPL API Reference          
Overview   Containers   Algorithms   Views   Skeletons   Run-Time System
Modules     Classes    
List of all members | Public Member Functions | Public Types | Public Attributes | Static Public Attributes
stapl::pg_lazy_edge_reference< T > Struct Template Reference

Refinement of lazy_edge_reference concept for inter-paragraph port based dataflow. Holds pointer to associated edge_container to attempt evictions, instead of using task_graph reference provided by callers of release(). More...

Public Member Functions

 pg_lazy_edge_reference (typename base_t::constructor_param_type const &param, edge_container &ct)
 Primary constructor receiving pointers to edge_entry for metadata (i.e., ref counting) updates and edge_version_storage for value access.
 
 pg_lazy_edge_reference (size_t index)
 Constructor used when initializing for the serialization of an out-of-gang paragraph task.
 
template<typename TGCallback >
void release (TGCallback const &cb)
 Override of base class method which attempts eviction of entry in edge_container that is held as a member.
 
void release (void)
 
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...
 

Public Types

using base_t = lazy_edge_reference< T >
 
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_typereference_type
 

Public Attributes

edge_containerm_ct_ptr
 
detail::edge_entry_basem_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
 

Detailed Description

template<typename T>
struct stapl::pg_lazy_edge_reference< T >

Refinement of lazy_edge_reference concept for inter-paragraph port based dataflow. Holds pointer to associated edge_container to attempt evictions, instead of using task_graph reference provided by callers of release().

Member Function Documentation

◆ is_local()

template<typename T >
bool stapl::lazy_edge_reference< T >::is_local ( void  ) const
inherited

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.

Member Data Documentation

◆ m_entry_ptr

template<typename T >
detail::edge_entry_base* stapl::lazy_edge_reference< T >::m_entry_ptr
inherited

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.


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