Skip to content

strata::DenseMapping

Part of Order and layout.

template <shape_like S, order_like O>
class strata::DenseMapping;

The index to offset map of a dense layout.

Every element of the shape lies in one contiguous block of required_span_size() elements, with the axes laid out in order O. The strides follow from the shape.

Template parameters

Name Description
S The shape.
O The order of the axes in memory.

Members

DenseMapping

constexpr DenseMapping() noexcept=default

The mapping of the default shape, whose dynamic extents are 0.

explicit constexpr DenseMapping(const S &shape) noexcept

The mapping of shape.

template <shape_like OtherShape, order_like OtherOrder>
constexpr DenseMapping(const DenseMapping<OtherShape, OtherOrder> &other) noexcept

Converts from a dense mapping of the same order whose shape converts to S.

See the converting constructor of Shape.

required_span_size

constexpr std::size_t required_span_size() const noexcept

The number of elements the mapped buffer must hold.

operator==

constexpr bool operator==(const DenseMapping &lhs, const DenseMapping &rhs) noexcept

Equal when the shapes are; the strides follow from them.