STAPL API Reference          
Overview   Containers   Algorithms   Views   Skeletons   Run-Time System
Modules     Classes    
List of all members | Classes | Public Member Functions | Public Types | Protected Member Functions | Protected Types | Protected Attributes
stapl::cm_impl::distributor_base< BaseContainer, PartitionInfo, ElemAssign > Struct Template Reference

Common data members and methods of the distributed objects that implement the transfer of elements between locations during container redistribution. More...

Classes

struct  cid_eq
 Functor used to find the base container information of the cid provided. More...
 

Public Member Functions

 distributor_base (base_container_ordering *ordering)
 
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 size_type = rmi_handle::size_type
 

Protected Member Functions

template<typename Partition , typename Mapper >
void remap_domain (typename Partition::value_type::index_type first, typename Partition::value_type::index_type last, Partition const &partition, Mapper const &mapper, std::vector< bc_info_type > &partial_info)
 
template<typename Distributor , typename Partition , typename Mapper , typename BaseContainers , typename NewBaseContainers >
void exchange_data (std::vector< bc_info_type > &partial_info, Partition const &partition, Mapper const &mapper, BaseContainers &m_bcontainers, NewBaseContainers &m_new_bcontainers)
 

Protected Types

typedef tuple_element< 1, PartitionInfo >::type cid_type
 
typedef PartitionInfo bc_info_type
 
typedef tuple_element< 0, PartitionInfo >::type interval_set_type
 
typedef interval_set_type::element_type gid_type
 
typedef interval_set_type::element_type index_type
 
typedef BaseContainer base_container_type
 
typedef std::map< gid_type, typename BaseContainer::container_type::value_type > data_set_type
 

Protected Attributes

std::vector< PartitionInfo > m_sender_info
 partition information that characterizes data currently stored on a location.
 
std::vector< PartitionInfo > m_receiver_info
 partition information that characterizes data that will be stored on a location after redistribution.
 
base_container_orderingm_ordering
 ordering of the base containers
 
ElemAssign m_assign
 functor used to assign to base container elements
 

Detailed Description

template<typename BaseContainer, typename PartitionInfo, typename ElemAssign>
struct stapl::cm_impl::distributor_base< BaseContainer, PartitionInfo, ElemAssign >

Common data members and methods of the distributed objects that implement the transfer of elements between locations during container redistribution.

Template Parameters
BaseContainersBoost ICL structure that is used to store base containers.
PartitionInfotuple that represents metadata of a partition to be redistributed. The elements of the tuple are the partition domain, partition id, destination location, and vector of locations that contribute to the partition.
ElemAssignFunctor that implements assignment to a base container element. Required because graph base containers implement vp_set instead of set_element.

Member Function Documentation

◆ 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: