def KeptCopy

bendtorch-core@0.1.0.0 · src/tensor/matmul_PROOF.bend:1276

import bendtorch-core@0.1.0.0/src/tensor/matmul_PROOF.bend as MatmulPROOF
import Base
import bendtorch-core@0.1.0.0/src/shape/core.bend as Shape
import bendtorch-core@0.1.0.0/src/tensor/core.bend as Core
import bendtorch-core@0.1.0.0/src/tensor/elementwise_parallel_proof.bend as Parallel

1276# What `take` hands back for a tensor: its kept clone, as a tensor of the same
1277# shape, and the copy the build reads.
1278def KeptCopy(+shape: Shape.Shape, -a: Core.Tensor<shape>, -Q: Core.Dynamic & Array<F32> -> Type) -> Type:
1279  @-kept: Core.Tensor<shape> -> @-copy: Array<F32> ->
1280  @-taken: Parallel.Taken<Core.Packed{shape, a}, (Core.Packed{shape, kept}, copy)> ->
1281    Q((Core.Packed{shape, kept}, copy))

Uses (8)

Used by (2)