STAPL API Reference          
Overview   Containers   Algorithms   Views   Skeletons   Run-Time System
Modules     Classes    
Functions

View that maps element ids to partition ids. More...

+ Collaboration diagram for Partitioning:

Functions

template<typename MappingView , typename GIDDomain , typename PartitioningFunction >
distribution_spec_view< MappingView, GIDDomain, typename GIDDomain::index_type, typename MappingView::index_type > stapl::partitioning_view (MappingView &mapping_view, GIDDomain const &domain, PartitioningFunction const &partitioning_func)
 Creates a read-only view whose domain is the identifiers of a container's elements and whose mapping function maps from element GID to partition id. More...
 

Detailed Description

View that maps element ids to partition ids.

Function Documentation

◆ partitioning_view()

template<typename MappingView , typename GIDDomain , typename PartitioningFunction >
distribution_spec_view<MappingView, GIDDomain, typename GIDDomain::index_type, typename MappingView::index_type> stapl::partitioning_view ( MappingView &  mapping_view,
GIDDomain const &  domain,
PartitioningFunction const &  partitioning_func 
)

Creates a read-only view whose domain is the identifiers of a container's elements and whose mapping function maps from element GID to partition id.

When the partitioning_view is defined over a mapping_view the result is a view which defines the distribution of container elements across the locations of the system.

Parameters
mapping_viewview that will map the partition ids to locations
domainSet of element GIDs to be partitioned.
partitioning_funcUnary functor that receives a GID and returns a partition id.
Returns
A view capable of partitioning GIDs of container elements.