|
| NDARRAY_HOST_DEVICE | interval (index_t min, index_t extent) |
| |
|
NDARRAY_HOST_DEVICE | interval (index_t min) |
| |
|
NDARRAY_HOST_DEVICE | interval (const interval &)=default |
| |
|
NDARRAY_HOST_DEVICE | interval (interval &&)=default |
| |
|
NDARRAY_HOST_DEVICE interval & | operator= (const interval &)=default |
| |
|
NDARRAY_HOST_DEVICE interval & | operator= (interval &&)=default |
| |
| template<index_t CopyMin, index_t CopyExtent, class = internal::disable_if_not_equal<Min, CopyMin>, class = internal::disable_if_not_equal<Extent, CopyExtent>> |
| NDARRAY_HOST_DEVICE | interval (const interval< CopyMin, CopyExtent > &other) |
| |
|
template<index_t CopyMin, index_t CopyExtent, class = internal::disable_if_not_equal<Min, CopyMin>, class = internal::disable_if_not_equal<Extent, CopyExtent>> |
| NDARRAY_HOST_DEVICE interval & | operator= (const interval< CopyMin, CopyExtent > &other) |
| |
| NDARRAY_INLINE NDARRAY_HOST_DEVICE index_t | min () const |
| |
|
NDARRAY_INLINE NDARRAY_HOST_DEVICE void | set_min (index_t min) |
| |
| NDARRAY_INLINE NDARRAY_HOST_DEVICE index_t | extent () const |
| |
|
NDARRAY_INLINE NDARRAY_HOST_DEVICE index_t | size () const |
| |
|
NDARRAY_INLINE NDARRAY_HOST_DEVICE void | set_extent (index_t extent) |
| |
| NDARRAY_INLINE NDARRAY_HOST_DEVICE index_t | max () const |
| |
|
NDARRAY_INLINE NDARRAY_HOST_DEVICE void | set_max (index_t max) |
| |
| NDARRAY_INLINE NDARRAY_HOST_DEVICE bool | is_in_range (index_t at) const |
| |
| template<index_t OtherMin, index_t OtherExtent> |
| NDARRAY_INLINE NDARRAY_HOST_DEVICE bool | is_in_range (const interval< OtherMin, OtherExtent > &at) const |
| |
|
template<index_t OtherMin, index_t OtherExtent, index_t OtherStride> |
| NDARRAY_INLINE NDARRAY_HOST_DEVICE bool | is_in_range (const dim< OtherMin, OtherExtent, OtherStride > &at) const |
| |
| NDARRAY_HOST_DEVICE index_iterator | begin () const |
| |
| NDARRAY_HOST_DEVICE index_iterator | end () const |
| |
| template<index_t OtherMin, index_t OtherExtent> |
| NDARRAY_HOST_DEVICE bool | operator== (const interval< OtherMin, OtherExtent > &other) const |
| |
|
template<index_t OtherMin, index_t OtherExtent> |
| NDARRAY_HOST_DEVICE bool | operator!= (const interval< OtherMin, OtherExtent > &other) const |
| |
template<index_t Min_ = dynamic, index_t Extent_ = dynamic>
class nda::interval< Min_, Extent_ >
Describes a half-open interval of indices. The template parameters enable providing compile time constants for the min and extent of the interval. The values in the interval [min, min + extent) are considered in bounds.
interval<> a is said to be 'compatible with' another interval<Min, Extent> b if a.min() is compatible with Min and a.extent() is compatible with Extent.
Examples:
interval<> is an interval with runtime-valued min and extent.
interval<0> is an interval with compile-time constant min of 0, and runtime-valued extent.
interval<dynamic, 8> is an interval with compile-time constant extent of 8 and runtime-valuedmin. -interval<2, 3>` is a fully compile-time constant interval of indices 2, 3, 4.