STAPL API Reference          
Overview   Containers   Algorithms   Views   Skeletons   Run-Time System
Modules     Classes    
List of all members | Public Types
stapl::view_operations::sequence< Derived, Iterator > Class Template Reference

Defines the operation found in sequence containers (e.g. list) used to traverse the elements. More...

Public Member Functions

Sequence Iterator
Warning
Methods in the Sequence Iterator group should only be used inside a work function which is processing a segmented view.
iterator begin (void)
 
iterator end (void)
 
iterator make_iterator (index_t i)
 
const_iterator begin (void) const
 
const_iterator end (void) const
 
index_t next (index_t const &index) const
 Computes the next index based on the given index. More...
 
index_t prev (index_t const &index) const
 Computes the previous index based on the given index. More...
 
template<typename Distance >
index_t advance (index_t const &index, Distance n) const
 Computes the new index after advance n positions from the given index. More...
 
long distance (index_t const &index1, index_t const &index2) const
 
bool less_than (index_t const &index1, index_t const &index2) const
 

Public Types

typedef select_parameter< Iterator, typename detail::iterator_selector< Derived, value_t >::type >::type iterator
 
typedef select_parameter< Iterator, typename detail::const_iterator_selector< Derived, value_t >::type >::type const_iterator
 
typedef detail::make_iterator< Derived, iteratormake_iterator_t
 

Detailed Description

template<typename Derived, typename Iterator = use_default>
class stapl::view_operations::sequence< Derived, Iterator >

Defines the operation found in sequence containers (e.g. list) used to traverse the elements.

Member Function Documentation

◆ next()

template<typename Derived, typename Iterator = use_default>
index_t stapl::view_operations::sequence< Derived, Iterator >::next ( index_t const &  index) const

Computes the next index based on the given index.

Overwriting this method allows produce a different way to traverse the elements referenced by the view.

◆ prev()

template<typename Derived, typename Iterator = use_default>
index_t stapl::view_operations::sequence< Derived, Iterator >::prev ( index_t const &  index) const

Computes the previous index based on the given index.

Overwriting this method allows produce a different way to traverse the elements referenced by the view.

◆ advance()

template<typename Derived, typename Iterator = use_default>
template<typename Distance >
index_t stapl::view_operations::sequence< Derived, Iterator >::advance ( index_t const &  index,
Distance  n 
) const

Computes the new index after advance n positions from the given index.

Overwriting this method allows produce a different way to traverse the elements referenced by the view.


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