STAPL API Reference          
Overview   Containers   Algorithms   Views   Skeletons   Run-Time System
Modules     Classes    
Classes | Functions
+ Collaboration diagram for Counting:

Classes

struct  stapl::view_impl::counting_container< T, N, Policy >
 Container that represents an increasing sequence of elements. More...
 
struct  stapl::result_of::counting_view< T, Policy >
 Defines the type of a counting view parameterized with T. More...
 

Functions

template<typename T , typename Policy = view_impl::default_container>
result_of::counting_view< T, Policy >::type stapl::counting_view (size_t n, T init=0)
 Helper function that creates a read-only view representing a set of increasing elements. More...
 

Detailed Description

Function Documentation

◆ counting_view()

template<typename T , typename Policy = view_impl::default_container>
result_of::counting_view<T, Policy>::type stapl::counting_view ( size_t  n,
init = 0 
)

Helper function that creates a read-only view representing a set of increasing elements.

Parameters
nnumber of elements provided for the counting_view.
initinitial value from which to start counting.
Returns
a counting_view that represents an increasing set of n elements starting from init.