def swept
stelliferous@0.0.2.0 · tensor_operations.bend:194
import stelliferous@0.0.2.0/tensor_operations.bend as TensorOperations
import Base
import stelliferous@0.0.2.0/storage_buffer.bend as Storage
import stelliferous@0.0.2.0/tensor_access.bend as Access
import stelliferous@0.0.2.0/proofs/tensor_access_certificate.bend as AccessCertificate
194
195def swept(~Element: Data,~operation: Element -> Element -> Element,+count: Nat,+context: Access.SweepContext<Element>,
196 input: Storage.Buffer<Element>,output: Storage.Buffer<Element>) -> Storage.Buffer<Element> & Storage.Buffer<Element>:
197 Storage.Buffer{input,input_length,input_certificate} = input
198 Storage.Buffer{output,output_length,output_certificate} = output
199 pair_buffers(~Element,input_length,output_length,
200 Access.sweep_run(~Element,~operation,count,context,input,output),
201 AccessCertificate.sweep(~Element,~operation,count,context,input,output,input_certificate,output_certificate))