strata::Block¶
Part of Views and expressions.
E cut to a box: a corner and a size on each axis.
Element i... of the block is the operand's at i + corner.
What block(e, seqs...) gives for a node that has no block of its own: it reads through the operand, and its cursor is the operand's, moved to the corner once. A node with a better way, a view whose block is another view, gives that instead.
Template parameters
| Name | Description |
|---|---|
E | The operand as it is held, capture_t of what was given: borrowed for an lvalue owner, owned for a temporary one, which makes the block moved and never copied, else by value. |
Sizes | The extent of the block on each axis: a number, or Dyn where it is known at run time. |
Members¶
corner_type¶
The position of the block's first element in the operand, one index per axis.
Block¶
operand cut to a box of shape sizes at corner.
Precondition
On each axis the corner is inside the operand, and the size fits in what remains.
operand¶
The operand that is cut.
corner¶
Where the block starts in the operand.
shape¶
The shape of the block.
cursor¶
Where a traversal starts: the operand's cursor, moved to the corner.
operator[]¶
The element at a position of the block: the operand's, moved by the corner.
Precondition
Each index is within the extent of its axis of the block.
block¶
template <Extent... Outer>
constexpr auto block(const Block &blocked, const Shape<Outer...> &sizes, const std::array<std::size_t, sizeof...(Outer)> &corner)
The block of the block: one block of the operand, of the inner box's own corner moved by the outer's.