35#include <Kokkos_Core.hpp>
117 KOKKOS_INLINE_FUNCTION
Index();
123 KOKKOS_INLINE_FUNCTION
Index(
size_t n);
131 KOKKOS_INLINE_FUNCTION
Index(
int f,
int l);
139 KOKKOS_INLINE_FUNCTION
Index(
int f,
int l,
int s);
141 KOKKOS_DEFAULTED_FUNCTION
147 KOKKOS_INLINE_FUNCTION
int min() const noexcept;
152 KOKKOS_INLINE_FUNCTION
int max() const noexcept;
157 KOKKOS_INLINE_FUNCTION
size_t length() const noexcept;
162 KOKKOS_INLINE_FUNCTION
int stride() const noexcept;
167 KOKKOS_INLINE_FUNCTION
int first() const noexcept;
172 KOKKOS_INLINE_FUNCTION
int last() const noexcept;
177 KOKKOS_INLINE_FUNCTION
bool empty() const noexcept;
179 KOKKOS_INLINE_FUNCTION
Index& operator+=(
int);
181 KOKKOS_INLINE_FUNCTION
Index& operator-=(
int);
184 KOKKOS_INLINE_FUNCTION friend
Index operator+(const
Index&,
int);
186 KOKKOS_INLINE_FUNCTION friend
Index operator+(
int, const
Index&);
188 KOKKOS_INLINE_FUNCTION friend
Index operator-(const
Index&,
int);
190 KOKKOS_INLINE_FUNCTION friend
Index operator-(
int, const
Index&);
193 KOKKOS_INLINE_FUNCTION friend
Index operator-(const
Index&);
195 KOKKOS_INLINE_FUNCTION friend
Index operator*(const
Index&,
int);
197 KOKKOS_INLINE_FUNCTION friend
Index operator*(
int, const
Index&);
199 KOKKOS_INLINE_FUNCTION friend
Index operator/(const
Index&,
int);
205 KOKKOS_INLINE_FUNCTION
Index grow(
int ncells) const;
208 KOKKOS_INLINE_FUNCTION
bool touches(const
Index& a) const;
247 KOKKOS_INLINE_FUNCTION
Index(
int m,
int a,
const Index& b);
249 KOKKOS_INLINE_FUNCTION
Index(
int f,
int s,
const Index* b);
256 out <<
'[' << I.
first() <<
':' << I.
last() <<
':' << I.
stride() <<
']';
std::ostream & operator<<(std::ostream &os, const BConds< Field, Dim > &bc)
KOKKOS_INLINE_FUNCTION Index general_intersect(const Index &) const
KOKKOS_INLINE_FUNCTION Index intersect(const Index &) const
int stride_m
First index element.
KOKKOS_INLINE_FUNCTION bool touches(const Index &a) const
KOKKOS_INLINE_FUNCTION int min() const noexcept
KOKKOS_INLINE_FUNCTION int first() const noexcept
KOKKOS_INLINE_FUNCTION bool contains(const Index &a) const
KOKKOS_INLINE_FUNCTION Index reverse() const
The number of elements.
KOKKOS_INLINE_FUNCTION bool operator==(const Index &r) const noexcept
KOKKOS_INLINE_FUNCTION bool split(Index &l, Index &r) const
KOKKOS_INLINE_FUNCTION int stride() const noexcept
KOKKOS_INLINE_FUNCTION Index()
KOKKOS_INLINE_FUNCTION bool empty() const noexcept
KOKKOS_INLINE_FUNCTION size_t length() const noexcept
KOKKOS_INLINE_FUNCTION Index grow(int ncells) const
KOKKOS_DEFAULTED_FUNCTION ~Index()=default
KOKKOS_INLINE_FUNCTION int max() const noexcept
KOKKOS_INLINE_FUNCTION bool operator<(const Index &r) const
KOKKOS_INLINE_FUNCTION int last() const noexcept
iterator(int current, int stride=1)
iterator & operator+=(int i)
bool operator<(const iterator &y) const
bool operator==(const iterator &y) const
iterator operator+(int i) const
int operator[](int i) const
iterator operator-(int i) const
bool operator!=(const iterator &y) const
bool operator<=(const iterator &y) const
iterator & operator-=(int i)
bool operator>(const iterator &y) const
bool operator>=(const iterator &y) const