STAPL API Reference          
Overview   Containers   Algorithms   Views   Skeletons   Run-Time System
Modules     Classes    
List of all members | Public Member Functions | Public Types
stapl::vector< T, OptionalParams > Class Template Reference

Parallel Vector container. More...

Public Member Functions

std::enable_if<(is_distribution_view< DistSpecView >::value||detail::has_is_composed_dist_spec< DistSpecView >::value) &&is_view_based< partition_type >::value &&is_view_based< mapper_type >::value >::type redistribute (DistSpecView const &dist_view)
 Redistribute the data stored in the container to match the distribution specified by the distribution view provided. More...
 
std::enable_if<(is_distribution_view< DistSpecView >::value||detail::has_is_composed_dist_spec< DistSpecView >::value) &&is_view_based< partition_type >::value &&is_view_based< mapper_type >::value >::type redistribute (DistSpecView const *dist_view)
 Redistribute the data stored in the container to match the distribution specified by the distribution view provided. More...
 
void destroy (void)
 Used as a target method for rmis implementing one-sided destruction, as a pointer to member variable referring to the destructor cannot be initialized, per the standard. Used when container is an element of another container.
 
size_t get_num_locations (void) const
 
location_type get_location_id (void) const
 
boost::shared_ptr< vector< T, OptionalParams... > > shared_from_this ()
 
Constructors

Distribution metadata type used for coarsening

 vector (void)
 
 vector (size_t n)
 Construct a vector with of size n. More...
 
 vector (size_t n, value_type const &default_value)
 Construct a vector with of size n filled with value default_value. More...
 
 vector (partition_type const &ps)
 Construct a vector given a partitioner. More...
 
 vector (partition_type const &ps, value_type const &default_value)
 Create an array with a given instance of partition and construct all elements with a default value. More...
 
 vector (size_t n, mapper_type const &mapper)
 Construct a vector given a mapper. More...
 
 vector (partition_type const &partitioner, mapper_type const &mapper)
 Construct a vector given a partitioner and a mapper. More...
 
template<typename DistSpecView >
 vector (DistSpecView const &dist_view, typename std::enable_if< is_distribution_view< DistSpecView >::value &&!detail::has_is_composed_dist_spec< DistSpecView >::value >::type *=0)
 Create a vector with a distribution that is specified by the dist_view provided. More...
 
template<typename DistSpecView >
 vector (DistSpecView const &dist_view, value_type const &default_value, typename std::enable_if< is_distribution_view< DistSpecView >::value &&!detail::has_is_composed_dist_spec< DistSpecView >::value >::type *=0)
 Create a vector with a distribution that is specified by the dist_view provided, and initialize all elements to default_value. More...
 
template<typename DP >
 vector (size_t n, value_type const &default_value, DP const &dis_policy)
 Create a vector with a given size and default value where the value type of the container is itself a parallel container. More...
 
template<typename X , typename Y >
 vector (boost::tuples::cons< X, Y > dims)
 Create a vector of vectors with given n-dimensional size. More...
 
template<typename X , typename Y , typename DP >
 vector (boost::tuples::cons< X, Y > dims, DP const &dis_policy)
 Create a vector of vectors with given n-dimensional size. More...
 
template<typename SizesView >
 vector (SizesView const &sizes_view, typename boost::enable_if< boost::mpl::and_< std::is_same< size_type, typename SizesView::size_type >, boost::mpl::not_< is_distribution_view< SizesView > > > >::type *=0)
 Constructor for composed containers. For an m level composed container, sizes_view is an m-1 level composed view representing the sizes of the nested containers.
 
template<typename ComposedSpec >
 vector (ComposedSpec const &comp_spec, typename std::enable_if< detail::has_is_composed_dist_spec< ComposedSpec >::value >::type *=0)
 Constructor for composed containers. For an m level composed container, comp_spec contains specifications of the distributions of the current container and each of its elements. More...
 
template<typename DistSpecView >
 vector (std::vector< DistSpecView > const &dist_specs, typename std::enable_if< is_distribution_view< DistSpecView >::value &&!detail::has_is_composed_dist_spec< DistSpecView >::value >::type *=0)
 Constructor for composed containers. For an m level composed container, dist_specs contains specifications of the distributions to be used at each level of the composed container. More...
 
Memory and Domain Management
void resize (size_type n)
 Destroy the distribution of the container (including all of its elements) and recreate the container with a different size. More...
 
void flush (void)
 Flushes out all pending requests to the vector. More...
 
Element Manipulation
void set_element (index_type const &idx, value_type const &val)
 Sets the element specified by the index to the provided value. More...
 
void set_elements (index_type const &idx, View &&vals)
 Sets a range of elements starting with a given index to a sequence of provided values. More...
 
value_type get_element (index_type const &idx) const
 Returns the value of the element specified by the index. More...
 
future< value_type > get_element_split (index_type const &idx)
 Returns a stapl::future holding the value of the element specified by the index. More...
 
void apply_set (gid_type const &gid, F const &f)
 Applies a function f to the element specified by the GID. More...
 
F::result_type apply_get (gid_type const &gid, F const &f)
 Applies a function f to the element specified by the GID, and returns the result. More...
 
F::result_type apply_get (gid_type const &gid, F const &f) const
 Applies a function f to the element specified by the GID, and returns the result. More...
 

Public Types

typedef base_type::distribution_type distribution_type
 
typedef traits_type::manager_type manager_type
 
typedef T value_type
 
typedef traits_type::domain_type domain_type
 
typedef domain_type::index_type gid_type
 
typedef gid_type index_type
 
typedef size_t size_type
 
typedef mapper_type::domain_type map_dom_t
 Domain used by the mapper.
 
typedef distribution_type::const_iterator const_iterator
 

Memory and Domain Management

domain_type domain (void) const
 
void migrate (gid_type const &gid, location_type destination)
 Migrates the element specified by the gid to the destination location. More...
 
size_type size (void) const
 Return the number of elements in the container. More...
 
bool empty (void) const
 
distribution_type & distribution (void)
 
distribution_type const & distribution (void) const
 
distribution_type * get_distribution (void)
 
locality_info locality (gid_type gid)
 Return locality information about the element specified by the gid. More...
 
bool is_local (Indices const &... i) const
 Returns true if the element specified by the GID formed from the index components provided is stored on this location, or false otherwise.
 
rmi_handle::reference get_rmi_handle_reference (void)
 
std::shared_ptr< DistSpecView > get_spec (DistSpecView const &dist_view, typename std::enable_if< !detail::has_is_composed_dist_spec< DistSpecView >::value >::type *=0)
 Return a shared_ptr to the distribution specification for this container instance. More...
 
std::shared_ptr< typename ComposedSpec::distribution_spec > get_spec (ComposedSpec const &dist_view, typename std::enable_if< detail::has_is_composed_dist_spec< ComposedSpec >::value >::type *=0)
 Return a shared_ptr to the distribution specification for this container instance that is part of a composed container instantiation. More...
 

Element Manipulation

reference operator[] (gid_type const &gid)
 Construct a reference to a specific gid of the vector. More...
 
reference front (void)
 Construct a reference to the first element of the vector. More...
 
reference back (void)
 Construct a reference to the last element of the vector. More...
 
void add (value_type const &val)
 Insert locally a new element into the container. More...
 
template<typename View = vector_view<vector>>
void insert (gid_type const &gid, value_type const &val, View *view=nullptr)
 Add an element val at the gid position. More...
 
template<typename View = vector_view<vector>>
void erase (gid_type const &gid, View *view=nullptr)
 Remove an element from the container. More...
 
void clear (void)
 Remove all elements from the container. More...
 
template<typename View = vector_view<vector>>
void push_back (value_type const &v, View *view=nullptr)
 Add an element at the end of the vector. More...
 
template<typename View = vector_view<vector>>
void pop_back (View *view=nullptr)
 Removes the last element of the vector. More...
 
iterator begin (void)
 Construct an iterator to the beginning of the vector. More...
 
const_iterator begin (void) const
 Construct a const_iterator to the beginning of the vector. More...
 
const_iterator cbegin (void) const
 Construct a const_iterator to the beginning of the vector. More...
 
iterator end (void)
 Construct an iterator to the end of the vector. More...
 
const_iterator end (void) const
 Construct a const_iterator to the end of the vector. More...
 
const_iterator cend (void) const
 Construct a const_iterator to the end of the vector. More...
 
iterator make_iterator (index_type const &index)
 Construct an iterator to a specific index of the vector. More...
 
const_iterator make_const_iterator (index_type const &index) const
 Construct a const_iterator to a specific index of the vector. More...
 
reference make_reference (index_type const &index)
 Construct a reference to a specific index of the vector. More...
 
template<typename View >
void insert_local (gid_type const &gid, value_type const &val, View *view)
 Add an element val at the gid position. More...
 
template<typename View >
void erase_local (gid_type const &gid, View *view)
 remove an element from the container. More...
 

Detailed Description

template<typename T, typename ... OptionalParams>
class stapl::vector< T, OptionalParams >

Parallel Vector container.

Template Parameters
TType of the stored elements in the container.
PSPartition strategy that defines how to partition the original domain into subdomains. The default partition is balanced_partition.
MMapper that defines how to map the subdomains produced by the partition to locations. The default mapper is mapper.
TraitsA traits class that defines customizable components of the vector container.

Constructor & Destructor Documentation

◆ vector() [1/13]

template<typename T, typename ... OptionalParams>
stapl::vector< T, OptionalParams >::vector ( size_t  n)

Construct a vector with of size n.

Parameters
nSize of the vector.

◆ vector() [2/13]

template<typename T, typename ... OptionalParams>
stapl::vector< T, OptionalParams >::vector ( size_t  n,
value_type const &  default_value 
)

Construct a vector with of size n filled with value default_value.

Parameters
nSize of the vector.
default_valueValue given at initialization.

◆ vector() [3/13]

template<typename T, typename ... OptionalParams>
stapl::vector< T, OptionalParams >::vector ( partition_type const &  ps)

Construct a vector given a partitioner.

Parameters
psAn instance of the partitioner to use for the distribution.

◆ vector() [4/13]

template<typename T, typename ... OptionalParams>
stapl::vector< T, OptionalParams >::vector ( partition_type const &  ps,
value_type const &  default_value 
)

Create an array with a given instance of partition and construct all elements with a default value.

Parameters
psAn instance of a partition to use for distribution
default_valueThe initial value of the elements in the container

◆ vector() [5/13]

template<typename T, typename ... OptionalParams>
stapl::vector< T, OptionalParams >::vector ( size_t  n,
mapper_type const &  mapper 
)

Construct a vector given a mapper.

Parameters
nSize of the vector.
mapperAn instance of the mapper to use for the distribution.

◆ vector() [6/13]

template<typename T, typename ... OptionalParams>
stapl::vector< T, OptionalParams >::vector ( partition_type const &  partitioner,
mapper_type const &  mapper 
)

Construct a vector given a partitioner and a mapper.

Parameters
partitionerAn instance of the partitioner to use for the distribution.
mapperAn instance of the mapper to use for the distribution.

◆ vector() [7/13]

template<typename T, typename ... OptionalParams>
template<typename DistSpecView >
stapl::vector< T, OptionalParams >::vector ( DistSpecView const &  dist_view,
typename std::enable_if< is_distribution_view< DistSpecView >::value &&!detail::has_is_composed_dist_spec< DistSpecView >::value >::type *  = 0 
)

Create a vector with a distribution that is specified by the dist_view provided.

Parameters
dist_viewview that specifies the mapping of container GIDs to partition ids, and partition ids to location ids.

Distribution Specifications contains a set of functions to create views for common data distributions.

◆ vector() [8/13]

template<typename T, typename ... OptionalParams>
template<typename DistSpecView >
stapl::vector< T, OptionalParams >::vector ( DistSpecView const &  dist_view,
value_type const &  default_value,
typename std::enable_if< is_distribution_view< DistSpecView >::value &&!detail::has_is_composed_dist_spec< DistSpecView >::value >::type *  = 0 
)

Create a vector with a distribution that is specified by the dist_view provided, and initialize all elements to default_value.

Parameters
dist_viewview that specifies the mapping of container GIDs to partition ids, and partition ids to location ids.
default_valuevalue to assign to each element in the container.

Distribution Specifications contains a set of functions to create views for common data distributions.

◆ vector() [9/13]

template<typename T, typename ... OptionalParams>
template<typename DP >
stapl::vector< T, OptionalParams >::vector ( size_t  n,
value_type const &  default_value,
DP const &  dis_policy 
)

Create a vector with a given size and default value where the value type of the container is itself a parallel container.

Parameters
nThe size of the vector.
default_valueThe initial value of the elements in the container.
dis_policyA distribution policy that specifies how to distribute the nested containers, in the context of containers of containers.

◆ vector() [10/13]

template<typename T, typename ... OptionalParams>
template<typename X , typename Y >
stapl::vector< T, OptionalParams >::vector ( boost::tuples::cons< X, Y >  dims)

Create a vector of vectors with given n-dimensional size.

Parameters
dimsA cons list specifying the dimensions of the containers.

◆ vector() [11/13]

template<typename T, typename ... OptionalParams>
template<typename X , typename Y , typename DP >
stapl::vector< T, OptionalParams >::vector ( boost::tuples::cons< X, Y >  dims,
DP const &  dis_policy 
)

Create a vector of vectors with given n-dimensional size.

Parameters
dimsA cons list specifying the dimensions of the containers.
dis_policyA distribution policy that specifies how to distribute the nested containers.

◆ vector() [12/13]

template<typename T, typename ... OptionalParams>
template<typename ComposedSpec >
stapl::vector< T, OptionalParams >::vector ( ComposedSpec const &  comp_spec,
typename std::enable_if< detail::has_is_composed_dist_spec< ComposedSpec >::value >::type *  = 0 
)

Constructor for composed containers. For an m level composed container, comp_spec contains specifications of the distributions of the current container and each of its elements.

The specification of the current container's distribution is accessed by calling the spec() method, while the distribution specification of an element is accessed via operator[].

Parameters
comp_specInstance of composed_dist_spec representing the distribution specifications for each nested container.

◆ vector() [13/13]

template<typename T, typename ... OptionalParams>
template<typename DistSpecView >
stapl::vector< T, OptionalParams >::vector ( std::vector< DistSpecView > const &  dist_specs,
typename std::enable_if< is_distribution_view< DistSpecView >::value &&!detail::has_is_composed_dist_spec< DistSpecView >::value >::type *  = 0 
)

Constructor for composed containers. For an m level composed container, dist_specs contains specifications of the distributions to be used at each level of the composed container.

The first element of the vector specifies the distribution of the outer container, the second the distribution of the containers at the first level of composition, etc. The number of elements in dist_specs must be at least the same as the number of levels of container composition.

The result of the constructor is a container composition where the size and distribution of the container elements at a given level of the composition are the same.

Parameters
dist_specsdistribution specifications that are used to construct the nested containers at a given level of the composition.

Member Function Documentation

◆ insert_local()

template<typename T, typename ... OptionalParams>
template<typename View >
void stapl::vector< T, OptionalParams >::insert_local ( gid_type const &  gid,
value_type const &  val,
View *  view 
)
protected

Add an element val at the gid position.

Parameters
gidThe index to insert the element.
valThe element to add.
viewPointer to a Vector over this vector (used to keep the domains of the container and the view in sync) or nullptr if the vector is used directly.

◆ erase_local()

template<typename T, typename ... OptionalParams>
template<typename View >
void stapl::vector< T, OptionalParams >::erase_local ( gid_type const &  gid,
View *  view 
)
protected

remove an element from the container.

Parameters
gidthe gid referencing the element to delete.
viewPointer to a Vector over this vector (used to keep the domains of the container and the view in sync) or nullptr if the vector is used directly.

◆ operator[]()

template<typename T, typename ... OptionalParams>
reference stapl::vector< T, OptionalParams >::operator[] ( gid_type const &  gid)

Construct a reference to a specific gid of the vector.

Parameters
gidThe gid for which to create the reference.
Returns
A proxy of the value at idx.

◆ front()

template<typename T, typename ... OptionalParams>
reference stapl::vector< T, OptionalParams >::front ( void  )

Construct a reference to the first element of the vector.

Returns
A proxy of the value of the element returned.

◆ back()

template<typename T, typename ... OptionalParams>
reference stapl::vector< T, OptionalParams >::back ( void  )

Construct a reference to the last element of the vector.

Returns
A proxy of the value of the element returned.

◆ add()

template<typename T, typename ... OptionalParams>
void stapl::vector< T, OptionalParams >::add ( value_type const &  val)

Insert locally a new element into the container.

Parameters
valThe value to insert.

◆ insert()

template<typename T, typename ... OptionalParams>
template<typename View = vector_view<vector>>
void stapl::vector< T, OptionalParams >::insert ( gid_type const &  gid,
value_type const &  val,
View *  view = nullptr 
)

Add an element val at the gid position.

Parameters
gidThe index to insert the element.
valThe element to add.
viewPointer to a Vector over this vector. Should be provided if this vector is used as the underlying container of a Vector, so that the container can notify the view of any change to the domain it makes.

◆ erase()

template<typename T, typename ... OptionalParams>
template<typename View = vector_view<vector>>
void stapl::vector< T, OptionalParams >::erase ( gid_type const &  gid,
View *  view = nullptr 
)

Remove an element from the container.

Parameters
gidThe gid referencing the element to delete.
viewPointer to a Vector over this vector. Should be provided if this vector is used as the underlying container of a Vector, so that the container can notify the view of any change to the domain it makes.

◆ clear()

template<typename T, typename ... OptionalParams>
void stapl::vector< T, OptionalParams >::clear ( void  )

Remove all elements from the container.

Note
This method must be called by all locations in the gang on which the container is instantiated.

◆ push_back()

template<typename T, typename ... OptionalParams>
template<typename View = vector_view<vector>>
void stapl::vector< T, OptionalParams >::push_back ( value_type const &  v,
View *  view = nullptr 
)

Add an element at the end of the vector.

Parameters
vThe element to add.
viewPointer to a Vector over this vector. Should be provided if this vector is used as the underlying container of a Vector, so that the container can notify the view of any change to the domain it makes.

◆ pop_back()

template<typename T, typename ... OptionalParams>
template<typename View = vector_view<vector>>
void stapl::vector< T, OptionalParams >::pop_back ( View *  view = nullptr)

Removes the last element of the vector.

Parameters
viewPointer to a Vector over this vector. Should be provided if this vector is used as the underlying container of a Vector, so that the container can notify the view of any change to the domain it makes.

◆ begin() [1/2]

template<typename T, typename ... OptionalParams>
iterator stapl::vector< T, OptionalParams >::begin ( void  )

Construct an iterator to the beginning of the vector.

Returns
A global iterator.

◆ begin() [2/2]

template<typename T, typename ... OptionalParams>
const_iterator stapl::vector< T, OptionalParams >::begin ( void  ) const

Construct a const_iterator to the beginning of the vector.

Returns
A global const_iterator.

◆ cbegin()

template<typename T, typename ... OptionalParams>
const_iterator stapl::vector< T, OptionalParams >::cbegin ( void  ) const

Construct a const_iterator to the beginning of the vector.

Returns
A global const_iterator.

◆ end() [1/2]

template<typename T, typename ... OptionalParams>
iterator stapl::vector< T, OptionalParams >::end ( void  )

Construct an iterator to the end of the vector.

Returns
A global iterator of the end.

◆ end() [2/2]

template<typename T, typename ... OptionalParams>
const_iterator stapl::vector< T, OptionalParams >::end ( void  ) const

Construct a const_iterator to the end of the vector.

Returns
A global const_iterator of the end.

◆ cend()

template<typename T, typename ... OptionalParams>
const_iterator stapl::vector< T, OptionalParams >::cend ( void  ) const

Construct a const_iterator to the end of the vector.

Returns
A global const_iterator of the end.

◆ make_iterator()

template<typename T, typename ... OptionalParams>
iterator stapl::vector< T, OptionalParams >::make_iterator ( index_type const &  index)

Construct an iterator to a specific index of the vector.

Parameters
indexThe index for which to create the iterator.
Returns
An iterator to the value at index.

◆ make_const_iterator()

template<typename T, typename ... OptionalParams>
const_iterator stapl::vector< T, OptionalParams >::make_const_iterator ( index_type const &  index) const

Construct a const_iterator to a specific index of the vector.

Parameters
indexThe index for which to create the const_iterator.
Returns
A const_iterator to the value at index.

◆ make_reference()

template<typename T, typename ... OptionalParams>
reference stapl::vector< T, OptionalParams >::make_reference ( index_type const &  index)

Construct a reference to a specific index of the vector.

Parameters
indexThe index for which to create the reference.
Returns
A proxy of the value at index.

◆ resize()

template<typename T, typename ... OptionalParams>
void stapl::vector< T, OptionalParams >::resize ( size_type  n)

Destroy the distribution of the container (including all of its elements) and recreate the container with a different size.

Parameters
nThe new size of the vector.

◆ flush()

template<typename T, typename ... OptionalParams>
void stapl::vector< T, OptionalParams >::flush ( void  )

Flushes out all pending requests to the vector.

This is used in conjunction with add() to insert elements into the container without saturating the communication subsystem with metadata update requests.

◆ redistribute() [1/2]

std::enable_if< (is_distribution_view<DistSpecView>::value || detail::has_is_composed_dist_spec<DistSpecView>::value) && is_view_based<partition_type>::value && is_view_based<mapper_type>::value>::type stapl::container< vector< T, OptionalParams... > , bool >::redistribute ( DistSpecView const &  dist_view)
inherited

Redistribute the data stored in the container to match the distribution specified by the distribution view provided.

Parameters
dist_viewView-based specification of the desired distribution.
Note
The method is only available in array instances that use view_based_partition and view_based_mapper as their partition and mapper types, respectively.

◆ redistribute() [2/2]

std::enable_if< (is_distribution_view<DistSpecView>::value || detail::has_is_composed_dist_spec<DistSpecView>::value) && is_view_based<partition_type>::value && is_view_based<mapper_type>::value>::type stapl::container< vector< T, OptionalParams... > , bool >::redistribute ( DistSpecView const *  dist_view)
inherited

Redistribute the data stored in the container to match the distribution specified by the distribution view provided.

Parameters
dist_viewView-based specification of the desired distribution.

This function is invoked from the proxy when nested containers are being redistributed.

Note
The method is only available in array instances that use view_based_partition and view_based_mapper as their partition and mapper types, respectively.

◆ set_element()

void stapl::detail::container_impl< vector< T, OptionalParams... > >::set_element ( index_type const &  idx,
value_type const &  val 
)
inherited

Sets the element specified by the index to the provided value.

Parameters
idxGID of the element to be set.
valThe new value of the element.

◆ set_elements()

void stapl::detail::container_impl< vector< T, OptionalParams... > >::set_elements ( index_type const &  idx,
View &&  vals 
)
inherited

Sets a range of elements starting with a given index to a sequence of provided values.

Parameters
idxGID of start of element range to be set.
valsThe new values to be assigned to the element range.

◆ get_element()

value_type stapl::detail::container_impl< vector< T, OptionalParams... > >::get_element ( index_type const &  idx) const
inherited

Returns the value of the element specified by the index.

Parameters
idxGID of the element to be retrieved.
Returns
The value of the element.

◆ get_element_split()

future<value_type> stapl::detail::container_impl< vector< T, OptionalParams... > >::get_element_split ( index_type const &  idx)
inherited

Returns a stapl::future holding the value of the element specified by the index.

Parameters
idxGID of the element to be set.
Returns
The future holding the value of the element.

◆ apply_set()

void stapl::detail::container_impl< vector< T, OptionalParams... > >::apply_set ( gid_type const &  gid,
F const &  f 
)
inherited

Applies a function f to the element specified by the GID.

Parameters
gidThe GID of the element.
fThe Functor to apply on the element.

◆ apply_get() [1/2]

F::result_type stapl::detail::container_impl< vector< T, OptionalParams... > >::apply_get ( gid_type const &  gid,
F const &  f 
)
inherited

Applies a function f to the element specified by the GID, and returns the result.

Parameters
gidThe GID of the element.
fThe Functor to apply on the element.
Returns
The result of applying the functor to the element.

◆ apply_get() [2/2]

F::result_type stapl::detail::container_impl< vector< T, OptionalParams... > >::apply_get ( gid_type const &  gid,
F const &  f 
) const
inherited

Applies a function f to the element specified by the GID, and returns the result.

Parameters
gidThe GID of the element.
fThe Functor to apply on the element.
Returns
The result of applying the functor to the element.

◆ domain()

domain_type stapl::detail::container_impl< vector< T, OptionalParams... > >::domain ( void  ) const
inherited

◆ migrate()

void stapl::detail::container_impl< vector< T, OptionalParams... > >::migrate ( gid_type const &  gid,
location_type  destination 
)
inherited

Migrates the element specified by the gid to the destination location.

Parameters
gidGID of the element to be migrated.
destinationId of the location where the element is to be migrated.

◆ size()

size_type stapl::detail::container_impl< vector< T, OptionalParams... > >::size ( void  ) const
inherited

Return the number of elements in the container.

This method is one-sided, If other locations may be concurrently performing operations that change their local size and the effects are desired to be observed in a deterministic way, then appropriate synchronization, e.g. a fence, may be required before or after the call to size, to enforce appropriate ordering.

◆ locality()

locality_info stapl::detail::container_impl< vector< T, OptionalParams... > >::locality ( gid_type  gid)
inherited

Return locality information about the element specified by the gid.

Returns
A locality_qualifier, affinity specifier, as well as this object's handle and associated location for this affinity.

◆ get_spec() [1/2]

std::shared_ptr<DistSpecView> stapl::detail::container_impl< vector< T, OptionalParams... > >::get_spec ( DistSpecView const &  dist_view,
typename std::enable_if< !detail::has_is_composed_dist_spec< DistSpecView >::value >::type *  = 0 
)
protectedinherited

Return a shared_ptr to the distribution specification for this container instance.

This function is called by redistribute when the distribution specification provided is for a single container instance instead of a collection of composed container instance.

Parameters
dist_viewInstantiation of distribution_spec that describes the target distribution for redistribute
Returns
shared_ptr to the distribution specification

◆ get_spec() [2/2]

std::shared_ptr<typename ComposedSpec::distribution_spec> stapl::detail::container_impl< vector< T, OptionalParams... > >::get_spec ( ComposedSpec const &  dist_view,
typename std::enable_if< detail::has_is_composed_dist_spec< ComposedSpec >::value >::type *  = 0 
)
protectedinherited

Return a shared_ptr to the distribution specification for this container instance that is part of a composed container instantiation.

This function is called by redistribute when the distribution specification provided is for all container instances of a composed container.

Parameters
dist_viewInstantiation of composed_dist_spec that describes the target distributions for redistribute for all container instances in a composed container
Returns
shared_ptr to the distribution specification for this container instance

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