def cell

bendtorch-core@0.1.0.0 · src/tensor/contracts/broadcast.bend:40

import bendtorch-core@0.1.0.0/src/tensor/contracts/broadcast.bend as Broadcast
import Base
import bendtorch-core@0.1.0.0/src/shape/core.bend as Shape
import bendtorch-core@0.1.0.0/src/storage/LAWS.bend as StorageLaws
import bendtorch-core@0.1.0.0/src/tensor/elementwise.bend as Elementwise
import bendtorch-core@0.1.0.0/src/tensor/contracts/replayed.bend as Replayed

40def cell(+operation: Elementwise.Operation, +plan: Shape.BroadcastPlan, +left_fill: F32, +left_ops: List<&2, StorageLaws.Op>,
41  +right_fill: F32, +right_ops: List<&2, StorageLaws.Op>, +index: Nat) -> F32:
42  Elementwise.scalar(operation, Replayed.value(Shape.left_shape(plan), left_fill, left_ops, U32.from_nat(left_map(plan, index))),
43    Replayed.value(Shape.right_shape(plan), right_fill, right_ops, U32.from_nat(right_map(plan, index))))

Uses (13)

Used by (2)