STAPL API Reference          
Overview   Containers   Algorithms   Views   Skeletons   Run-Time System
Modules     Classes    
List of all members | Public Member Functions | Public Types | Public Attributes | Protected Member Functions
stapl::distribution_spec_view< C, Dom, GID, CID > Class Template Reference

One dimensional read only view used to specify data distribution. More...

Public Member Functions

 distribution_spec_view (distribution_spec_view const &other)=default
 
template<typename MapFunc >
 distribution_spec_view (view_container_type *vcont, domain_type const &dom, MapFunc mfunc, bool arbitrary)
 Constructs a view over either the location or partition id space with a domain that represents the GID or partition id space, respectively. The mapping function maps from the space of the domain to an index in the space of the container. The view takes ownership of the container. More...
 
template<typename MapFunc >
 distribution_spec_view (view_container_type &vcont, domain_type const &dom, MapFunc mfunc, bool arbitrary)
 
template<typename MapFunc >
 distribution_spec_view (view_container_type *vcont, domain_type const &dom, MapFunc mfunc, distribution_type d=distribution_type::unknown)
 
template<typename MapFunc >
 distribution_spec_view (view_container_type &vcont, domain_type const &dom, MapFunc mfunc, distribution_type d=distribution_type::unknown)
 
template<typename MapFunc >
 distribution_spec_view (view_container_type &vcont, domain_type const &dom, MapFunc mfunc, distribution_spec_view const &other)
 
bool arbitrary (void) const
 
distribution_type distribution (void)
 
view_container_type * get_container (void) const
 
view_container_type & container (void) const
 
domain_type & domain (void)
 
domain_type const & domain (void) const
 
std::shared_ptr< map_func_typemapfunc (void)
 
const std::shared_ptr< map_func_typemapfunc (void) const
 
size_type size (void) const
 
bool empty (void) const
 
reference operator[] (index_type index) const
 
reference make_reference (index_type index) const
 
boost::shared_ptr< distribution_spec_view< C, Dom, GID, CID > > shared_from_this ()
 

Public Types

typedef C::gid_type value_type
 
typedef C::gid_type reference
 
typedef const C::gid_type const_reference
 
typedef dist_spec_impl::mapping_base< typename Dom::index_type, typename C::gid_type, GID, CID > map_function
 
typedef map_function map_func_type
 
typedef Dom domain_type
 
typedef Dom::index_type index_type
 
typedef Dom::index_type gid_type
 
typedef C view_container_type
 

Public Attributes

C * m_ptr
 
sptr_type m_sptr
 

Protected Member Functions

C * container_ptr (void) const
 Returns the container's pointer.
 

Detailed Description

template<typename C, typename Dom, typename GID, typename CID>
class stapl::distribution_spec_view< C, Dom, GID, CID >

One dimensional read only view used to specify data distribution.

Provides a random access operation that performs the mapping of container element ids to partition ids and, ultimately, to location ids. The type of the mapping function is not modifiable, as the class uses mapping_base to allow implementation of mapping function update operations. The use of mapping_base is in support of the update_distribution method of containers that utilize view-based distributions, in particular arbitrary mappings of elements to locations.

Template Parameters
CType of the underlying "container" is either a view over the partition id space or location id space.
DomType of the domain of the indices being mapped.

Constructor & Destructor Documentation

◆ distribution_spec_view()

template<typename C , typename Dom , typename GID , typename CID >
template<typename MapFunc >
stapl::distribution_spec_view< C, Dom, GID, CID >::distribution_spec_view ( view_container_type *  vcont,
domain_type const &  dom,
MapFunc  mfunc,
bool  arbitrary 
)

Constructs a view over either the location or partition id space with a domain that represents the GID or partition id space, respectively. The mapping function maps from the space of the domain to an index in the space of the container. The view takes ownership of the container.

Parameters
vcontpointer to the container representing space on which view elements will be mapped.
domdomain representing the set of elements to be mapped on to the id space defined by the container.
mfuncmapping function to transform view indices to container gids.
arbitraryoptional flag indicating whether the view is part of an arbitrary distribution specification

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