Specialization for a one-dimensional domain where the indexes are consecutive and numerable. More...
Public Member Functions | |
| indexed_domain (size_type size) | |
Constructs a domain [0..size-1]. | |
| indexed_domain (tuple< size_type > const &size) | |
| 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]. | |
| void | update (index_type const &new_last) |
| Update the domain with a new last element. More... | |
| template<int Index> | |
| indexed_domain< T, 1 > | get_domain (void) const |
Provide single dimension domain over Index dimension. More... | |
| index_type | first (void) const |
| Returns least index of domain. | |
| index_type | last (void) const |
| Returns greatest index of domain. | |
| index_type | open_last (void) const |
| Returns termination value for comparison. | |
| bool | contains (index_type const &index) const |
| Returns True if specified index is in domain. | |
| size_type | size (void) const |
| Returns the number of indices in this domain. | |
| bool | empty (void) const |
Returns True if this domain has no indices. | |
| bool | is_same_container_domain (void) const |
Returns True if this domain has all the indexes to reference all the data in a container. | |
| template<typename Distance > | |
| index_type | advance (index_type i, Distance n) const |
Returns the index resulting of advance the index i, n positions. More... | |
| size_type | distance (index_type i, index_type j) const |
Returns how many positions are needed to advance from the index i to reach the index j. More... | |
| bool | less_than (index_type const &i0, index_type const &i1) const |
| bool | is_contiguous (void) const |
Returns True if all the indexes in the domain are contiguous. returns False otherwise. | |
| indexed_domain | operator & (indexed_domain const &other) const |
Returns the resulting intersection with the given other domain. | |
| size_type | dimensions (void) const |
Public Types | |
| using | traversal_type = default_traversal< 1 >::type |
| using | index_type = T |
| using | gid_type = index_type |
| using | size_type = std::size_t |
| using | linear_size_type = std::size_t |
| using | dimensions_type = std::size_t |
| using | dimension_type = std::integral_constant< int, 1 > |
Specialization for a one-dimensional domain where the indexes are consecutive and numerable.
The domain is defined as a range of indexes between first index and last index (included) $ [first..last]$.
| T | Index type. |
T must be and integral type. | stapl::indexed_domain< T, 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).
If full_container is specified as true, the domain will be flagged as a domain that contains all the indexes of a container.
| void stapl::indexed_domain< T, 1 >::update | ( | index_type const & | new_last | ) |
Update the domain with a new last element.
This method is invoked by the container update_distribution methods.
| indexed_domain<T,1> stapl::indexed_domain< T, 1 >::get_domain | ( | void | ) | const |
Provide single dimension domain over Index dimension.
For the 1D specialization, it simply returns the 1D domain itself.
| index_type stapl::indexed_domain< T, 1 >::advance | ( | index_type | i, |
| Distance | n | ||
| ) | const |
Returns the index resulting of advance the index i, n positions.
| D | Integral type. |
| size_type stapl::indexed_domain< T, 1 >::distance | ( | index_type | i, |
| index_type | j | ||
| ) | const |
Returns how many positions are needed to advance from the index i to reach the index j.
1.8.13