def split

stelliferous@0.0.2.0 · kernel_pipeline.bend:96

import stelliferous@0.0.2.0/kernel_pipeline.bend as KernelPipeline
import Base
import stelliferous@0.0.2.0/kernel_window.bend as KernelWindow

96# The right child keeps the parent's rows; the left child copies only its band.
97# Unaligned rows would break whole eight-position blocks, so they are cloned;
98# so is a band that fails its coverage check.
99def split(work: Work,offset: U32,half: U32,window: InputWindow) -> InputWindow & InputWindow:
100  Work{channels_out,+height,+width,+kernel,+stride,+padding,+output_width,positions,+inner} = work
101  InputWindow{buffer,+first,+rows} = window
102  +offset = offset
103  +half = half
104  +band = KernelWindow.band(first,rows,height,kernel,stride,padding,output_width,offset,half)
105  split_when(KernelWindow.copies_band(first,rows,height,kernel,stride,padding,output_width,offset,half,band),
106    (inner / (kernel * kernel) : U32),width,first,rows,band,buffer)

Uses (9)

Used by (1)