~/bend-docscommunity

kernel_packing_samples.bend checks

raw source on the hub · import stelliferous@0.0.3.0/kernel_packing_samples.bend as Kernel_packing_samples

Pixel reads of an entry whose tile crosses an output row.

1 import
import Base

Types

type PixelAddress source · line 21 · raw

Data

type WindowPixelBlock source · line 29 · raw

Data

Reduction coordinates are invariant across the whole block, at any width.

Definitions

def masked source · line 4 · raw

@value:F32 -> @inside:Bool -> F32

def mask_pixel source · line 11 · raw

@inside:Bool -> @pair:Pair(Array<F32>, F32) -> Pair(Array<F32>, F32)

def pixel source · line 15 · raw

@input_storage:Array<F32> -> @+output_position:U32 -> @+reduction_index:U32 -> @+input_height:U32 -> @+input_width:U32 -> @+kernel_size:U32 -> @+stride:U32 -> @+padding:U32 -> @+output_width:U32 -> Pair(Array<F32>, F32)

def read_pixel_address source · line 24 · raw

@input:Array<F32> -> @address:PixelAddress -> Pair(Array<F32>, F32)

def window_pixel_block source · line 32 · raw

@position:U32 -> @+reduction:U32 -> @+base:U32 -> @+height:U32 -> @+width:U32 -> @+tap_rows:U32 -> @+tap_columns:U32 -> @stride:U32 -> @row_origin:U32 -> @column_origin:U32 -> @output_width:U32 -> WindowPixelBlock

def window_pixel_address source · line 36 · raw

@context:WindowPixelBlock -> @index:Nat -> PixelAddress

def read_window_pixel source · line 43 · raw

@input:Array<F32> -> @context:WindowPixelBlock -> @index:Nat -> Pair(Array<F32>, F32)

def window_pixel source · line 46 · raw

@input:Array<F32> -> @position:U32 -> @reduction:U32 -> @base:U32 -> @height:U32 -> @width:U32 -> @tap_rows:U32 -> @tap_columns:U32 -> @stride:U32 -> @row_origin:U32 -> @column_origin:U32 -> @output_width:U32 -> Pair(Array<F32>, F32)