-
#include "tensorstore/index.h"
- using tensorstore::Index = int64_t;
Type for representing a coordinate in, or a extent of, a multi-dimensional array.
A valid index is in the closed interval: [
kMinFiniteIndex
,kMaxFiniteIndex
].
Related Constants¶
-
constexpr const Index tensorstore::kMinFiniteIndex =
-0x3ffffffffffffffe; Minimum supported finite
Index
value.
- constexpr const Index tensorstore::kInfIndex = 0x3fffffffffffffff;
Special
Index
value representing positive infinity.
-
constexpr const Index tensorstore::kMaxFiniteIndex =
0x3ffffffffffffffe; Maximum supported finite
Index
value.
- constexpr const Index tensorstore::kInfSize = 0x7fffffffffffffff;
Special
Index
value representing an infinite extent for a dimension.
-
constexpr const Index tensorstore::kMaxFiniteSize =
0x7ffffffffffffffd; Maximum supported finite
Index
value.
- constexpr const Index tensorstore::kImplicit = -0x8000000000000000;
Special index value that indicates an implicit bound.
Related Functions¶
- constexpr bool tensorstore::IsFiniteIndex(Index index);
Returns
true
ifindex
is within the finite range: [kMinFiniteIndex
,kMaxFiniteIndex
].
- constexpr bool tensorstore::IsValidIndex(Index index);
Return
true
ifindex
is within the valid range: [-kInfIndex
,+kInfIndex
].
-
constexpr Index
tensorstore::ExplicitIndexOr(Index index, Index default_value); Returns
index
ifindex != kImplicit
, ordefault_value
otherwise.
-
constexpr bool
tensorstore::ImplicitOrEqual(Index index, Index expected);