TensorOperations.combine_with: def of stelliferous@0.0.2.0 Import: import stelliferous@0.0.2.0/tensor_operations.bend as TensorOperations Lines 103-113 of stelliferous@0.0.2.0/tensor_operations.bend: https://jend.leeeet.dev/read.txt?path=stelliferous@0.0.2.0/tensor_operations.bend&start_line=103&end_line=113 import Base import stelliferous@0.0.2.0/storage_buffer.bend as Storage import stelliferous@0.0.2.0/tensor_shape.bend as Shapes import stelliferous@0.0.2.0/tensor_view.bend as Views import stelliferous@0.0.2.0/proofs/storage_certificate.bend as Certificate def combine_with(~Element: Data,~kernel: @+count: Nat -> @+right_view: Views.View -> @+offset: U32 -> Storage.Buffer -> Storage.Buffer -> Storage.Buffer & Storage.Buffer, left: Storage.Buffer,+left_view: Views.View,right: Storage.Buffer,+right_view: Views.View) -> Outcome<(Storage.Buffer & Storage.Buffer)>: Storage.Buffer{left,+left_length,left_certificate} = left Certificate.Certificate{+left_depth,left_equation} = left_certificate Storage.Buffer{right,+right_length,right_certificate} = right Certificate.Certificate{+right_depth,right_equation} = right_certificate combine_when_with(~Element,~kernel,Shapes.same(Views.shape(left_view),Views.shape(right_view)) && Views.is_contiguous(left_view) && valid_buffer(left_length,U32.shln(1,left_depth),left_view) && valid_buffer(right_length,U32.shln(1,right_depth),right_view),Views.numel(left_view),right_view,left_view, Storage.Buffer{left,left_length,Certificate.Certificate{left_depth,left_equation}},Storage.Buffer{right,right_length,Certificate.Certificate{right_depth,right_equation}}) Uses (15): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.and https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Pair https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.shln https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/proofs/storage_certificate.bend&name=Certificate https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/storage_buffer.bend&name=Buffer https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/tensor_operations.bend&name=Outcome https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/tensor_operations.bend&name=combine_when_with https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/tensor_operations.bend&name=valid_buffer https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/tensor_shape.bend&name=same https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/tensor_view.bend&name=View https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/tensor_view.bend&name=is_contiguous https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/tensor_view.bend&name=numel https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/tensor_view.bend&name=shape