def clone_first_model_view

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

import bendtorch-core@0.1.0.0/src/tensor/construction_PROOF.bend as ConstructionPROOF
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/tensor/core.bend as Core
import bendtorch-core@0.1.0.0/src/tensor/lifecycle.bend as Lifecycle
import bendtorch-core@0.1.0.0/src/tensor/construction_LAWS.bend as Laws

40def clone_first_model_view(-shape: Shape.Shape, -original: Storage.Storage,
41  -valid: {Lifecycle.logical_length(original) == Shape.logical_numel(Shape.dimensions(shape)) : Nat}, +index: U32,
42  pair: Storage.Storage & Storage.Storage, -same: {pair == Storage.clone(original) : Storage.Storage & Storage.Storage}) ->
43  {Laws.clone_first_model(shape, Core.clone_result(shape, original, valid, pair, same), index) ==
44    Lifecycle.observe(Pair.fst(Storage.Storage, Storage.Storage, pair), index) : Maybe<&2, F32>}:
45  (first, second) = pair
46  {==}

Uses (16)

Used by (1)