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 Types | Protected Attributes
stapl::cm_impl::distributor< std::map< RangeSet, BaseContainer * >, PartitionInfo, ElemAssign, BaseContainerFactory > Struct Template Reference

Distributed object that implements the transfer of elements between locations that is performed during container redistribution. More...

Public Member Functions

 distributor (storage_type &base_containers, base_container_ordering &order)
 
void receive_data (cid_type cid, data_set_type const &incoming_data)
 Receives a subset of elements that will be stored in a given bContainer after redistribution. More...
 
template<typename Partition , typename Mapper >
void operator() (Partition const &partition, Mapper const &mapper)
 
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 std::vector< PartitionInfo > local_partition_information
 
typedef BaseContainer base_container_type
 
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 PartitionInfo bc_info_type
 
typedef interval_set_type::element_type index_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 RangeSet, typename BaseContainer, typename PartitionInfo, typename ElemAssign, typename BaseContainerFactory>
struct stapl::cm_impl::distributor< std::map< RangeSet, BaseContainer * >, PartitionInfo, ElemAssign, BaseContainerFactory >

Distributed object that implements the transfer of elements between locations that is performed during container redistribution.

Template Parameters
BaseContainertype of the base container used to store elements.
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.

This specialization supports the sparse_interval_container_registry that is used by map as the structure used to store base containers.

Member Function Documentation

◆ receive_data()

template<typename RangeSet , typename BaseContainer , typename PartitionInfo , typename ElemAssign , typename BaseContainerFactory >
void stapl::cm_impl::distributor< std::map< RangeSet, BaseContainer * >, PartitionInfo, ElemAssign, BaseContainerFactory >::receive_data ( cid_type  cid,
data_set_type const &  incoming_data 
)

Receives a subset of elements that will be stored in a given bContainer after redistribution.

Parameters
cidId of the bContainer that will store the elements.
incoming_datamap of (gid, value) pairs that is the set of elements to insert into the new bContainer.

The method may be called multiple times for a given bContainer depending on the current distribution of elements and the desired distribution.

◆ operator()()

template<typename RangeSet , typename BaseContainer , typename PartitionInfo , typename ElemAssign , typename BaseContainerFactory >
template<typename Partition , typename Mapper >
void stapl::cm_impl::distributor< std::map< RangeSet, BaseContainer * >, PartitionInfo, ElemAssign, BaseContainerFactory >::operator() ( Partition const &  partition,
Mapper const &  mapper 
)

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