59 }
else if ((l > f) ^ (s < 0)) {
115 return Index(1, off, i);
119 return Index(1, off, i);
123 return Index(1, -off, i);
127 return Index(-1, off, i);
131 return Index(-1, 0, i);
135 return Index(m, 0, i);
139 return Index(m, 0, i);
200 KOKKOS_INLINE_FUNCTION
void lcm(
int s1,
int s2,
int& s,
int& m1,
int& m2) {
248 int rf = rhs.
first();
251 int f = lf > rf ? lf : rf;
252 int l = ll < rl ? ll : rl;
254 ret.
length_m = ((l >= f) ? l - f + 1 : 0);
278 newStride, a_mul, b_mul);
284 if (a_off < b.
first()) {
293 for (
int a_m = 0; (a_m < a_mul) && (a_i < (int)a.
length());
294 a_m++, a_i++, a_off += a.
stride()) {
295 int b_off = b.
first();
297 for (
int b_m = 0; (b_m < b_mul) && (b_m < (int)b.
length()); b_m++, b_off += b.
stride())
298 if (a_off == b_off) {
301 int m = am < bm ? am : bm;
302 return Index(a_off, m, newStride);
KOKKOS_INLINE_FUNCTION Index operator/(const Index &i, int d)
KOKKOS_INLINE_FUNCTION Index operator-(const Index &i, int off)
static KOKKOS_INLINE_FUNCTION Index do_intersect(const Index &a, const Index &b)
KOKKOS_INLINE_FUNCTION Index operator+(const Index &i, int off)
KOKKOS_INLINE_FUNCTION void lcm(int s1, int s2, int &s, int &m1, int &m2)
KOKKOS_INLINE_FUNCTION Index operator*(const Index &i, int m)
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 split(Index &l, Index &r) const
KOKKOS_INLINE_FUNCTION int stride() const noexcept
KOKKOS_INLINE_FUNCTION Index()
KOKKOS_INLINE_FUNCTION Index & operator-=(int)
KOKKOS_INLINE_FUNCTION bool empty() const noexcept
KOKKOS_INLINE_FUNCTION size_t length() const noexcept
KOKKOS_INLINE_FUNCTION Index grow(int ncells) const
KOKKOS_INLINE_FUNCTION int max() const noexcept
KOKKOS_INLINE_FUNCTION Index & operator+=(int)
KOKKOS_INLINE_FUNCTION int last() const noexcept