mir.ndslice.concatenation

This is a submodule of mir.ndslice.

The module contains ._concatenation routine. It construct Concatenation structure that can be assigned to an ndslice of the same shape with [] = or [] op= .

slicedNdField can be used to construct ndslice view on top of Concatenation.

slice has special overload for Concatenation that can be used to allocate new ndslice.

Concatenation constructors

Function NameDescription
._concatenationCreates a Concatenation view of multiple slices.
padPads with a constant value.
padEdgePads with the edge values of slice.
padSymmetricPads with the reflection of the slice mirrored along the edge of the slice.
padWrapPads with the wrap of the slice along the axis. The first values are used to pad the end and the end values are used to pad the beginning.

Members

Functions

applyFront
auto applyFront(Concatenation!(dim, Slices) st)

Performs fun(st.front!d).

concatenation
auto concatenation(Slices slices)

Creates a Concatenation view of multiple slices.

pad
auto pad(S s, T value, size_t[N] lengths)

Pads with a constant value.

padEdge
auto padEdge(Slice!(Iterator, N, kind) s, size_t[N] lengths)

Pads with the edge values of slice.

padSymmetric
auto padSymmetric(Slice!(Iterator, N, kind) s, size_t[N] lengths)

Pads with the reflection of the slice mirrored along the edge of the slice.

padWrap
auto padWrap(Slice!(Iterator, N, kind) s, size_t[N] lengths)

Pads with the wrap of the slice along the axis. The first values are used to pad the end and the end values are used to pad the beginning.

Structs

Concatenation
struct Concatenation(size_t dim, Slices...)

Templates

forEachFragment
template forEachFragment(alias pred)

Iterates 1D fragments in Slice or Concatenation in optimal for buffering way.

pad
template pad(size_t[] dimensions, string[] directions)

Pads with a constant value.

padEdge
template padEdge(size_t[] dimensions, string[] directions)

Pads with the edge values of slice.

padSymmetric
template padSymmetric(size_t[] dimensions, string[] directions)

Pads with the reflection of the slice mirrored along the edge of the slice.

padWrap
template padWrap(size_t[] dimensions, string[] directions)

Pads with the wrap of the slice along the axis. The first values are used to pad the end and the end values are used to pad the beginning.

until
template until(alias pred)

Iterates elements in Slice or Concatenation until pred returns true.

Variables

concatenationDimension
enum size_t concatenationDimension(T : Concatenation!(dim, Slices), size_t dim, Slices...);
isConcatenation
enum bool isConcatenation(T);

See Also

fuse submodule.

Meta

License

Apache-2.0

Authors

Ilya Yaroshenko