1 import Base 2 import ./kernel_gather.bend as Gather 3 import ./storage_buffer.bend as Storage 4 import ./proofs/kernel_gather_certificate.bend as GatherCertificate 5 6 def run(+channels: U32,+offset: U32,+positions: U32,+span: U32,input: Storage.Buffer,output: Storage.Buffer) -> Storage.Buffer: 7 Storage.Buffer{input,input_length,input_certificate} = input 8 Storage.Buffer{output,length,output_certificate} = output 9 Storage.Buffer{Gather.gather_block(channels,offset,positions,span,input,output),length, 10 GatherCertificate.certificate(channels,offset,positions,span,input,output,input_certificate,output_certificate)}