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

Models array_view concept over the result_container of a PARAGRAPH. The result container is held by pointer whose lifetime is managed among instances of this class via reference counting. More...

Public Member Functions

 result_view ()
 Default constructed result_view is considered null.
 
 result_view (bool b_one_sided, bool b_spanned, task_graph &tg)
 Constructor called in result_manager when PARAGRAPH is initializing return value storage.
 
 result_view (result_view const &other)
 Copy construct updates reference counts and also detects if it is being called during the initialization of a predecessor PARAGRAPH. If this is the case: (1) set the m_b_transitioned flag so we know we have a new consumer. (2) unset m_b_plug, copies within this PARAGRAPH (when creating its tasks don't register as additional consumers.
 
 ~result_view ()
 Destroy object after decrementing container reference count.
 
result_viewoperator= (result_view const &rhs)
 Assignment operator that adjusts the reference count of associated result_container.
 
container_tcontainer () const
 
reference operator[] (index_type idx) const
 Return a reference (i.e., proxy) to an element of this view. More...
 
bool available (index_type idx) const
 Return true iff the specified index in the container has been written to from the corresponding internal PARAGRAPH task.
 
template<typename Notifier >
void request_notify (index_type idx, Notifier notifier) const
 Allows successor PARAGRAPHs to register a callback, effectively setting up cross PARAGRAPH dependence edges. More...
 
stored_value_t const & get_reference (index_type idx) const
 Return reference to specified element in result container.
 
value_type get_element (index_type idx) const
 Return copy of specified element in result container.
 

Public Types

using container_t = result_container< T >
 
using value_type = T
 
using reference = proxy< value_type, accessor_t >
 
using index_type = std::size_t
 
using cid_type = index_type
 
using deferred_evaluation_view_ = void
 

Friends

struct tg_result_accessor< result_view >
 

Detailed Description

template<typename T>
struct stapl::detail::result_view< T >

Models array_view concept over the result_container of a PARAGRAPH. The result container is held by pointer whose lifetime is managed among instances of this class via reference counting.

Member Function Documentation

◆ operator[]()

template<typename T>
reference stapl::detail::result_view< T >::operator[] ( index_type  idx) const

Return a reference (i.e., proxy) to an element of this view.

Parameters
idxIndex (i.e., location) of result requested.

◆ request_notify()

template<typename T>
template<typename Notifier >
void stapl::detail::result_view< T >::request_notify ( index_type  idx,
Notifier  notifier 
) const

Allows successor PARAGRAPHs to register a callback, effectively setting up cross PARAGRAPH dependence edges.

Parameters
idxIndex (i.e., location) of requested result.
notifierFunction operator to call when value is available.

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