law new_replayed

bendtorch-core@0.1.0.0 · src/tensor/contracts/LAWS.bend:22

import bendtorch-core@0.1.0.0/src/tensor/contracts/LAWS.bend as LAWS
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/lifecycle.bend as Lifecycle
import bendtorch-core@0.1.0.0/src/tensor/contracts/replayed.bend as Replayed

22law new_replayed:
23  for +shape: Shape.Shape
24  for +fill: F32
25  for -P: Result<&2, &1, Core.Error, Core.Tensor<shape>> -> Type
26  for h: @-fits: {Lifecycle.logical_length(Replayed.storage(shape, fill, Nil{})) == Shape.logical_numel(Shape.dimensions(shape)) : Nat} ->
27    P(Done{Core.TTensor{Replayed.storage(shape, fill, Nil{}), fits}})
28  P(Core.new(shape, fill))

Uses (13)

Used by (0)

No other definition uses this definition.