strata::StridedMapping¶
Part of Order and layout.
The index to offset map for arbitrary strides, one per axis.
The static strides are part of the type (Strided<Dyn, 1>: the outer stride at run time, the inner one 1). Elements need not be contiguous: slices along a fast axis, blocks and regular steps through a buffer all land here.
Template parameters
| Name | Description |
|---|---|
S | The shape. |
Strides | One per axis: a number for a static stride, Dyn for a dynamic one. |
Members¶
StridedMapping¶
The mapping of the default shape, with its dynamic strides 0.
constexpr StridedMapping(const S &shape, const std::array<std::size_t, core::rank()> &strides) noexcept
The mapping of shape with the given strides.
Parameters
| Name | Description |
|---|---|
shape | The shape. |
strides | Every stride, static ones included; those must match the type. |
Converts from any mapping, dense or strided, whose shape converts to S and whose static strides cover the ones fixed here.
Dense converts to strided, and Strided<Dyn, 1> to Strided<Dyn, Dyn>.
required_span_size¶
The number of elements from the first mapped one to the last, inclusive; 0 when empty.
operator==¶
Equal when the shapes and the strides are.