17 inline namespace _V1 {
18 template <
int dimensions>
class id;
19 template <
int dimensions>
class range;
22 template <
int Dims,
bool WithOffset>
struct ItemBase;
24 template <
int Dims>
struct ItemBase<Dims, true> {
27 return (Rhs.MIndex == MIndex) && (Rhs.MExtent == MExtent) &&
28 (Rhs.MOffset == MOffset);
35 return MIndex[0] - MOffset[0];
38 return (MIndex[0] - MOffset[0]) * MExtent[1] + (MIndex[1] - MOffset[1]);
40 return ((MIndex[0] - MOffset[0]) * MExtent[1] * MExtent[2]) +
41 ((MIndex[1] - MOffset[1]) * MExtent[2]) + (MIndex[2] - MOffset[2]);
49 template <
int Dims>
struct ItemBase<Dims, false> {
52 return (Rhs.MIndex == MIndex) && (Rhs.MExtent == MExtent);
66 return MIndex[0] * MExtent[1] + MIndex[1];
68 return (MIndex[0] * MExtent[1] * MExtent[2]) + (MIndex[1] * MExtent[2]) +
bool operator==(const ItemBase &Rhs) const
size_t get_linear_id() const
bool operator!=(const ItemBase &Rhs) const
size_t get_linear_id() const
bool operator==(const ItemBase &Rhs) const
bool operator!=(const ItemBase &Rhs) const