Hermes
|
Represents a closed-open range of indices [lower, upper),. More...
Public Member Functions | |
HERMES_DEVICE_CALLABLE | Index3Range (T upper_i, T upper_j, T upper_k) |
Construct a new Index3Range object. More... | |
HERMES_DEVICE_CALLABLE | Index3Range (Index3< T > upper) |
Construct a new Index3Range object. More... | |
HERMES_DEVICE_CALLABLE | Index3Range (size3 upper) |
HERMES_DEVICE_CALLABLE | Index3Range (Index3< T > lower, Index3< T > upper) |
HERMES_DEVICE_CALLABLE size_t | flatIndex (const Index3< T > &ijk) const |
Computes a flat index based on size. More... | |
HERMES_DEVICE_CALLABLE Index3Iterator< T > | begin () const |
HERMES_DEVICE_CALLABLE Index3Iterator< T > | end () const |
HERMES_DEVICE_CALLABLE size3 | size () const |
Friends | |
HERMES_DEVICE_CALLABLE friend Index3Range< T > | intersect (const Index3Range< T > &a, const Index3Range< T > &b) |
Represents a closed-open range of indices [lower, upper),.
Can be used in a for each loop that iterates over all indices in the range:
T | must be an integer type |
|
inline |
Construct a new Index3Range object.
upper_i | - upper bound i |
upper_j | - upper bound j |
upper_k | - upper bound k |
|
inlineexplicit |
Construct a new Index3Range object.
upper | - upper bound |
|
inlineexplicit |
upper |
|
inline |
lower | |
upper |
|
inline |
|
inline |
|
inline |
Computes a flat index based on size.
\f(k * (d_i * d_j) + j * d_i + i\f)
where \f(d = upper - lower\f)
ijk |
|
inline |
\f(|upper - lower|_i\f)
|
friend |
a | |
b |