STAPL API Reference          
Overview   Containers   Algorithms   Views   Skeletons   Run-Time System
Modules     Classes    
List of all members | Public Member Functions | Public Types | Protected Member Functions | Protected Attributes
stapl::colocation< WF > Class Template Reference

Initial implementation of view colocation strategy that copies readonly data to the task's execution location to avoid excessive, fine grain communication. Assume a dense read pattern of these views.This implementation exists to fix performance problem with stapl::copy, currently the only user of the interface. (Hence only two view version of function operator). More...

Public Member Functions

 colocation (WF const &wf)
 
default_coarsener get_coarsener () const
 
void reset ()
 Implementation of task_factory_base interface. More...
 
template<typename PGV , typename SrcView , typename DestView >
void operator() (PGV const &pg_view, SrcView &src_view, DestView &dest_view) const
 Function operator invoked by PARAGRAPH to populate it with tasks. More...
 
bool finished () const
 
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

using coarsener_type = default_coarsener
 
using result_type = result_type
 
using size_type = rmi_handle::size_type
 

Protected Member Functions

bool initialized (void) const
 
void reset_view_indices ()
 Reset the iterators over the view indices on this location. More...
 
void set_view_index_iterator (std::size_t idx, view_index_iterator_base *ptr)
 
std::size_t view_indices_size () const
 
view_index_iterator_baseget_view_index_iterator (std::size_t n) const
 

Protected Attributes

bool m_finished
 Stores whether the derived factory has finished specifying tasks.
 

Detailed Description

template<typename WF>
class stapl::colocation< WF >

Initial implementation of view colocation strategy that copies readonly data to the task's execution location to avoid excessive, fine grain communication. Assume a dense read pattern of these views.

This implementation exists to fix performance problem with stapl::copy, currently the only user of the interface. (Hence only two view version of function operator).

See also
copy

Member Function Documentation

◆ reset()

template<typename WF >
void stapl::colocation< WF >::reset ( )
virtual

Implementation of task_factory_base interface.

Definition exists solely as sanity check to make sure it isn't called.

Reimplemented from stapl::task_factory_base.

◆ operator()()

template<typename WF >
template<typename PGV , typename SrcView , typename DestView >
void stapl::colocation< WF >::operator() ( PGV const &  pg_view,
SrcView &  src_view,
DestView &  dest_view 
) const

Function operator invoked by PARAGRAPH to populate it with tasks.

Parameters
pg_viewView of PARAGRAPH where tasks will be added.
src_viewSource view, read only data access.
dest_viewDestination view, write only.

Source/destination coarsened subview pairs are analyzed and the following algorithm is used:

  • If both coarsened subviews are already colocated (i.e., preferred_location return same location), call add_task as usual.
  • Else, insert a task to place the source view's elements in the container. Then, add another task to apply the user's workfunction, which consumes the source from edge_container, relying on that component's protocol to move the wherever the destination view's locality dictates the task be placed.

◆ reset_view_indices()

void stapl::task_factory_base::reset_view_indices ( )
protectedinherited

Reset the iterators over the view indices on this location.

This is used in factories where multiple tasks will be generated for each view element to be processed.

◆ 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 class was generated from the following file: