def storage
import bendtorch-core@0.1.0.0/src/tensor/contracts/replayed.bend as Replayedimport 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/tensor/core.bend as Core
12# A replayed tensor holds the storage that `Storage.new(count, fill)` creates,
13# changed by a list of storage operations in order. `Core.new(shape, fill)` is
14# the empty history, `Core.from_values` writes each value once, and every
15# contract-family output is a write history over a `+0.0` fill.
16def storage(+shape: Shape.Shape, +fill: F32, +ops: List<&2, StorageLaws.Op>) -> Storage.Storage:
17 StorageLaws.replay(ops, StorageLaws.created(Shape.count(shape), fill))
Uses (8)
Used by (134)
- bendtorch-core@0.1.0.0/src/tensor/contracts/pointwise_proof:replayed_point
- bendtorch-core@0.1.0.0/src/tensor/contracts/pointwise_proof:input_storage
- bendtorch-core@0.1.0.0/src/tensor/contracts/replayed:new_lift
- bendtorch-core@0.1.0.0/src/tensor/permute_values:Permuted
- bendtorch-core@0.1.0.0/src/autograd/sum_to_size_fold_LAWS:sum_to_size_replayed
- …