ReshapeContract.reshape_write: def of bendtorch-core@0.1.0.0 Import: import bendtorch-core@0.1.0.0/src/tensor/reshape_contract.bend as ReshapeContract Lines 193-202 of bendtorch-core@0.1.0.0/src/tensor/reshape_contract.bend: https://jend.leeeet.dev/read.txt?path=bendtorch-core@0.1.0.0/src/tensor/reshape_contract.bend&start_line=193&end_line=202 import Base import bendtorch-core@0.1.0.0/src/shape/core.bend as Shape import bendtorch-core@0.1.0.0/src/tensor/transform_records.bend as Laws import bendtorch-core@0.1.0.0/src/tensor/write_contract.bend as Writes def reshape_write(+input: Shape.Shape, +fill: F32, +target: Shape.Shape, +index: U32, +value: F32, inside: {Nat.is_lt(U32.to_nat(index), Shape.logical_numel(Shape.dimensions(input))) == True{} : Bool}, same: {Shape.logical_numel(Shape.dimensions(input)) == Shape.logical_numel(Shape.dimensions(target)) : Nat}) -> Laws.ReshapeWrite: +inside = inside +same = same Laws.ReshapeWrite{ reshape_written(input, fill, target, index, value, index, value, same, target_inside(input, target, index, same, inside), Writes.pick_hit(input, index, value, fill, inside)), other => inside_other => different => reshape_written(input, fill, target, index, value, other, fill, same, inside_other, Writes.pick_frame(input, index, value, other, fill, inside, different))} Uses (14): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=F32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.is_lt https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.to_nat https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/shape/core.bend&name=Shape https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/shape/core.bend&name=dimensions https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/shape/core.bend&name=logical_numel https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/tensor/reshape_contract.bend&name=reshape_written https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/tensor/reshape_contract.bend&name=target_inside https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/tensor/transform_records.bend&name=ReshapeWrite https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/tensor/write_contract.bend&name=pick_frame https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/tensor/write_contract.bend&name=pick_hit