STAPL API Reference          
Overview   Containers   Algorithms   Views   Skeletons   Run-Time System
Modules     Classes    
List of all members | Public Member Functions | Public Types
stapl::view_impl::counting_container< T, N, Policy > Struct Template Reference

Container that represents an increasing sequence of elements. More...

Public Member Functions

 counting_container (size_type size, T init)
 
distribution_type * get_distribution (void)
 
distribution_type & distribution (void)
 
value_type get_element (gid_type const &index) const
 
reference operator[] (gid_type const &index)
 
template<typename F >
F::result_type apply_get (gid_type const &index, F const &f)
 Applies the provided function the the value referenced for the given index returning the resulting value. More...
 
reference make_reference (gid_type const &index)
 Returns a reference to the element indexed. More...
 
template<typename... Indices>
reference make_reference (Indices... indices)
 
size_type size (void) const
 
domain_type const & domain (void) const
 
locality_info locality (gid_type const &) const
 
location_type get_location_id (void) const noexcept
 Returns the location id of the counting_container_distribution.
 
dimensions_type dimensions (void) const
 

Public Types

using value_type = T
 
using reference = proxy< T, trivial_accessor< T > >
 
using const_reference = reference
 
using distribution_type = typename compute_distribution< T, N, Policy >::type
 
using partition_type = typename distribution_type::partition_type
 
using domain_type = typename distribution_type::domain_type
 
using dimension_type = typename dimension_traits< domain_type >::type
 
using dimensions_type = typename domain_type::dimensions_type
 
using index_type = typename domain_type::index_type
 
using gid_type = index_type
 
using cid_type = typename distribution_type::cid_type
 
using size_type = typename domain_type::size_type
 
using loc_dist_metadata = typename compute_distribution< T, N, Policy >::loc_dist_metadata
 
typedef std::true_type task_placement_dontcare
 

Detailed Description

template<typename T, int N, typename Policy>
struct stapl::view_impl::counting_container< T, N, Policy >

Container that represents an increasing sequence of elements.

Template Parameters
Telement type
NThe dimensionality of the container.

Constructor & Destructor Documentation

◆ counting_container()

template<typename T , int N, typename Policy >
stapl::view_impl::counting_container< T, N, Policy >::counting_container ( size_type  size,
init 
)
Parameters
sizenumber of elements provided for the container.
initinitial value from which to start counting.

Member Function Documentation

◆ apply_get()

template<typename T , int N, typename Policy >
template<typename F >
F::result_type stapl::view_impl::counting_container< T, N, Policy >::apply_get ( gid_type const &  index,
F const &  f 
)

Applies the provided function the the value referenced for the given index returning the resulting value.

Parameters
indexof element to apply the function
ffunction to apply
Returns
result of evaluate the function f on the value referenced for the index

◆ make_reference()

template<typename T , int N, typename Policy >
reference stapl::view_impl::counting_container< T, N, Policy >::make_reference ( gid_type const &  index)

Returns a reference to the element indexed.

Parameters
indexof element to return
Returns
element reference

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