|
Hermes
|
Represents a closed-open range of indices [lower, upper),. More...
#include <index.h>
Public Member Functions | |
| HERMES_DEVICE_CALLABLE | Index3Range (T upper_i, T upper_j, T upper_k) |
| Construct a new Index3Range object. | |
| HERMES_DEVICE_CALLABLE | Index3Range (Index3< T > upper) |
| Construct a new Index3Range object. | |
| 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. | |
| 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.
\(k * (d_i * d_j) + j * d_i + i\)
where \(d = upper - lower\)
| ijk |
|
inline |
\(|upper - lower|_i\)
|
friend |
| a | |
| b |