tensor_tiled_concat.bend checks
raw source on the hub · import stelliferous@0.0.4.0/tensor_tiled_concat.bend as Tensor_tiled_concat
Concatenation of tiled parts. When every part is Usable, nonempty and of the shape of the first part but along the axis, every part takes its lanes on the lane axis of the first part with the groups innermost and the cells of the parts are concatenated along the axis. Along the lane axis every part before the last fills its groups, otherwise the lanes move to the longest other axis. Other parts concatenate with every part on its unit axis, one value a cell, which reports them.
7 imports
import Base import ./tensor.bend as Tensors import ./tensor_shape.bend as Shapes import ./tensor_layout.bend as Layout import ./tensor_grid.bend as Grid import ./tensor_tiled.bend as Tiled import ./kernel_tile.bend as Tile
Types
type Parts source · line 17 · raw
Type
The parts of a concatenation, in order.
Single@tensor:0xa2af805348d03b11eb853850859654f6/tensor_tiled.Tiled -> Parts
Cons@tensor:0xa2af805348d03b11eb853850859654f6/tensor_tiled.Tiled -> @rest:Parts -> Parts
type Fit source · line 23 · raw
Data
Whether every part so far fits, whether those before the last fill their groups along the axis, and their extents along the axis.
Fit@fits:Bool -> @whole:Bool -> @total:U32 -> Fit
type Lead source · line 89 · raw
Data
The extents and the lane axis of the first part.
Lead@shape:List<&2, U32> -> @lane:Nat -> Lead
Definitions
def fitting source · line 28 · raw
@+first:List<&2, U32> -> @+axis:Nat -> @status:0xa2af805348d03b11eb853850859654f6/tensor.Status -> @+shape:List<&2, U32> -> Bool
A part fits when it is Usable and nonempty and has the shape of the first part but along the axis.
def fit_part source · line 32 · raw
@fit:Fit -> @+first:List<&2, U32> -> @+axis:Nat -> @+lane:Nat -> @+last:Bool -> @status:0xa2af805348d03b11eb853850859654f6/tensor.Status -> @+shape:List<&2, U32> -> Fit
def prepend source · line 37 · raw
@tensor:0xa2af805348d03b11eb853850859654f6/tensor_tiled.Tiled -> @result:Pair(Parts, Fit) -> Pair(Parts, Fit)
def survey source · line 41 · raw
@parts:Parts -> @+first:List<&2, U32> -> @+axis:Nat -> @+lane:Nat -> @fit:Fit -> Pair(Parts, Fit)
def part_cells source · line 54 · raw
@tensor:0xa2af805348d03b11eb853850859654f6/tensor_tiled.Tiled -> @+lane:Nat -> 0xa2af805348d03b11eb853850859654f6/tensor.Tensor<0xa2af805348d03b11eb853850859654f6/kernel_tile.Tile8>
The cells of every part with its lanes on the lane axis, the groups innermost.
def cells source · line 57 · raw
@parts:Parts -> @+lane:Nat -> 0xa2af805348d03b11eb853850859654f6/tensor.Parts<0xa2af805348d03b11eb853850859654f6/kernel_tile.Tile8>
def units source · line 63 · raw
@parts:Parts -> 0xa2af805348d03b11eb853850859654f6/tensor.Parts<0xa2af805348d03b11eb853850859654f6/kernel_tile.Tile8>
The cells of every part on its unit axis.
def concat_fitted source · line 68 · raw
@fits:Bool -> @+axis:U32 -> @+lane:Nat -> @+lanes:U32 -> @+rank:Nat -> @parts:Parts -> 0xa2af805348d03b11eb853850859654f6/tensor_tiled.Tiled
def concat_lane source · line 75 · raw
@+first:List<&2, U32> -> @+axis:Nat -> @+lane:Nat -> @+whole:Bool -> Nat
The lane axis of the first part, or the longest other axis when the parts cut its groups.
def concat_at source · line 78 · raw
@+first:List<&2, U32> -> @+axis:U32 -> @+lane:Nat -> @+fits:Bool -> @+total:U32 -> @parts:Parts -> 0xa2af805348d03b11eb853850859654f6/tensor_tiled.Tiled
def concat_surveyed source · line 83 · raw
@+first:List<&2, U32> -> @+axis:U32 -> @+lane:Nat -> @surveyed:Pair(Parts, Fit) -> 0xa2af805348d03b11eb853850859654f6/tensor_tiled.Tiled
def led source · line 92 · raw
@started:Pair(0xa2af805348d03b11eb853850859654f6/tensor_tiled.Tiled, Nat) -> @+shape:List<&2, U32> -> Pair(0xa2af805348d03b11eb853850859654f6/tensor_tiled.Tiled, Lead)
def first_lead source · line 96 · raw
@tensor:0xa2af805348d03b11eb853850859654f6/tensor_tiled.Tiled -> Pair(0xa2af805348d03b11eb853850859654f6/tensor_tiled.Tiled, Lead)
def single_lead source · line 99 · raw
@pair:Pair(0xa2af805348d03b11eb853850859654f6/tensor_tiled.Tiled, Lead) -> Pair(Parts, Lead)
def cons_lead source · line 103 · raw
@rest:Parts -> @pair:Pair(0xa2af805348d03b11eb853850859654f6/tensor_tiled.Tiled, Lead) -> Pair(Parts, Lead)
def lead source · line 107 · raw
@parts:Parts -> Pair(Parts, Lead)
def concat_led source · line 112 · raw
@+axis:U32 -> @led:Pair(Parts, Lead) -> 0xa2af805348d03b11eb853850859654f6/tensor_tiled.Tiled
def concat source · line 117 · raw
@parts:Parts -> @+axis:U32 -> 0xa2af805348d03b11eb853850859654f6/tensor_tiled.Tiled
Layout.concat of the values of tiled parts, on the cells when the parts fit.