-
#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
Indexvalue.
- constexpr const Index tensorstore::kInfIndex = 0x3fffffffffffffff;
Special
Indexvalue representing positive infinity.
-
constexpr const Index tensorstore::kMaxFiniteIndex =
0x3ffffffffffffffe; Maximum supported finite
Indexvalue.
- constexpr const Index tensorstore::kInfSize = 0x7fffffffffffffff;
Special
Indexvalue representing an infinite extent for a dimension.
-
constexpr const Index tensorstore::kMaxFiniteSize =
0x7ffffffffffffffd; Maximum supported finite
Indexvalue.
- constexpr const Index tensorstore::kImplicit = -0x8000000000000000;
Special index value that indicates an implicit bound.
Related Functions¶
- constexpr bool tensorstore::IsFiniteIndex(Index index);
Returns
trueifindexis within the finite range: [kMinFiniteIndex,kMaxFiniteIndex].
- constexpr bool tensorstore::IsValidIndex(Index index);
Return
trueifindexis within the valid range: [-kInfIndex,+kInfIndex].
-
constexpr Index
tensorstore::ExplicitIndexOr(Index index, Index default_value); Returns
indexifindex != kImplicit, ordefault_valueotherwise.
-
constexpr bool
tensorstore::ImplicitOrEqual(Index index, Index expected);