def cell

bendtorch-core@0.1.0.0 · src/tensor/slice.bend:222

import bendtorch-core@0.1.0.0/src/tensor/slice.bend as Slice
import Base

222# The state is the input array and an empty array that fills the second
223# slot of the state pair; a cell past the count is +0.0 padding.
224def cell(+plan: Plan, +position: Nat, state: Array<F32> & Array<F32>, inside: Bool) -> F32 & (Array<F32> & Array<F32>):
225  match inside:
226    case False{}:
227      (0.0, state)
228    case True{}:
229      read(plan, position, state)

Uses (8)

Used by (5)