type Source

bendtorch-core@0.1.0.0 · src/tensor/contracts/matmul_parallel_proof.bend:456

import bendtorch-core@0.1.0.0/src/tensor/contracts/matmul_parallel_proof.bend as MatmulParallelProof
import Base
import bendtorch-core@0.1.0.0/src/shape/core.bend as Shape
import bendtorch-core@0.1.0.0/src/storage/main.bend as Storage
import bendtorch-core@0.1.0.0/src/storage/LAWS.bend as StorageLaws
import bendtorch-core@0.1.0.0/src/storage/api.bend as Api

456# How a build copy answers the reads of its input: an empty input has no
457# cell to read, and a normal one holds the input's normalized history.
458type Source<-shape: Shape.Shape, -fill: F32, -ops: List<&2, StorageLaws.Op>, -h: List<&2, Api.Effect>, -d: Nat, -f: F32> is Data:
459  NoCells{zero: {U32.to_nat(Shape.count(shape)) == 0n : Nat}}
460  Normal{fits: {Storage.bounds(d, U32.to_nat(Shape.count(shape))) == True{} : Bool},
461    same: {h == history(shape, ops) : List<&2, Api.Effect>}, filled: {f == fill : F32}}

Uses (11)

Used by (20)