def generic_count_producer

bendtorch-core@0.1.0.0 · src/tensor/construction_metadata.bend:25

import bendtorch-core@0.1.0.0/src/tensor/construction_metadata.bend as ConstructionMetadata
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/allocation_spec.bend as Allocation
import bendtorch-core@0.1.0.0/src/tensor/allocation_PROOF.bend as AllocationProof

25def generic_count_producer(+shape: Shape.Shape, +fill: F32) ->
26  {Allocation.tensor_length(shape, Core.new(shape, fill)) ==
27    Some{Shape.logical_numel(Shape.dimensions(shape))} : Maybe<&2, Nat>}:
28  AllocationProof.core_new(shape, fill)

Uses (9)

Used by (1)