-
#include "tensorstore/rank.h"
- using tensorstore::InlineRank = DimensionIndex;
Specifies a fixed compile-time rank, or a run-time rank with an optional inline storage limit.
Non-negative integers
0
,1
, …,kMaxRank
indicate a fixed rank specified at compile time.A value of
dynamic_rank(k)
(equal to-k -1
), for0 <= k <= kMaxRank
, indicates that the rank is determined at run time, and bounds/layout information for rank values up tok
will be stored inline without additional heap allocation.The special value
dynamic_rank
, equivalent todynamic_rank(0)
, indicates that the rank is determined at run time, and any non-zero rank will require heap-allocated storage of bounds/layout information.
Related Functions¶
- constexpr bool tensorstore::IsValidInlineRank(InlineRank inline_rank);
Checks if
inline_rank
is a valid compile-time rank constraint.
-
constexpr DimensionIndex
tensorstore::InlineRankLimit(InlineRank rank_spec); Returns the inline rank limit of a rank spec.