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

Defines a multi-dimensional domain where the indexes are consecutive and enumerable in each dimension. More...

Public Member Functions

 indexed_domain (size_type size)
 Constructs a domain [0..size-1].
 
 indexed_domain (index_type const &first, index_type const &last, bool full_container=false)
 Construct a domain containing the indexes from first to last (included). More...
 
 indexed_domain (index_type const &first, index_type const &last, indexed_domain const &other)
 Constructs a new domain by restricting the given other domain to be [first..last].
 
index_type open_last (void) const
 Returns termination value for comparison.
 
template<typename Distance >
index_type advance (index_type const &i, Distance m) const
 Returns the index resulting from advancing the index i, n positions. More...
 
indexed_domain operator & (indexed_domain const &other) const
 Returns the resulting intersection with the given other domain.
 

Public Types

using traversal_type = typename tuple_element< 0, typename compute_type_parameters< tuple< typename default_traversal< N >::type >, OptionalTraversal... >::type >::type
 
using index_type = typename homogeneous_tuple_type< N, T >::type
 
using gid_type = typename homogeneous_tuple_type< N, T >::type
 
using size_type = typename homogeneous_tuple_type< N, size_t >::type
 
using linear_size_type = size_t
 

Detailed Description

template<typename T, int N, typename ... OptionalTraversal>
class stapl::indexed_domain< T, N, OptionalTraversal >

Defines a multi-dimensional domain where the indexes are consecutive and enumerable in each dimension.

The domain is defined as a range of indexes between first index and last index (included) $ [first..last]$. This defines a convex region in the multi-dimensional space.

Template Parameters
TIndex type.
Note
T must be and integral type.

Constructor & Destructor Documentation

◆ indexed_domain()

template<typename T, int N, typename ... OptionalTraversal>
stapl::indexed_domain< T, N, OptionalTraversal >::indexed_domain ( index_type const &  first,
index_type const &  last,
bool  full_container = false 
)

Construct a domain containing the indexes from first to last (included).

If full_container is specified as true, the domain will be flagged as a domain that contains all the indexes of a container.

Member Function Documentation

◆ advance()

template<typename T, int N, typename ... OptionalTraversal>
template<typename Distance >
index_type stapl::indexed_domain< T, N, OptionalTraversal >::advance ( index_type const &  i,
Distance  m 
) const

Returns the index resulting from advancing the index i, n positions.

Template Parameters
DistanceIntegral type.

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