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

A view that is the result of the functional map operation map_func. More...

Public Member Functions

 map_view (map_view const &other)
 
 map_view (base_view_t const &view, size_t n_sv, size_t n_copies)
 
map_viewoperator= (map_view const &rhs)
 
iterator begin (void) const
 Return an iterator to the first element of the local portion of data represented by the view.
 
iterator end (void) const
 Return an iterator to the end (one past the last element) of the local portion of data represented by the view.
 
bool available (void) const
 Return true if the underlying view has its data available for consumption.
 
template<typename Notifier >
void request_notify (Notifier notifier) const
 Allows users to request the given notifier be invoked when the values of the view are available for consumption. More...
 
bool local_available (void) const
 Return true if the local portion of the underlying view has its data available for consumption.
 
template<typename Notifier >
void request_local_notify (Notifier notifier) const
 Allows users to request the given notifier be invoked when the local values of the view are available for consumption. More...
 
value_type operator[] (std::size_t idx) const
 Return a copy of the element in this view at index idx.
 
size_t get_num_copies (void) const
 
size_t get_num_subviews (void) const
 
size_t get_num_local_subviews (size_t replicate_set=UINT_MAX) const
 The required value for repeated views by partition_id_set. More...
 
component_holder< cid_typeget_local_component (size_t idx) const
 Old view interface returning component wrapper of index value.
 
subview_type get_subview (cid_type idx) const
 Return a map_subview of a coarsened piece of this view. More...
 
locality_info locality (cid_type idx)
 Return locality information as required by the task placement interface of a PARAGRAPH scheduler. More...
 
std::size_t size (void) const
 Return the number elements in all locations this view refers to.
 
runtime::location_md const & get_location_md (void) const noexcept
 Returns the location metadata of the location this object registered in.
 
runtime::location_mdget_location_md (void) noexcept
 Returns the location metadata of the location this object registered in. noexcept More...
 
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

typedef void deferred_evaluation_view_
 Informs PARAGRAPH that values the view refers to may not be available yet, so that it can create notifications to defer execution as needed.
 
typedef map_subview< base_view_tsubview_type
 
typedef subview_type reference
 
typedef T::value_type value_type
 
typedef T::iterator iterator
 
typedef replicated_cid cid_type
 
using size_type = rmi_handle::size_type
 

Detailed Description

template<typename T>
struct stapl::composition::map_view< T >

A view that is the result of the functional map operation map_func.

Unique features of the base map_func are results backed by the PARAGRAPH's result_view and support for transparent computation replication.

Template Parameters
TThe result type of the PARAGRAPH for each location.

Member Function Documentation

◆ request_notify()

template<typename T >
template<typename Notifier >
void stapl::composition::map_view< T >::request_notify ( Notifier  notifier) const

Allows users to request the given notifier be invoked when the values of the view are available for consumption.

Requests redirected to underlying view.

◆ request_local_notify()

template<typename T >
template<typename Notifier >
void stapl::composition::map_view< T >::request_local_notify ( Notifier  notifier) const

Allows users to request the given notifier be invoked when the local values of the view are available for consumption.

Requests redirected to underlying view.

◆ get_num_local_subviews()

template<typename T >
size_t stapl::composition::map_view< T >::get_num_local_subviews ( size_t  replicate_set = UINT_MAX) const

The required value for repeated views by partition_id_set.

Parameters
replicate_setthe instance of replicated computation this view is associated with.

◆ get_subview()

template<typename T >
subview_type stapl::composition::map_view< T >::get_subview ( cid_type  idx) const

Return a map_subview of a coarsened piece of this view.

Parameters
idxAn index into this view.

◆ locality()

template<typename T >
locality_info stapl::composition::map_view< T >::locality ( cid_type  idx)

Return locality information as required by the task placement interface of a PARAGRAPH scheduler.

Parameters
idxThe task identifier locality information is requested for.

◆ get_location_md()

runtime::location_md& stapl::p_object::get_location_md ( void  )
noexceptinherited

Returns the location metadata of the location this object registered in. noexcept

noexcept

◆ advance_epoch()

void stapl::p_object::advance_epoch ( void  )
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.

◆ unlock()

void stapl::p_object::unlock ( void  )
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.

◆ lock()

void stapl::p_object::lock ( void  )
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.

◆ try_lock()

bool stapl::p_object::try_lock ( void  )
inherited

Attempt to maintain atomicity with respect to incoming RMIs.

Mutates counter in the associated runqueue.

Returns
true if the lock was able to be acquired. false if it is already locked.

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