Range
-
template<typename T>
class Range Public Functions
- inline KMM_HOST_DEVICE constexpr bool is_empty () const
Checks if the range is empty (i.e.,
begin == end
) or invalid (i.e.,begin > end
).
- inline KMM_HOST_DEVICE constexpr bool contains (const T &index) const
Checks if the given index
index
is within this range.
- inline KMM_HOST_DEVICE constexpr bool contains (const Range &that) const
Checks if the given
that
range is fully contained within this range.
- inline KMM_HOST_DEVICE constexpr bool overlaps (const Range &that) const
Checks if the given range
that
overlaps this range.
- inline KMM_HOST_DEVICE constexpr Range intersection (const Range &that) const
Checks if the given range
that
overlaps this range.
- inline KMM_HOST_DEVICE constexpr T size () const
Computes the size (or length) of the range.
- inline KMM_HOST_DEVICE constexpr Range split_off (T mid)
Returns the range
mid...end
and modifies the current range such it becomesbegin...mid
.
- inline KMM_HOST_DEVICE constexpr Range shift_by (T shift) const
Returns a new range that has been shifted by the given amount.