def update

stelliferous@0.0.2.0 · kernel_tile.bend:45

import stelliferous@0.0.2.0/kernel_tile.bend as KernelTile
import Base
import stelliferous@0.0.2.0/math_fp32.bend as Fp32

45# One ordered multiply-add per lane: eight output positions, one weight.
46def update(accumulator: Tile8,input: Tile8,weight: F32) -> Tile8:
47  Tile{a,b,c,d,e,f,g,h} = accumulator
48  Tile{x0,x1,x2,x3,x4,x5,x6,x7} = input
49  +weight = weight
50  Tile{Fp32.multiply_add(a,x0,weight),Fp32.multiply_add(b,x1,weight),Fp32.multiply_add(c,x2,weight),Fp32.multiply_add(d,x3,weight),
51    Fp32.multiply_add(e,x4,weight),Fp32.multiply_add(f,x5,weight),Fp32.multiply_add(g,x6,weight),Fp32.multiply_add(h,x7,weight)}

Uses (3)

Used by (1)