-
#include "tensorstore/strided_layout.h"
-
template <typename LayoutOrder, DimensionIndex Rank>
requires IsContiguousLayoutOrder<LayoutOrder, Rank>
void tensorstore::InitializeContiguousLayout(
LayoutOrder order,
Index element_stride,
BoxView<RankConstraint::FromInlineRank(Rank)> domain,
StridedLayout<Rank, offset_origin>* layout); Initializes
*layout
to a contiguous layout over the specifieddomain
.- Parameters:¶
- LayoutOrder order¶
The layout order to use.
- Index element_stride¶
The byte stride for the innermost dimension. If
domain.rank() == 0
, this has no effect.- BoxView<RankConstraint::FromInlineRank(Rank)> domain¶
The domain to assign to
*layout
. The origin is simply copied but does not affect the resultant byte strides.- out
- StridedLayout<Rank, offset_origin> *layout¶
Layout to update. The rank will be set to
domain.rank()
, and any existing value is ignored.