def channel_base

stelliferous@0.0.2.0 · tensor_band.bend:246

import stelliferous@0.0.2.0/tensor_band.bend as TensorBand
import Base

246# Channel c of a leaf holds the positions from c * rows * width; their global
247# indices are consecutive from this base.
248def channel_base(context: Indexed,channel: U32) -> U32:
249  Indexed{Geometry{batch,channels,+height,width},+first,rows} = context
250  (((first / height * channels + channel) * height + first % height) * width : U32)

Uses (7)

Used by (1)