def Final

bendtorch-core@0.1.0.0 · src/tensor/contracts/pointwise_proof.bend:267

import bendtorch-core@0.1.0.0/src/tensor/contracts/pointwise_proof.bend as PointwiseProof
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/core.bend as Core
import bendtorch-core@0.1.0.0/src/tensor/lifecycle.bend as Lifecycle

267def Final(~O: Data, ~f: O -> F32 -> F32 -> F32, ~P: Data, ~ia: P -> Nat -> Nat, ~ib: P -> Nat -> Nat,
268  +operation: O, +plan: P, +left: Shape.Shape, +left_fill: F32, +left_ops: List<&2, StorageLaws.Op>,
269  +right: Shape.Shape, +right_fill: F32, +right_ops: List<&2, StorageLaws.Op>, +shape: Shape.Shape, +count: Nat,
270  -Q: (Core.Dynamic & Core.Dynamic) & Result<&2, &1, Core.Error, Core.Dynamic> -> Type) -> Type:
271  @-left_fits: {Lifecycle.logical_length(input_storage(~P, ~ia, plan, left, left_fill, left_ops, count)) == Shape.logical_numel(Shape.dimensions(left)) : Nat} ->
272  @-right_fits: {Lifecycle.logical_length(input_storage(~P, ~ib, plan, right, right_fill, right_ops, count)) == Shape.logical_numel(Shape.dimensions(right)) : Nat} ->
273  @-output_fits: {Lifecycle.logical_length(output_storage(~O, ~f, ~P, ~ia, ~ib, count, operation, plan, left, left_fill, left_ops, right, right_fill, right_ops, shape)) ==
274    Shape.logical_numel(Shape.dimensions(shape)) : Nat} ->
275    Q(((Core.Packed{left, Core.TTensor{input_storage(~P, ~ia, plan, left, left_fill, left_ops, count), left_fits}},
276      Core.Packed{right, Core.TTensor{input_storage(~P, ~ib, plan, right, right_fill, right_ops, count), right_fits}}),
277      Done{Core.Packed{shape, Core.TTensor{output_storage(~O, ~f, ~P, ~ia, ~ib, count, operation, plan, left, left_fill, left_ops, right, right_fill, right_ops, shape), output_fits}}}))

Uses (16)

Used by (3)